ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
DerivationFramework::TruthEDDecorator Class Reference

#include <TruthEDDecorator.h>

Inheritance diagram for DerivationFramework::TruthEDDecorator:
Collaboration diagram for DerivationFramework::TruthEDDecorator:

Public Member Functions

 TruthEDDecorator (const std::string &t, const std::string &n, const IInterface *p)
 
 ~TruthEDDecorator ()
 
virtual StatusCode addBranches (const EventContext &ctx) const override final
 
StatusCode initialize () override final
 

Private Attributes

Gaudi::Property< std::string > m_ed_suffix {this, "DecorationSuffix", "_rho"}
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "EventInfoName", "EventInfo", "EventInfo key"}
 
SG::ReadHandleKeyArray< xAOD::EventShapem_eventShapeKeys {this, "EventShapeKeys", {}, "Truth EventShape keys"}
 
SG::WriteDecorHandleKeyArray< xAOD::EventInfom_eventDensityDecorKeys {this, "EnergyDensityDecorKeys", {}, "Truth energy density decoration keys"}
 

Detailed Description

Definition at line 32 of file TruthEDDecorator.h.

Constructor & Destructor Documentation

◆ TruthEDDecorator()

DerivationFramework::TruthEDDecorator::TruthEDDecorator ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 10 of file TruthEDDecorator.cxx.

11  : base_class(t,n,p)
12  {
13  }

◆ ~TruthEDDecorator()

DerivationFramework::TruthEDDecorator::~TruthEDDecorator ( )

Definition at line 16 of file TruthEDDecorator.cxx.

16 {}

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::TruthEDDecorator::addBranches ( const EventContext &  ctx) const
finaloverridevirtual

Definition at line 32 of file TruthEDDecorator.cxx.

32  {
33  ATH_MSG_VERBOSE("addBranches()");
34 
35 
37  if (!eventInfo.isValid()) {
38  ATH_MSG_ERROR("Couldn't retrieve " << m_eventInfoKey);
39  return StatusCode::FAILURE;
40  }
41 
42  for (size_t i=0;i<m_eventShapeKeys.size();++i){
43  // Get the event shapes from which we'll get the densities
45  if (!eventShape.isValid()) {
46  ATH_MSG_ERROR ("Could not retrieve " << m_eventShapeKeys[i]);
47  return StatusCode::FAILURE;
48  }
49 
50  // Decorate the densities onto the event info
52  dec_eventDensity(*eventInfo) = eventShape->getDensity(xAOD::EventShape::Density);
53  }
54 
55  return StatusCode::SUCCESS;
56  }

◆ initialize()

StatusCode DerivationFramework::TruthEDDecorator::initialize ( )
finaloverride

Definition at line 19 of file TruthEDDecorator.cxx.

19  {
20 
22  ATH_CHECK(m_eventShapeKeys.initialize());
23  for (size_t i=0;i<m_eventShapeKeys.size();++i){
25  }
26  ATH_CHECK(m_eventDensityDecorKeys.initialize());
27 
28  return StatusCode::SUCCESS;
29  }

Member Data Documentation

◆ m_ed_suffix

Gaudi::Property<std::string> DerivationFramework::TruthEDDecorator::m_ed_suffix {this, "DecorationSuffix", "_rho"}
private

Definition at line 42 of file TruthEDDecorator.h.

◆ m_eventDensityDecorKeys

SG::WriteDecorHandleKeyArray<xAOD::EventInfo> DerivationFramework::TruthEDDecorator::m_eventDensityDecorKeys {this, "EnergyDensityDecorKeys", {}, "Truth energy density decoration keys"}
private

Definition at line 46 of file TruthEDDecorator.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> DerivationFramework::TruthEDDecorator::m_eventInfoKey {this, "EventInfoName", "EventInfo", "EventInfo key"}
private

Definition at line 44 of file TruthEDDecorator.h.

◆ m_eventShapeKeys

SG::ReadHandleKeyArray<xAOD::EventShape> DerivationFramework::TruthEDDecorator::m_eventShapeKeys {this, "EventShapeKeys", {}, "Truth EventShape keys"}
private

Definition at line 45 of file TruthEDDecorator.h.


The documentation for this class was generated from the following files:
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
DerivationFramework::TruthEDDecorator::m_eventShapeKeys
SG::ReadHandleKeyArray< xAOD::EventShape > m_eventShapeKeys
Definition: TruthEDDecorator.h:45
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAOD::EventShape_v1::Density
@ Density
Definition: EventShape_v1.h:47
DerivationFramework::TruthEDDecorator::m_ed_suffix
Gaudi::Property< std::string > m_ed_suffix
Definition: TruthEDDecorator.h:42
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:727
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DerivationFramework::TruthEDDecorator::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: TruthEDDecorator.h:44
DerivationFramework::TruthEDDecorator::m_eventDensityDecorKeys
SG::WriteDecorHandleKeyArray< xAOD::EventInfo > m_eventDensityDecorKeys
Definition: TruthEDDecorator.h:46