CGEM BOSS 6.6.5.g
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/MsgStream.h"
8#include "GaudiKernel/Property.h"
9#include "GaudiKernel/ISvcLocator.h"
10#include "GaudiKernel/StatusCode.h"
11
12#include <string>
13#include <vector>
14#include <algorithm>
15// END OF HEADER FILES INCLUDE
17
18////////////////////////////////////////////////////////////////
19// CONSTRUCTOR:
20StepDecision::StepDecision(const std::string& name, ISvcLocator* pSvcLocator):
21 Algorithm(name, pSvcLocator) {
22 m_isEnabled = false;
23}
24
25// DESTRUCTOR:
27
28/////////////////////////////////////////////////////////////////
29// INITIALIZE METHOD:
30StatusCode StepDecision::initDecision(Signature* signature) {
31
32 MsgStream log( messageService(), name() );
33
34 StatusCode sc = service( "HltStoreSvc", m_HltStoreSvc);
35 if( sc.isFailure() ) {
36 log << MSG::FATAL << name() << ": Unable to locate Service HltStoreSvc" << endreq;
37 return sc;
38 }
39
40 std::string sigID = signature->label();
41 m_SigMap[sigID] = signature;
42 log << MSG::INFO << name() << " Find Signature with ID: " << sigID << endreq;
43
44 return StatusCode::SUCCESS;
45}
46
47/////////////////////////////////////////////////////////////////
48// MY EXECUTE METHOD:
49int StepDecision::execDecision(const std::string& sigID) {
50
51 MsgStream log( messageService(), name() );
52 //log << MSG::DEBUG << "Starting Execution StepDecision" << endreq;
53
54 Signature* sig = m_SigMap[sigID];
55 int decision = sig->isCriteriaMatched();
56
57 m_continue =sig->midresult();
58 m_behaviour = sig->result();
59 //cout << "----"<< m_behaviour<< " "<<m_continue<<endl;
60 return decision;
61}
const std::string & result() const
Definition: Signature.h:42
const std::string & midresult() const
Definition: Signature.h:45
int isCriteriaMatched()
For trigger.
Definition: Signature.cxx:117
std::string label() const
Definition: Signature.cxx:113
int execDecision(const std::string &sigID)
StatusCode initDecision(HltProcessor::Signature *)
StepDecision(const std::string &name, ISvcLocator *pSvcLocator)