ATLAS Offline Software
Loading...
Searching...
No Matches
TrigEgammaForwardFastCaloHypoTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <algorithm>
9#include "GaudiKernel/SystemOfUnits.h"
11
12
13using namespace TrigCompositeUtils;
14
15
17 const std::string& name,
18 const IInterface* parent )
19 : base_class( type, name, parent ),
20 m_decisionId( HLT::Identifier::fromToolName( name ) ) ,
21 m_lumiBlockMuTool("LumiBlockMuTool/LumiBlockMuTool")
22{
23 declareProperty("LumiBlockMuTool", m_lumiBlockMuTool, "Luminosity Tool" );
24}
25
26
28
29
30
32{
33
34 ATH_MSG_DEBUG( "AcceptAll = " << ( m_acceptAll==true ? "True" : "False" ) );
35
36 ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_decisionId );
37
38 if ( not m_monTool.name().empty() )
39 CHECK( m_monTool.retrieve() );
40
41 if (m_lumiBlockMuTool.retrieve().isFailure())
42 return StatusCode::FAILURE;
43
44 ATH_MSG_DEBUG( "Initialization completed successfully" );
45
46 return StatusCode::SUCCESS;
47}
48
49
50StatusCode TrigEgammaForwardFastCaloHypoTool::decide( std::vector<FastClusterInfo>& input ) const {
51 for ( auto& i: input ) {
52 if ( passed ( m_decisionId.numeric(), i.previousDecisionIDs ) ) {
53 if ( decide( i ) ) {
54 addDecisionID( m_decisionId, i.decision );
55 }
56 }
57 }
58 return StatusCode::SUCCESS;
59}
60
61
65
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Header file to be included by clients of the Monitored infrastructure.
TrigCompositeUtils::DecisionID numeric() const
numeric ID
TrigEgammaForwardFastCaloHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode decide(std::vector< ITrigEgammaForwardFastCaloHypoTool::FastClusterInfo > &input) const override
ToolHandle< GenericMonitoringTool > m_monTool
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.