ATLAS Offline Software
Loading...
Searching...
No Matches
Ringer::CaloRingerElectronsReader Class Reference

#include <CaloRingerElectronsReader.h>

Inheritance diagram for Ringer::CaloRingerElectronsReader:
Collaboration diagram for Ringer::CaloRingerElectronsReader:

Public Member Functions

ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
CaloRingerElectronsReader ctors and dtors:
 CaloRingerElectronsReader (const std::string &type, const std::string &name, const IInterface *parent)
 Default constructor.
 ~CaloRingerElectronsReader ()
 Destructor.
virtual StatusCode initialize () override
 Tool main methods:
decoMap with them and their

read electrons and populates respective CaloRings.

virtual StatusCode execute () override
 execute method
virtual StatusCode finalize () override
 finalize method

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

PublicToolHandle< ICaloRingsBuilderm_crBuilder
 Tool CaloRingerInputReader props (python configurables):
Gaudi::Property< bool > m_builderAvailable
 Tool CaloRingerInputReader props (non configurables):If CaloRings builder is available.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode addSelectorDeco (const std::string &contName, const std::string &selName)
 Add decorations for a given selector.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared
SG::ReadHandleKey< xAOD::ElectronContainerm_inputElectronContainerKey
 Tool CaloRingerElectronsReader props (python configurables):
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer, char > m_selKeys
 Tool CaloRingerElectronsReader props (non configurables):
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer, unsigned int > m_isEMKeys
SG::WriteDecorHandleKeyArray< xAOD::ElectronContainer, float > m_lhoodKeys
BuildCaloRingsFctor< xAOD::ElectronContainer > * m_clRingsBuilderElectronFctor
 The CaloRings Builder functor:
Gaudi::Property< bool > m_selectorsAvailable
 Whether selectors are available.

Detailed Description

Definition at line 26 of file CaloRingerElectronsReader.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloRingerElectronsReader()

Ringer::CaloRingerElectronsReader::CaloRingerElectronsReader ( const std::string & type,
const std::string & name,
const IInterface * parent )

Default constructor.

Definition at line 17 of file CaloRingerElectronsReader.cxx.

19 :
20 CaloRingerInputReader(type, name, parent),
22{
23
24 // declare interface
25 declareInterface<ICaloRingerElectronsReader>(this);
26
27}
BuildCaloRingsFctor< xAOD::ElectronContainer > * m_clRingsBuilderElectronFctor
The CaloRings Builder functor:
CaloRingerInputReader(const std::string &type, const std::string &name, const ::IInterface *parent)
Default constructor.

◆ ~CaloRingerElectronsReader()

Ringer::CaloRingerElectronsReader::~CaloRingerElectronsReader ( )

Destructor.

Definition at line 30 of file CaloRingerElectronsReader.cxx.

31{
33}

Member Function Documentation

◆ addSelectorDeco()

StatusCode Ringer::CaloRingerElectronsReader::addSelectorDeco ( const std::string & contName,
const std::string & selName )
private

Add decorations for a given selector.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode Ringer::CaloRingerElectronsReader::execute ( )
overridevirtual

execute method

Reimplemented from Ringer::CaloRingerInputReader.

Definition at line 66 of file CaloRingerElectronsReader.cxx.

67{
68
69 ATH_MSG_DEBUG("Entering " << name() << " execute, m_builderAvailable = " << m_builderAvailable);
70
71 // Retrieve electrons
72 SG::ReadHandle<xAOD::ElectronContainer> electrons(m_inputElectronContainerKey);
73 // check is only used for serial running; remove when MT scheduler used
74 if(!electrons.isValid()) {
75 ATH_MSG_FATAL("Failed to retrieve "<< m_inputElectronContainerKey.key());
76 return StatusCode::FAILURE;
77 }
78
79 // Check if requested to run CaloRings Builder:
80 if ( m_builderAvailable ) {
81 ATH_CHECK( m_clRingsBuilderElectronFctor->prepareToLoopFor(electrons->size()) );
82
83 // loop over our particles:
84 for ( const auto *const electron : *electrons ){
86 }
87
88 m_clRingsBuilderElectronFctor->checkRelease();
89 }
90
91 return StatusCode::SUCCESS;
92}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
SG::ReadHandleKey< xAOD::ElectronContainer > m_inputElectronContainerKey
Tool CaloRingerElectronsReader props (python configurables):
Gaudi::Property< bool > m_builderAvailable
Tool CaloRingerInputReader props (non configurables):If CaloRings builder is available.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode Ringer::CaloRingerElectronsReader::finalize ( )
overridevirtual

finalize method

Reimplemented from Ringer::CaloRingerInputReader.

Definition at line 60 of file CaloRingerElectronsReader.cxx.

61{
62 return StatusCode::SUCCESS;
63}

◆ initialize()

StatusCode Ringer::CaloRingerElectronsReader::initialize ( )
overridevirtual

Tool main methods:

initialize method

Reimplemented from Ringer::CaloRingerInputReader.

Definition at line 36 of file CaloRingerElectronsReader.cxx.

37{
38
40
42
43 if ( m_builderAvailable ) {
44 // Initialize our fctor
46 new BuildCaloRingsFctor<xAOD::ElectronContainer>(
50 this
51 );
53 }
54
55 return StatusCode::SUCCESS;
56
57}
PublicToolHandle< ICaloRingsBuilder > m_crBuilder
Tool CaloRingerInputReader props (python configurables):
virtual StatusCode initialize() override
Tool main methods:
IMessageSvc * getMessageSvc(bool quiet=false)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & ICaloRingerElectronsReader::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 48 of file ICaloRingerElectronsReader.h.

49{
51}
static const InterfaceID IID_ICaloRingerElectronsReader("ICaloRingerElectronsReader", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_builderAvailable

Gaudi::Property<bool> Ringer::CaloRingerInputReader::m_builderAvailable
protectedinherited
Initial value:
{this,
"builderAvailable", false, "Whether builder tool is available."}

Tool CaloRingerInputReader props (non configurables):If CaloRings builder is available.

Definition at line 75 of file CaloRingerInputReader.h.

75 {this,
76 "builderAvailable", false, "Whether builder tool is available."};

◆ m_clRingsBuilderElectronFctor

BuildCaloRingsFctor<xAOD::ElectronContainer>* Ringer::CaloRingerElectronsReader::m_clRingsBuilderElectronFctor
private

The CaloRings Builder functor:

Definition at line 105 of file CaloRingerElectronsReader.h.

◆ m_crBuilder

PublicToolHandle<ICaloRingsBuilder> Ringer::CaloRingerInputReader::m_crBuilder
protectedinherited
Initial value:
{this,
"crBuilder", "", "The CaloRingsBuilder Tool"}

Tool CaloRingerInputReader props (python configurables):

Tool to build CaloRings.

Definition at line 68 of file CaloRingerInputReader.h.

68 {this,
69 "crBuilder", "", "The CaloRingsBuilder Tool"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_inputElectronContainerKey

SG::ReadHandleKey<xAOD::ElectronContainer> Ringer::CaloRingerElectronsReader::m_inputElectronContainerKey
private
Initial value:
{this,
"inputKey",
"Electrons",
"Name of the input electron container"}

Tool CaloRingerElectronsReader props (python configurables):

Electron selectors.

electron collection input name

Definition at line 84 of file CaloRingerElectronsReader.h.

84 {this,
85 "inputKey",
86 "Electrons",
87 "Name of the input electron container"};

◆ m_isEMKeys

SG::WriteDecorHandleKeyArray<xAOD::ElectronContainer, unsigned int> Ringer::CaloRingerElectronsReader::m_isEMKeys
private
Initial value:
{this,
"DoNotSet_isEMKeys", {}, "dummy property"}

Definition at line 98 of file CaloRingerElectronsReader.h.

98 {this,
99 "DoNotSet_isEMKeys", {}, "dummy property"};

◆ m_lhoodKeys

SG::WriteDecorHandleKeyArray<xAOD::ElectronContainer, float> Ringer::CaloRingerElectronsReader::m_lhoodKeys
private
Initial value:
{this,
"DoNotSet_lhoodKeys", {}, "dummy property"}

Definition at line 101 of file CaloRingerElectronsReader.h.

101 {this,
102 "DoNotSet_lhoodKeys", {}, "dummy property"};

◆ m_selectorsAvailable

Gaudi::Property<bool> Ringer::CaloRingerElectronsReader::m_selectorsAvailable
private
Initial value:
{this,
"selectorsAvailable", false, "Whether Selector Tool is available."}

Whether selectors are available.

Definition at line 108 of file CaloRingerElectronsReader.h.

108 {this,
109 "selectorsAvailable", false, "Whether Selector Tool is available."};

◆ m_selKeys

SG::WriteDecorHandleKeyArray<xAOD::ElectronContainer, char> Ringer::CaloRingerElectronsReader::m_selKeys
private
Initial value:
{this,
"DoNotSet_selKeys", {}, "dummy property"}

Tool CaloRingerElectronsReader props (non configurables):

The WriteDecorHandleKeyArrays for the selectors. Need to be properties for dependency propagation.

Definition at line 95 of file CaloRingerElectronsReader.h.

95 {this,
96 "DoNotSet_selKeys", {}, "dummy property"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: