ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DerivationFramework::GainDecorator Class Reference

#include <GainDecorator.h>

Inheritance diagram for DerivationFramework::GainDecorator:
Collaboration diagram for DerivationFramework::GainDecorator:

Classes

struct  calculation
 

Public Member Functions

 GainDecorator (const std::string &t, const std::string &n, const IInterface *p)
 
 ~GainDecorator ()
 
StatusCode initialize ()
 
StatusCode finalize ()
 
virtual StatusCode addBranches () const
 Pass the thinning service
More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static int getLayer (const CaloCell *cell)
 
static const InterfaceID & interfaceID ()
 AlgTool interface methods. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

calculation decorateObject (const xAOD::Egamma *&egamma) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::EgammaContainerm_SGKey_photons { this, "SGKey_photons", "", "SG key of photon container" }
 
SG::ReadHandleKey< xAOD::EgammaContainerm_SGKey_electrons
 
std::string m_decorationPattern
 
std::map< int, std::string > m_gainNames
 
std::vector< unsigned int > m_layers
 
std::map< std::pair< int, int >, std::string > m_names_E
 
std::map< std::pair< int, int >, std::string > m_names_rnoW
 
std::map< std::pair< int, int >, std::string > m_names_nCells
 
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainerm_SGKey_photons_decorations
 
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainerm_SGKey_electrons_decorations
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 27 of file GainDecorator.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

◆ GainDecorator()

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

Definition at line 22 of file GainDecorator.cxx.

25  : AthAlgTool(t, n, p)
26 {
27  declareInterface<DerivationFramework::IAugmentationTool>(this);
28  declareProperty("decoration_pattern",
29  m_decorationPattern = "{info}_Lr{layer}_{gain}G");
30  declareProperty("gain_names",
31  m_gainNames = { { CaloGain::LARHIGHGAIN, "Hi" },
32  { CaloGain::LARMEDIUMGAIN, "Med" },
33  { CaloGain::LARLOWGAIN, "Low" } });
34  declareProperty("layers", m_layers = { 0, 1, 2, 3 });
35 
36  // Define the names for the decorations
37  for (const auto& kv : m_gainNames)
38  for (const auto layer : m_layers) {
39  std::string name = m_decorationPattern;
40  name.replace(name.find("{layer}"),
41  std::string("{layer}").size(),
43  name.replace(
44  name.find("{gain}"), std::string("{gain}").size(), kv.second);
45  std::string name_E(name), name_rnoW(name), name_nCells(name);
46  name_E.replace(name_E.find("{info}"), std::string("{info}").size(), "E");
47  name_rnoW.replace(name_rnoW.find("{info}"), std::string("{info}").size(), "rnoW");
48  name_nCells.replace(
49  name_nCells.find("{info}"), std::string("{info}").size(), "nCells");
50 
51  std::pair<int, int> key(kv.first, layer);
52  m_names_E[key] = name_E;
53  m_names_rnoW[key] = name_rnoW;
54  m_names_nCells[key] = name_nCells;
55  }
56 
57  for (const auto& kv : m_names_E) {
58  ATH_MSG_DEBUG("Decorating (layer, gain): " << kv.first << " " << kv.second);
59  }
60  for (const auto& kv : m_names_nCells) {
61  ATH_MSG_DEBUG("Decorating (layer, gain): " << kv.first << " " << kv.second);
62  }
63 }

◆ ~GainDecorator()

DerivationFramework::GainDecorator::~GainDecorator ( )
default

Member Function Documentation

◆ addBranches()

StatusCode DerivationFramework::GainDecorator::addBranches ( ) const
virtual

Pass the thinning service

Implements DerivationFramework::IAugmentationTool.

Definition at line 130 of file GainDecorator.cxx.

131 {
132  const EventContext& ctx = Gaudi::Hive::currentContext();
133 
134  // Photon decorations
135 
136  if (!m_SGKey_photons.key().empty()) {
137 
138  // Retrieve photon container
140  const xAOD::EgammaContainer* importedPhotons = photonContainer.ptr();
141 
142  // Setup vectors of photon decorations
143  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
144  decorations_E;
145  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
146  decorations_rnoW;
147  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>>
148  decorations_nCells;
149  int i(0);
150  for (const auto& kv : m_gainNames) {
151  for (const auto layer : m_layers) {
152  std::pair<int, int> key(kv.first, layer);
153  decorations_E.emplace_back(
154 
155  m_SGKey_photons_decorations[i * 3], ctx);
156  decorations_rnoW.emplace_back(
157 
158  m_SGKey_photons_decorations[i * 3 + 1], ctx);
159  decorations_nCells.emplace_back(
160 
161  m_SGKey_photons_decorations[i * 3 + 2], ctx);
162  i++;
163  }
164  }
165 
166  // Decorate photons
167  for (const auto* photon : *importedPhotons) {
170  i = 0;
171  for (const auto& kv : m_gainNames) {
172  for (const auto layer : m_layers) {
173  std::pair<int, int> key(kv.first, layer);
174  decorations_E[i](*photon) = res.E[key];
175  decorations_rnoW[i](*photon) =
176  res.EnoW[key] != 0 ? res.E[key]/res.EnoW[key] : 1;
177  decorations_nCells[i](*photon) = res.nCells[key];
178  i++;
179  }
180  }
181  }
182  }
183 
184  // Electron decorations
185 
186  if (!m_SGKey_electrons.key().empty()) {
187 
188  // Retrieve electron container
190  ctx);
191  const xAOD::EgammaContainer* importedElectrons = electronContainer.ptr();
192 
193  // Setup vectors of electron decorations
194  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
195  decorations_E;
196  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, float>>
197  decorations_rnoW;
198  std::vector<SG::WriteDecorHandle<xAOD::EgammaContainer, char>>
199  decorations_nCells;
200  int i(0);
201  for (const auto& kv : m_gainNames) {
202  for (const auto layer : m_layers) {
203  std::pair<int, int> key(kv.first, layer);
204  decorations_E.emplace_back(
205 
206  m_SGKey_electrons_decorations[i * 3], ctx);
207  decorations_rnoW.emplace_back(
208 
209  m_SGKey_electrons_decorations[i * 3 + 1], ctx);
210  decorations_nCells.emplace_back(
211 
212  m_SGKey_electrons_decorations[i * 3 + 2], ctx);
213  i++;
214  }
215  }
216 
217  // Decorate electrons
218  for (const auto* electron : *importedElectrons) {
221  i = 0;
222  for (const auto& kv : m_gainNames) {
223  for (const auto layer : m_layers) {
224  std::pair<int, int> key(kv.first, layer);
225  decorations_E[i](*electron) = res.E[key];
226  decorations_rnoW[i](*electron) =
227  res.EnoW[key] != 0 ? res.E[key]/res.EnoW[key] : 1;
228  decorations_nCells[i](*electron) = res.nCells[key];
229  i++;
230  }
231  }
232  }
233  }
234 
235  return StatusCode::SUCCESS;
236 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ decorateObject()

DerivationFramework::GainDecorator::calculation DerivationFramework::GainDecorator::decorateObject ( const xAOD::Egamma *&  egamma) const
private

Definition at line 239 of file GainDecorator.cxx.

241 {
242 
243  // Compute energy and number of cells per gain per layer
244  // Set the initial values to 0 (needed?)
246  for (const auto& kv : m_names_E) {
247  result.E[kv.first] = 0.;
248  result.EnoW[kv.first] = 0.;
249  result.nCells[kv.first] = 0;
250  }
251 
252  // Skip the computation for missing cell links (like topo-seeded photons)
253  // but decorate anyway
254  const CaloClusterCellLink* cellLinks =
255  egamma->caloCluster() ? egamma->caloCluster()->getCellLinks() : nullptr;
256  if (cellLinks) {
258  itE = cellLinks->end();
259  for (; it != itE; ++it) {
260  const CaloCell *cell = *it;
261  if (!cell)
262  continue;
263  std::pair<int, int> key(static_cast<int>(cell->gain()), getLayer(cell));
264  // Increment the corresponding entry (not important if it is not
265  // initialised)
266  double weight = it.weight();
267  result.E[key] += cell->energy()*weight;
268  result.EnoW[key] += cell->energy();
269  result.nCells[key]++;
270  }
271  }
272 
273  return result;
274 }

◆ 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.

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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 DerivationFramework::GainDecorator::finalize ( )

Definition at line 122 of file GainDecorator.cxx.

123 {
124 
125  return StatusCode::SUCCESS;
126 }

◆ getLayer()

int DerivationFramework::GainDecorator::getLayer ( const CaloCell cell)
static

Definition at line 277 of file GainDecorator.cxx.

278 {
279  int sampling =
280  (cell && cell->caloDDE() ? cell->caloDDE()->getSampling() : -1);
281  if (sampling == CaloSampling::PreSamplerB ||
282  sampling == CaloSampling::PreSamplerE)
283  return 0;
284  if (sampling == CaloSampling::EMB1 || sampling == CaloSampling::EME1)
285  return 1;
286  if (sampling == CaloSampling::EMB2 || sampling == CaloSampling::EME2)
287  return 2;
288  if (sampling == CaloSampling::EMB3 || sampling == CaloSampling::EME3)
289  return 3;
290  return -1;
291 }

◆ initialize()

StatusCode DerivationFramework::GainDecorator::initialize ( )

Definition at line 70 of file GainDecorator.cxx.

71 {
72  ATH_MSG_VERBOSE("initialize() ...");
73 
74  if (m_SGKey_photons.key().empty() && m_SGKey_electrons.key().empty()) {
75  ATH_MSG_FATAL("No e-gamma collection provided for thinning. At least one "
76  "egamma collection (photons/electrons) must be provided!");
77  return StatusCode::FAILURE;
78  }
79 
80  if (!m_SGKey_electrons.key().empty()) {
81  ATH_MSG_DEBUG("Using " << m_SGKey_electrons << " for electrons");
82  ATH_CHECK(m_SGKey_electrons.initialize());
83 
84  const std::string containerKey = m_SGKey_electrons.key();
85  for (const auto& kv : m_gainNames) {
86  for (const auto layer : m_layers) {
87  std::pair<int, int> key(kv.first, layer);
88  m_SGKey_electrons_decorations.emplace_back(containerKey + "." +
89  m_names_E[key]);
90  m_SGKey_electrons_decorations.emplace_back(containerKey + "." +
91  m_names_rnoW[key]);
92  m_SGKey_electrons_decorations.emplace_back(containerKey + "." +
94  }
95  }
97  }
98 
99  if (!m_SGKey_photons.key().empty()) {
100  ATH_MSG_DEBUG("Using " << m_SGKey_photons << " for photons");
101  ATH_CHECK(m_SGKey_photons.initialize());
102 
103  const std::string containerKey = m_SGKey_photons.key();
104  for (const auto& kv : m_gainNames) {
105  for (const auto layer : m_layers) {
106  std::pair<int, int> key(kv.first, layer);
107  m_SGKey_photons_decorations.emplace_back(containerKey + "." +
108  m_names_E[key]);
109  m_SGKey_photons_decorations.emplace_back(containerKey + "." +
110  m_names_rnoW[key]);
111  m_SGKey_photons_decorations.emplace_back(containerKey + "." +
113  }
114  }
116  }
117 
118  return StatusCode::SUCCESS;
119 }

◆ 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()

static const InterfaceID& DerivationFramework::IAugmentationTool::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 31 of file IAugmentationTool.h.

31 { return IID_IAugmentationTool; }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_decorationPattern

std::string DerivationFramework::GainDecorator::m_decorationPattern
private

Definition at line 59 of file GainDecorator.h.

◆ 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_gainNames

std::map<int, std::string> DerivationFramework::GainDecorator::m_gainNames
private

Definition at line 60 of file GainDecorator.h.

◆ m_layers

std::vector<unsigned int> DerivationFramework::GainDecorator::m_layers
private

Definition at line 61 of file GainDecorator.h.

◆ m_names_E

std::map<std::pair<int, int>, std::string> DerivationFramework::GainDecorator::m_names_E
private

Definition at line 64 of file GainDecorator.h.

◆ m_names_nCells

std::map<std::pair<int, int>, std::string> DerivationFramework::GainDecorator::m_names_nCells
private

Definition at line 66 of file GainDecorator.h.

◆ m_names_rnoW

std::map<std::pair<int, int>, std::string> DerivationFramework::GainDecorator::m_names_rnoW
private

Definition at line 65 of file GainDecorator.h.

◆ m_SGKey_electrons

SG::ReadHandleKey<xAOD::EgammaContainer> DerivationFramework::GainDecorator::m_SGKey_electrons
private
Initial value:
{
this,
"SGKey_electrons",
"",
"SG key of electron container"
}

Definition at line 52 of file GainDecorator.h.

◆ m_SGKey_electrons_decorations

SG::WriteDecorHandleKeyArray<xAOD::EgammaContainer> DerivationFramework::GainDecorator::m_SGKey_electrons_decorations
private
Initial value:
{
this,
"SGKey_electrons_decorations_noConf",
{},
"SG keys for electrons decorations not really configurable"
}

Definition at line 77 of file GainDecorator.h.

◆ m_SGKey_photons

SG::ReadHandleKey<xAOD::EgammaContainer> DerivationFramework::GainDecorator::m_SGKey_photons { this, "SGKey_photons", "", "SG key of photon container" }
private

Definition at line 50 of file GainDecorator.h.

◆ m_SGKey_photons_decorations

SG::WriteDecorHandleKeyArray<xAOD::EgammaContainer> DerivationFramework::GainDecorator::m_SGKey_photons_decorations
private
Initial value:
{
this,
"SGKey_photons_decorations_noConf",
{},
"SG keys for photon decorations not really configurable"
}

Definition at line 69 of file GainDecorator.h.

◆ 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:
electronContainer
xAOD::ElectronContainer * electronContainer
Definition: TrigGlobEffCorrValidation.cxx:187
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
get_generator_info.result
result
Definition: get_generator_info.py:21
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DerivationFramework::GainDecorator::m_SGKey_photons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_photons_decorations
Definition: GainDecorator.h:69
DerivationFramework::GainDecorator::m_SGKey_electrons_decorations
SG::WriteDecorHandleKeyArray< xAOD::EgammaContainer > m_SGKey_electrons_decorations
Definition: GainDecorator.h:77
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
skel.it
it
Definition: skel.GENtoEVGEN.py:423
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
DerivationFramework::GainDecorator::m_names_E
std::map< std::pair< int, int >, std::string > m_names_E
Definition: GainDecorator.h:64
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TruthTest.itE
itE
Definition: TruthTest.py:25
egamma
Definition: egamma.h:58
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
DerivationFramework::GainDecorator::calculation
Definition: GainDecorator.h:42
DerivationFramework::GainDecorator::m_names_rnoW
std::map< std::pair< int, int >, std::string > m_names_rnoW
Definition: GainDecorator.h:65
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DerivationFramework::GainDecorator::getLayer
static int getLayer(const CaloCell *cell)
Definition: GainDecorator.cxx:277
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DerivationFramework::GainDecorator::m_decorationPattern
std::string m_decorationPattern
Definition: GainDecorator.h:59
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
lumiFormat.i
int i
Definition: lumiFormat.py:92
DerivationFramework::GainDecorator::m_SGKey_photons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_photons
Definition: GainDecorator.h:50
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
photonContainer
xAOD::PhotonContainer * photonContainer
Definition: TrigGlobEffCorrValidation.cxx:189
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
DerivationFramework::GainDecorator::m_names_nCells
std::map< std::pair< int, int >, std::string > m_names_nCells
Definition: GainDecorator.h:66
DerivationFramework::GainDecorator::m_gainNames
std::map< int, std::string > m_gainNames
Definition: GainDecorator.h:60
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
CaloGain::LARMEDIUMGAIN
@ LARMEDIUMGAIN
Definition: CaloGain.h:18
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
DerivationFramework::GainDecorator::m_SGKey_electrons
SG::ReadHandleKey< xAOD::EgammaContainer > m_SGKey_electrons
Definition: GainDecorator.h:52
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
CaloGain::LARLOWGAIN
@ LARLOWGAIN
Definition: CaloGain.h:18
DerivationFramework::GainDecorator::m_layers
std::vector< unsigned int > m_layers
Definition: GainDecorator.h:61
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
DerivationFramework::GainDecorator::decorateObject
calculation decorateObject(const xAOD::Egamma *&egamma) const
Definition: GainDecorator.cxx:239
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
fitman.k
k
Definition: fitman.py:528
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37