00001 #include "HltSteerData/Sequence.h" 00002 00003 namespace HltProcessor { 00004 00005 Sequence::Sequence(): 00006 m_sequenceAlgoVector(), m_sequenceInputNum(0), m_sequenceAlgoNum(0) { 00007 m_msgSvcProvider = MessageSvcProvider::instance(); 00008 } 00009 00010 Sequence::~Sequence() {} 00011 00013 std::vector<std::string>& Sequence::algoVector() { 00014 return m_sequenceAlgoVector; 00015 } 00016 00018 int Sequence::algoNum() const { 00019 return m_sequenceAlgoNum; 00020 } 00021 00023 int Sequence::inputNum() const { 00024 return m_sequenceInputNum; 00025 } 00026 00028 void Sequence::setAlgoNum(int algoNum){ 00029 m_sequenceAlgoNum = algoNum; 00030 } 00031 00033 void Sequence::setInputNum(int inputNum){ 00034 m_sequenceInputNum = inputNum; 00035 } 00036 00038 void Sequence::makeVectors(std::string algoString){ 00039 std::string::size_type begIdx,endIdx; 00040 std::string helpString; 00041 std::string delims(" "); 00042 00043 // Do it for the algorithm string: 00044 begIdx = algoString.find_first_not_of(delims); 00045 while (begIdx != std::string::npos) { 00046 endIdx = algoString.find_first_of(delims, begIdx); 00047 if (endIdx == std::string::npos) 00048 endIdx = algoString.length(); 00049 helpString = algoString.substr(begIdx, endIdx - begIdx); 00050 //std::cout<<"Sequence "<<helpString<<std::endl; 00051 algoVector().push_back(helpString); 00052 setAlgoNum(algoNum() + 1); 00053 begIdx = algoString.find_first_not_of(delims, endIdx); 00054 } 00055 } 00056 00058 void Sequence::print(){ 00059 MsgStream log(m_msgSvcProvider->msgSvc(), "Sequence"); 00060 log << MSG::INFO << "EventFilter: "; 00061 log << MSG::INFO << "\t Algo(s): "; 00062 for(std::vector<std::string>::iterator i = algoVector().begin(); 00063 i!=algoVector().end(); ++i){ 00064 log << MSG::INFO << *i << ' '; 00065 } 00066 log << endreq; 00067 } 00068 } // End of namespace bracket