BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
StepDecision.cxx
Go to the documentation of this file.
1/********************************************************************
2NAME: StepDecision.cxx
3********************************************************************/
4// INCLUDE HEADER FILES:
6// INCLUDE GAUDI HEADER FILES:
7#include "GaudiKernel/ISvcLocator.h"
8#include "GaudiKernel/MsgStream.h"
9#include "GaudiKernel/Property.h"
10#include "GaudiKernel/StatusCode.h"
11
12#include <algorithm>
13#include <string>
14#include <vector>
15// END OF HEADER FILES INCLUDE
17
18////////////////////////////////////////////////////////////////
19// CONSTRUCTOR:
21StepDecision::StepDecision( const std::string& name, ISvcLocator* pSvcLocator )
22 : Algorithm( name, pSvcLocator ) {
23 m_isEnabled = false;
24}
25
26// DESTRUCTOR:
28
29/////////////////////////////////////////////////////////////////
30// INITIALIZE METHOD:
31StatusCode StepDecision::initDecision( Signature* signature ) {
32
33 MsgStream log( msgSvc(), name() );
34
35 StatusCode sc = service( "HltStoreSvc", m_HltStoreSvc );
36 if ( sc.isFailure() )
37 {
38 log << MSG::FATAL << name() << ": Unable to locate Service HltStoreSvc" << endmsg;
39 return sc;
40 }
41
42 std::string sigID = signature->label();
43 m_SigMap[sigID] = signature;
44 log << MSG::INFO << name() << " Find Signature with ID: " << sigID << endmsg;
45
46 return StatusCode::SUCCESS;
47}
48
49/////////////////////////////////////////////////////////////////
50// MY EXECUTE METHOD:
51int StepDecision::execDecision( const std::string& sigID ) {
52
53 MsgStream log( msgSvc(), name() );
54 // log << MSG::DEBUG << "Starting Execution StepDecision" << endmsg;
55
56 Signature* sig = m_SigMap[sigID];
57 int decision = sig->isCriteriaMatched();
58
59 m_continue = sig->midresult();
60 m_behaviour = sig->result();
61 // cout << "----"<< m_behaviour<< " "<<m_continue<<endl;
62 return decision;
63}
DECLARE_COMPONENT(BesBdkRc)
IMessageSvc * msgSvc()
const std::string & result() const
Definition Signature.h:41
const std::string & midresult() const
Definition Signature.h:42
int isCriteriaMatched()
For trigger.
Definition Signature.cxx:81
std::string label() const
Definition Signature.cxx:79
int execDecision(const std::string &sigID)
StatusCode initDecision(HltProcessor::Signature *)
StepDecision(const std::string &name, ISvcLocator *pSvcLocator)