BOSS 7.1.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/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:
20DECLARE_COMPONENT(StepDecision)
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( messageService(), name() );
34
35 StatusCode sc = service( "HltStoreSvc", m_HltStoreSvc);
36 if( sc.isFailure() ) {
37 log << MSG::FATAL << name() << ": Unable to locate Service HltStoreSvc" << endreq;
38 return sc;
39 }
40
41 std::string sigID = signature->label();
42 m_SigMap[sigID] = signature;
43 log << MSG::INFO << name() << " Find Signature with ID: " << sigID << endreq;
44
45 return StatusCode::SUCCESS;
46}
47
48/////////////////////////////////////////////////////////////////
49// MY EXECUTE METHOD:
50int StepDecision::execDecision(const std::string& sigID) {
51
52 MsgStream log( messageService(), name() );
53 //log << MSG::DEBUG << "Starting Execution StepDecision" << endreq;
54
55 Signature* sig = m_SigMap[sigID];
56 int decision = sig->isCriteriaMatched();
57
58 m_continue =sig->midresult();
59 m_behaviour = sig->result();
60 //cout << "----"<< m_behaviour<< " "<<m_continue<<endl;
61 return decision;
62}
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 *)