ATLAS Offline Software
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 
13 using 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 
50 StatusCode 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 
63  return true;
64 }
65 
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
TrigEgammaForwardFastCaloHypoTool.h
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
TrigEgammaForwardFastCaloHypoTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigEgammaForwardFastCaloHypoTool.h:54
TrigEgammaForwardFastCaloHypoTool::decide
virtual StatusCode decide(std::vector< ITrigEgammaForwardFastCaloHypoTool::FastClusterInfo > &input) const override
TrigEgammaForwardFastCaloHypoTool::initialize
virtual StatusCode initialize() override
Definition: TrigEgammaForwardFastCaloHypoTool.cxx:31
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
TrigEgammaForwardFastCaloHypoTool::TrigEgammaForwardFastCaloHypoTool
TrigEgammaForwardFastCaloHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigEgammaForwardFastCaloHypoTool.cxx:16
ITrigEgammaForwardFastCaloHypoTool::FastClusterInfo
Definition: ITrigEgammaForwardFastCaloHypoTool.h:28
TrigEgammaForwardFastCaloHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigEgammaForwardFastCaloHypoTool.h:50
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Combinators.h
TrigEgammaForwardFastCaloHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigEgammaForwardFastCaloHypoTool.h:45
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HLTIdentifier.h
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
TrigEgammaForwardFastCaloHypoTool::m_lumiBlockMuTool
ToolHandle< ILumiBlockMuTool > m_lumiBlockMuTool
Definition: TrigEgammaForwardFastCaloHypoTool.h:46
TrigEgammaForwardFastCaloHypoTool::~TrigEgammaForwardFastCaloHypoTool
virtual ~TrigEgammaForwardFastCaloHypoTool()
Definition: TrigEgammaForwardFastCaloHypoTool.cxx:27
Identifier
Definition: IdentifierFieldParser.cxx:14