ATLAS Offline Software
Loading...
Searching...
No Matches
GRLSelectorAlg.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// GoodRunsLists includes
11
12GRLSelectorAlg::GRLSelectorAlg( const std::string& name, ISvcLocator* pSvcLocator ) : AnaAlgorithm( name, pSvcLocator )
13 , m_grlTool("GoodRunsListSelectionTool", this)
14{
15
16 declareProperty( "Tool", m_grlTool, "The GoodRunsListSelectionTool" );
17
18}
19
20
22
23
25 //ATH_MSG_INFO ("Initializing " << name() << "...");
26 ANA_CHECK( m_grlTool.retrieve() );
27 ANA_CHECK( m_filterParams.initialize() );
28 ANA_CHECK( m_grlKey.initialize() );
29 return StatusCode::SUCCESS;
30}
31
33 //ATH_MSG_INFO ("Finalizing " << name() << "...");
34 ANA_MSG_INFO (m_filterParams.summary());
35 return StatusCode::SUCCESS;
36}
37
40
41 const xAOD::EventInfo* evtInfo = 0;
42 ANA_CHECK( evtStore()->retrieve( evtInfo, "EventInfo" ) );
43
45
46 const bool isSelected = m_grlTool->passRunLB(*evtInfo);
47 dec_isGRLDecorator(*evtInfo) = isSelected;
48 if(!isSelected) return StatusCode::SUCCESS;
49
50 filter.setPassed (true);
51
52 return StatusCode::SUCCESS;
53}
Handle class for adding a decoration to an object.
macros for messaging and checking status codes
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
a guard class for use with ref FilterReporterParams
GRLSelectorAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize()
virtual StatusCode finalize()
virtual ~GRLSelectorAlg()
FilterReporterParams m_filterParams
Gaudi::Property< bool > m_noFilter
virtual StatusCode execute()
ToolHandle< IGoodRunsListSelectionTool > m_grlTool
SG::WriteDecorHandleKey< xAOD::EventInfo > m_grlKey
Handle class for adding a decoration to an object.
EventInfo_v1 EventInfo
Definition of the latest event info version.