BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Sequence.cxx
Go to the documentation of this file.
1#include "HltSteerData/Sequence.h"
2
3namespace HltProcessor {
4
6 m_sequenceAlgoVector(), m_sequenceInputNum(0), m_sequenceAlgoNum(0) {
7 m_msgSvcProvider = MessageSvcProvider::instance();
8 }
9
11
12 /// Retrieve algorithm vector reference.
13 std::vector<std::string>& Sequence::algoVector() {
14 return m_sequenceAlgoVector;
15 }
16
17 /// Retrieve number of algorithms.
18 int Sequence::algoNum() const {
19 return m_sequenceAlgoNum;
20 }
21
22 /// Retrieve number of inputs.
23 int Sequence::inputNum() const {
24 return m_sequenceInputNum;
25 }
26
27 /// Retrieve number of algorithms.
28 void Sequence::setAlgoNum(int algoNum){
29 m_sequenceAlgoNum = algoNum;
30 }
31
32 /// Set number of inputs.
33 void Sequence::setInputNum(int inputNum){
34 m_sequenceInputNum = inputNum;
35 }
36
37 /// Build all std::vectors from string XML information.
38 void Sequence::makeVectors(std::string algoString){
39 std::string::size_type begIdx,endIdx;
40 std::string helpString;
41 std::string delims(" ");
42
43 // Do it for the algorithm string:
44 begIdx = algoString.find_first_not_of(delims);
45 while (begIdx != std::string::npos) {
46 endIdx = algoString.find_first_of(delims, begIdx);
47 if (endIdx == std::string::npos)
48 endIdx = algoString.length();
49 helpString = algoString.substr(begIdx, endIdx - begIdx);
50 //std::cout<<"Sequence "<<helpString<<std::endl;
51 algoVector().push_back(helpString);
52 setAlgoNum(algoNum() + 1);
53 begIdx = algoString.find_first_not_of(delims, endIdx);
54 }
55 }
56
57 /// Print all std::vectors and all other information for a given sequence.
59 MsgStream log(m_msgSvcProvider->msgSvc(), "Sequence");
60 log << MSG::INFO << "EventFilter: ";
61 log << MSG::INFO << "\t Algo(s): ";
62 for(std::vector<std::string>::iterator i = algoVector().begin();
63 i!=algoVector().end(); ++i){
64 log << MSG::INFO << *i << ' ';
65 }
66 log << endreq;
67 }
68} // End of namespace bracket
int algoNum() const
Retrieve number of algorithms.
Definition: Sequence.cxx:18
void print()
Print all std::vectors and all other information for a given sequence.
Definition: Sequence.cxx:58
std::vector< std::string > & algoVector()
Retrieve algorithm vector reference.
Definition: Sequence.cxx:13
void makeVectors(std::string algoString)
Build all std::vectors from string XML information.
Definition: Sequence.cxx:38
int inputNum() const
Retrieve number of inputs.
Definition: Sequence.cxx:23
void setAlgoNum(int algoNum)
Retrieve number of algorithms.
Definition: Sequence.cxx:28
void setInputNum(int inputNum)
Set number of inputs.
Definition: Sequence.cxx:33
static MessageSvcProvider * instance()