ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LArMCSymCondAlg Class Reference

#include <LArMCSymCondAlg.h>

Inheritance diagram for LArMCSymCondAlg:
Collaboration diagram for LArMCSymCondAlg:

Public Member Functions

 ~LArMCSymCondAlg ()=default
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
 AthAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters: More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. 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 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
 

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

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::ReadCondHandleKey< LArOnOffIdMappingm_readKey {this,"ReadKey","LArOnOffIdMap"}
 
SG::WriteCondHandleKey< LArMCSymm_writeKey {this,"WriteKey","LArMCSym"}
 
DataObjIDColl m_extendedExtraObjects
 
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 17 of file LArMCSymCondAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~LArMCSymCondAlg()

LArMCSymCondAlg::~LArMCSymCondAlg ( )
default

Member Function Documentation

◆ AthAlgorithm()

AthAlgorithm::AthAlgorithm

Constructor with parameters:

Definition at line 51 of file AthAlgorithm.cxx.

25  :
27 {
28  // Set up to run AthAlgorithmDHUpdate in sysInitialize before
29  // merging dependency lists. This extends the output dependency
30  // list with any symlinks implied by inheritance relations.
31  m_updateDataHandles =
32  std::make_unique<AthenaBaseComps::AthAlgorithmDHUpdate>
34  std::move (m_updateDataHandles));
35 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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; }

◆ execute()

StatusCode LArMCSymCondAlg::execute ( )

Definition at line 24 of file LArMCSymCondAlg.cxx.

24  {
25 
27 
28  if (writeHandle.isValid()) {
29  ATH_MSG_DEBUG("Found valid write handle");
30  return StatusCode::SUCCESS;
31  }
32 
34  const LArOnOffIdMapping* cabling{*readHandle};
35 
36  if (cabling==nullptr) {
37  ATH_MSG_ERROR("Failed to retrieve CondAttributeListCollection with key " << m_readKey.key());
38  return StatusCode::FAILURE;
39  }
40  writeHandle.addDependency(readHandle);
41 
42  const LArOnlineID* larOnlineID=nullptr;
43  const CaloCell_ID* caloCellID=nullptr;
44  const LArEM_ID* lar_em_id=nullptr;
45  const LArHEC_ID* lar_hec_id=nullptr;
46  const LArFCAL_ID* lar_fcal_id=nullptr;
47 
48 
49  ATH_CHECK(detStore()->retrieve(lar_em_id,"LArEM_ID"));
50  ATH_CHECK(detStore()->retrieve(lar_hec_id,"LArHEC_ID"));
51  ATH_CHECK(detStore()->retrieve(lar_fcal_id,"LArFCAL_ID"));
52  ATH_CHECK(detStore()->retrieve(caloCellID,"CaloCell_ID"));
53  ATH_CHECK(detStore()->retrieve(larOnlineID,"LArOnlineID"));
54 
55  const unsigned ncellem=lar_em_id->channel_hash_max();
56  const unsigned ncellhec=lar_hec_id->channel_hash_max();
57  const unsigned ncellfcal=lar_fcal_id->channel_hash_max();
58 
59  const unsigned larHashMax=ncellem+ncellhec+ncellfcal;
60 
61  const unsigned onlHashMax=larOnlineID->channelHashMax();
62 
63  std::vector<HWIdentifier> oflHashtoSymOnl(larHashMax);
64  std::vector<HWIdentifier> onlHashtoSymOnl(onlHashMax);
65 
66  std::set<HWIdentifier> symIds;
67 
68  ATH_MSG_DEBUG("Start looping over EM calo cells");
69  for ( unsigned int idhash=0; idhash<ncellem;idhash++){
70  const Identifier id=lar_em_id->channel_id (idhash);
71  const HWIdentifier hwid=cabling->createSignalChannelID(id);
72  const IdentifierHash hwid_hash=larOnlineID->channel_Hash(hwid);
73  const int barrel_ec = abs( lar_em_id->barrel_ec(id) ) ;
74  const int sampling = lar_em_id->sampling(id);
75  const int region = lar_em_id->region(id);
76  const Identifier regId = lar_em_id->region_id(barrel_ec, sampling, region );
77  const int eta = lar_em_id->eta(id);
78  const int phi = lar_em_id->phi_min(regId);
79  const Identifier symOffId = lar_em_id->channel_id(barrel_ec, sampling, region, eta, phi );
80  const HWIdentifier symOnId = cabling->createSignalChannelID(symOffId);
81  const IdentifierHash idHash = lar_em_id->channel_hash(id);
82  oflHashtoSymOnl[idHash] = symOnId;
83  onlHashtoSymOnl[hwid_hash]= symOnId;
84  symIds.insert(symOnId);
85  }
86 
87  ATH_MSG_DEBUG("start loop over HEC calo");
88 
89  for ( unsigned int idhash=0; idhash<ncellhec;idhash++){
90  const Identifier id=lar_hec_id->channel_id (idhash);
91  const HWIdentifier hwid=cabling->createSignalChannelID(id);
92  const IdentifierHash hwid_hash=larOnlineID->channel_Hash(hwid);
93 
94  const int pos_neg = abs( lar_hec_id->pos_neg(id) ) ;
95  const int sampling = lar_hec_id->sampling(id);
96  const int region = lar_hec_id->region(id);
97  const Identifier regId = lar_hec_id->region_id(pos_neg, sampling, region );
98  const int eta = lar_hec_id->eta(id);
99  const int phi = lar_hec_id->phi_min(regId);
100  const Identifier symOffId = lar_hec_id->channel_id(pos_neg, sampling, region, eta, phi );
101  const HWIdentifier symOnId = cabling->createSignalChannelID(symOffId);
102  const IdentifierHash idHash=lar_hec_id->channel_hash(id);
103  oflHashtoSymOnl[ncellem+idHash] = symOnId;
104  onlHashtoSymOnl[hwid_hash]= symOnId;
105  symIds.insert(symOnId);
106  }
107 
108  ATH_MSG_DEBUG("start loop over FCAL calo");
109 
110  const bool isTB= lar_fcal_id->dictionaryVersion() == "H6TestBeam";
111  for ( unsigned int idhash=0; idhash<lar_fcal_id->channel_hash_max();
112  idhash++){
113  const Identifier id=lar_fcal_id->channel_id (idhash);
114  const HWIdentifier hwid=cabling->createSignalChannelID(id);
115  const IdentifierHash hwid_hash=larOnlineID->channel_Hash(hwid);
116 
117 
118  const int pos_neg = abs( lar_fcal_id->pos_neg(id) ) ;
119  const int module = lar_fcal_id->module(id);
120 
121 // symmetry for FCAL: save all y>0 part of the +side module
122 // y<0 side deduced by point symmetry around x=y=0
123  const int eta = lar_fcal_id->eta(id);
124  int phi = lar_fcal_id->phi(id);
125  if (!isTB) {
126  if (phi > 7) phi = phi-8;
127  }
128  Identifier symOffId = lar_fcal_id->channel_id(pos_neg, module, eta, phi );
129  HWIdentifier symOnId = cabling->createSignalChannelID(symOffId);
130  IdentifierHash idHash=lar_fcal_id->channel_hash(id);
131  oflHashtoSymOnl[ncellem+ncellhec+idHash] = symOnId;
132  onlHashtoSymOnl[hwid_hash]= symOnId;
133  symIds.insert(symOnId);
134  }
135 
136 
137  std::vector<HWIdentifier> symIdVec(symIds.begin(),symIds.end());
138  std::unique_ptr<LArMCSym> mcSym=std::make_unique<LArMCSym>(larOnlineID,caloCellID,
139  std::move(oflHashtoSymOnl),
140  std::move(onlHashtoSymOnl),
141  std::move(symIdVec));
142 
143 
144 
145  if(writeHandle.record(std::move(mcSym)).isFailure()) {
146  ATH_MSG_ERROR("Could not record LArMCSym object with "
147  << writeHandle.key()
148  << " with EventRange " << writeHandle.getRange()
149  << " into Conditions Store");
150  return StatusCode::FAILURE;
151  }
152  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store");
153 
154 
155  return StatusCode::SUCCESS;
156 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode LArMCSymCondAlg::finalize ( )
inline

Definition at line 26 of file LArMCSymCondAlg.h.

26 {return StatusCode::SUCCESS;}

◆ initialize()

StatusCode LArMCSymCondAlg::initialize ( )

Definition at line 12 of file LArMCSymCondAlg.cxx.

12  {
13 
14  ATH_MSG_DEBUG("initializing");
15 
16  // Read Handles
19 
20  return StatusCode::SUCCESS;
21 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::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< Algorithm >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_readKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArMCSymCondAlg::m_readKey {this,"ReadKey","LArOnOffIdMap"}
private

Definition at line 29 of file LArMCSymCondAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_writeKey

SG::WriteCondHandleKey<LArMCSym> LArMCSymCondAlg::m_writeKey {this,"WriteKey","LArMCSym"}
private

Definition at line 30 of file LArMCSymCondAlg.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LArOnlineID_Base::channel_Hash
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
Definition: LArOnlineID_Base.cxx:1636
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LArHEC_Base_ID::eta
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArFCAL_Base_ID::pos_neg
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
CaloIDHelper::channel_hash_max
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArEM_Base_ID::region_id
Identifier region_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArFCAL_Base_ID::module
int module(const Identifier id) const
module [1,3]
LArEM_Base_ID::region
int region(const Identifier id) const
return region according to :
LArFCAL_Base_ID::channel_hash
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
LArEM_Base_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
LArMCSymCondAlg::m_writeKey
SG::WriteCondHandleKey< LArMCSym > m_writeKey
Definition: LArMCSymCondAlg.h:30
HWIdentifier
Definition: HWIdentifier.h:13
LArHEC_Base_ID::region_id
Identifier region_id(const ExpandedIdentifier &exp_id) const
region identifier for a channel from ExpandedIdentifier
LArMCSymCondAlg::m_readKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_readKey
Definition: LArMCSymCondAlg.h:29
LArEM_Base_ID::channel_id
Identifier channel_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
AtlasDetectorID::dictionaryVersion
virtual std::string dictionaryVersion(void) const override
Definition: AtlasDetectorID.cxx:347
LArEM_Base_ID::eta
int eta(const Identifier id) const
return eta according to :
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArFCAL_Base_ID::eta
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
python.PyAthena.module
module
Definition: PyAthena.py:134
LArFCAL_Base_ID::phi
int phi(const Identifier id) const
phi [0,15]
LArEM_Base_ID::channel_hash
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LArEM_Base_ID::phi_min
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
LArFCAL_Base_ID::channel_id
Identifier channel_id(const ExpandedIdentifier &exp_id) const
cell identifier for a channel from ExpandedIdentifier
LArHEC_Base_ID::phi_min
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LArHEC_Base_ID::channel_hash
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
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:195
LArOnlineID_Base::channelHashMax
size_type channelHashMax(void) const
Define channel hash tables max size.
Definition: LArOnlineID_Base.cxx:1901
LArEM_Base_ID::barrel_ec
int barrel_ec(const Identifier id) const
return barrel_ec according to :
LArHEC_Base_ID::channel_id
Identifier channel_id(const ExpandedIdentifier &exp_id) const
channel identifier for a channel from ExpandedIdentifier
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArOnlineID
Definition: LArOnlineID.h:20
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArHEC_Base_ID::sampling
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
LArHEC_Base_ID::pos_neg
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
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
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
IdentifierHash
Definition: IdentifierHash.h:38
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60
LArHEC_Base_ID::region
int region(const Identifier id) const
return region [0,1]
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20