#include <StepDecision.h>
Public Member Functions | |
StepDecision (const std::string &name, ISvcLocator *pSvcLocator) | |
~StepDecision () | |
virtual bool | isEnabled () const |
StatusCode | initialize () |
StatusCode | execute () |
StatusCode | finalize () |
StatusCode | initDecision (HltProcessor::Signature *) |
int | execDecision (const std::string &sigID) |
const std::string & | getBehaviour () const |
const std::string & | getContinue () const |
Private Attributes | |
HltStoreSvc * | m_HltStoreSvc |
std::string | m_behaviour |
std::string | m_continue |
std::map< std::string, HltProcessor::Signature * > | m_SigMap |
bool | m_isEnabled |
Definition at line 12 of file StepDecision.h.
StepDecision::StepDecision | ( | const std::string & | name, | |
ISvcLocator * | pSvcLocator | |||
) |
Definition at line 20 of file StepDecision.cxx.
References m_isEnabled.
00020 : 00021 Algorithm(name, pSvcLocator) { 00022 m_isEnabled = false; 00023 }
StepDecision::~StepDecision | ( | ) |
int StepDecision::execDecision | ( | const std::string & | sigID | ) |
Definition at line 49 of file StepDecision.cxx.
References HltProcessor::Signature::isCriteriaMatched(), m_behaviour, m_continue, m_SigMap, HltProcessor::Signature::midresult(), and HltProcessor::Signature::result().
Referenced by StepHandler::execute().
00049 { 00050 00051 MsgStream log( messageService(), name() ); 00052 //log << MSG::DEBUG << "Starting Execution StepDecision" << endreq; 00053 00054 Signature* sig = m_SigMap[sigID]; 00055 int decision = sig->isCriteriaMatched(); 00056 00057 m_continue =sig->midresult(); 00058 m_behaviour = sig->result(); 00059 //cout << "----"<< m_behaviour<< " "<<m_continue<<endl; 00060 return decision; 00061 }
StatusCode StepDecision::execute | ( | ) | [inline] |
StatusCode StepDecision::finalize | ( | ) | [inline] |
const std::string& StepDecision::getBehaviour | ( | ) | const [inline] |
Definition at line 26 of file StepDecision.h.
References m_behaviour.
Referenced by StepHandler::execute().
00026 { return m_behaviour; }
const std::string& StepDecision::getContinue | ( | ) | const [inline] |
Definition at line 27 of file StepDecision.h.
References m_continue.
Referenced by StepHandler::execute().
00027 { return m_continue; }
StatusCode StepDecision::initDecision | ( | HltProcessor::Signature * | ) |
Definition at line 30 of file StepDecision.cxx.
References Bes_Common::FATAL, Bes_Common::INFO, HltProcessor::Signature::label(), m_HltStoreSvc, m_SigMap, and deljobs::string.
Referenced by StepHandler::beginRun().
00030 { 00031 00032 MsgStream log( messageService(), name() ); 00033 00034 StatusCode sc = service( "HltStoreSvc", m_HltStoreSvc); 00035 if( sc.isFailure() ) { 00036 log << MSG::FATAL << name() << ": Unable to locate Service HltStoreSvc" << endreq; 00037 return sc; 00038 } 00039 00040 std::string sigID = signature->label(); 00041 m_SigMap[sigID] = signature; 00042 log << MSG::INFO << name() << " Find Signature with ID: " << sigID << endreq; 00043 00044 return StatusCode::SUCCESS; 00045 }
StatusCode StepDecision::initialize | ( | ) | [inline] |
virtual bool StepDecision::isEnabled | ( | ) | const [inline, virtual] |
std::string StepDecision::m_behaviour [private] |
std::string StepDecision::m_continue [private] |
HltStoreSvc* StepDecision::m_HltStoreSvc [private] |
bool StepDecision::m_isEnabled [private] |
std::map<std::string, HltProcessor::Signature*> StepDecision::m_SigMap [private] |