ATLAS Offline Software
Loading...
Searching...
No Matches
RDOReaderDoubleSelector Class Reference

#include <RDOReaderDoubleSelector.h>

Inheritance diagram for RDOReaderDoubleSelector:
Collaboration diagram for RDOReaderDoubleSelector:

Public Member Functions

 RDOReaderDoubleSelector (const std::string &name, ISvcLocator *pSvcLocator)
 Algorithm constructor.
virtual StatusCode initialize () override
 Algorithm initialize at begin of job.
virtual StatusCode execute () override
 Algorithm execute once per event.
virtual StatusCode finalize () override
 Algorithm finalize at end of job.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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 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

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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

 RDOReaderDoubleSelector ()
 Avoid use of default constructor.
 RDOReaderDoubleSelector (const RDOReaderDoubleSelector &)
 Avoid use of copy constructor.
RDOReaderDoubleSelectoroperator= (const RDOReaderDoubleSelector &)
 Avoid use of copy operator.
StatusCode checkPixel () const
 Compare objects read with newly created ones.
StatusCode checkSCT () const
 Compare objects read with newly created ones.
StatusCode checkTRT () const
 Compare objects read with newly created ones.
StatusCode checkCells () const
 Compare objects read with newly created ones.
void printCells (const CaloCellContainer *larCont) const
 Print out cell info.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const PixelIDm_pixelId
 IDhelper for creating objects.
const SCT_IDm_sctId
 IDhelper for creating objects.
const TRT_IDm_trtId
 IDhelper for creating objects.
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
 Need DD mgr to create cells.
const CaloCell_IDm_calocellId
 Need id helper to create cells.
DataObjIDColl m_extendedExtraObjects
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

Detailed Description

Definition at line 28 of file RDOReaderDoubleSelector.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

◆ RDOReaderDoubleSelector() [1/3]

RDOReaderDoubleSelector::RDOReaderDoubleSelector ( const std::string & name,
ISvcLocator * pSvcLocator )

Algorithm constructor.

Definition at line 51 of file RDOReaderDoubleSelector.cxx.

53 : AthAlgorithm(name, pSvcLocator)
54 , m_pixelId(nullptr)
55 , m_sctId(nullptr)
56 , m_trtId(nullptr)
57 , m_calocellId(nullptr)
58{}
AthAlgorithm()
Default constructor:
const TRT_ID * m_trtId
IDhelper for creating objects.
const PixelID * m_pixelId
IDhelper for creating objects.
const CaloCell_ID * m_calocellId
Need id helper to create cells.
const SCT_ID * m_sctId
IDhelper for creating objects.

◆ RDOReaderDoubleSelector() [2/3]

RDOReaderDoubleSelector::RDOReaderDoubleSelector ( )
private

Avoid use of default constructor.

◆ RDOReaderDoubleSelector() [3/3]

RDOReaderDoubleSelector::RDOReaderDoubleSelector ( const RDOReaderDoubleSelector & )
private

Avoid use of copy constructor.

Member Function Documentation

◆ checkCells()

StatusCode RDOReaderDoubleSelector::checkCells ( ) const
private

Compare objects read with newly created ones.

Definition at line 365 of file RDOReaderDoubleSelector.cxx.

366{
367 ATH_MSG_DEBUG("RDOReaderDoubleSelector::checkCells()" );
368
369 // Retrieve container
370 const CaloCellContainer* caloCont = nullptr;
371 ATH_CHECK( evtStore()->retrieve(caloCont, "CaloCellCont1") );
372 ATH_MSG_DEBUG( "Container '" << "CaloCellCont"
373 << "' retrieved from StoreGate" );
374
375 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey};
376 ATH_CHECK(caloMgrHandle.isValid());
377
378 LArCellContFakeCreator creator;
379
380 // Create container
381 MsgStream log(msgSvc(), name());
382 const CaloCellContainer* caloCont1 = creator.createCaloCellContainer(m_calocellId,
383 *caloMgrHandle,
384 msg());
385
387 CaloCellContainer::const_iterator last = caloCont->end();
388 CaloCellContainer::const_iterator first1 = caloCont1->begin();
389 CaloCellContainer::const_iterator last1 = caloCont1->end();
390
391 bool error = false;
392 int ncells = 0;
393 int ncellErrs = 0;
394
395 for (; first != last && first1 != last1; ++first, ++first1) {
396 if (((*first)->ID() != (*first1)->ID()) ||
397 (fabs((*first)->energy() - (*first1)->energy() ) > 0.01 * fabs((*first)->energy())) ||
398 (fabs((*first)->time() - (*first1)->time() ) > 0.0002 * fabs((*first)->time())) ||
399 (std::abs((*first)->quality() - (*first1)->quality() ) > 0) ||
400 (std::abs((*first)->provenance() - (*first1)->provenance() ) > 0) ||
401 (fabs((*first)->eta() - (*first1)->eta() ) > 0.0000001) ||
402 (fabs((*first)->phi() - (*first1)->phi() ) > 0.0000001)) {
403 ATH_MSG_ERROR("CaloCell1,2 differ: id "
404 << m_calocellId->show_to_string((*first)->ID())
405 << m_calocellId->show_to_string((*first1)->ID())
406 << " energy " << (*first)->energy() << " "
407 << (*first1)->energy()
408 << " time " << (*first)->time() << " "
409 << (*first1)->time()
410 << " quality " << (*first)->quality() << " "
411 << (*first1)->quality()
412 << " provenance " << (*first)->provenance() << " "
413 << (*first1)->provenance()
414 << " eta " << (*first)->eta() << " "
415 << (*first1)->eta()
416 << " phi " << (*first)->phi() << " "
417 << (*first1)->phi());
418 error = true;
419 ncellErrs++;
420 }
421 ncells++;
422 }
423
424 printCells(caloCont);
425
426 if (error) {
427 ATH_MSG_ERROR("Errors: " << ncellErrs );
428 return StatusCode::FAILURE;
429 }
430 else {
431 ATH_MSG_INFO("Successful check of CaloCellContainer I/O. Cells read: " << ncells );
432 }
433 return StatusCode::SUCCESS;
434}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
MsgStream & msg() const
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
CaloCellContainer * createCaloCellContainer(const CaloCell_ID *calocellId, const CaloDetDescrManager *caloMgr, MsgStream &log) const
Create a CaloCellContainer with LAr cells.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Need DD mgr to create cells.
void printCells(const CaloCellContainer *larCont) const
Print out cell info.
bool first
Definition DeMoScan.py:534
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ checkPixel()

StatusCode RDOReaderDoubleSelector::checkPixel ( ) const
private

Compare objects read with newly created ones.

Definition at line 87 of file RDOReaderDoubleSelector.cxx.

88{
89 ATH_MSG_DEBUG("RDOReaderDoubleSelector::checkPixel()" );
90
91 const PixelRDO_Container* pixCont = nullptr;
92 ATH_CHECK( evtStore()->retrieve(pixCont, "PixelRDOs") );
93
94 // loop on all RDO collections read in and check them
95 int nmatch = 0;
96 bool error = false;
97 InDetRawDataFakeCreator creator;
98 IdContext cntx = m_pixelId->wafer_context();
99
100 ATH_MSG_DEBUG("PixelRDO_Container size "
101 << pixCont->size() << " " );
102
103 // Check for non-zero length of container
104 if (pixCont->begin() == pixCont->end()) {
105 ATH_MSG_ERROR("Container '" << "PixelRDOs" << "' is EMPTY !" );
106 return StatusCode::FAILURE;
107 }
108
109 for (PixelRDO_Container::const_iterator it = pixCont->begin() ;
110 it != pixCont->end() ; ++it) {
111
112 const InDetRawDataCollection<PixelRDORawData>* RDO_Collection(&(**it));
113
114 ATH_MSG_DEBUG("Read RDO collection: size, ids "
115 << RDO_Collection->size() << " "
116 << m_pixelId->show_to_string(RDO_Collection->identify(), &cntx) << " "
117 << MSG::hex << (unsigned int)RDO_Collection->identifyHash() << MSG::dec );
118
119 // create a new pixel RDO collection
120 MsgStream log(msgSvc(), name());
121 const InDetRawDataCollection<PixelRDORawData> *rdocoll =
122 creator.createPixelRawDataColl(RDO_Collection->identifyHash(), m_pixelId, msg());
123
124 ATH_MSG_DEBUG("Test RDO collection: size, ids "
125 << rdocoll->size() << " "
126 << m_pixelId->show_to_string(rdocoll->identify(), &cntx) << " "
127 << MSG::hex << (unsigned int)rdocoll->identifyHash() << MSG::dec );
128
129
130 // Use one of the specific clustering AlgTools to make clusters
131 //typedef InDetRawDataCollection<Pixel1RawData> RDO1_Collection_type;
132 typedef InDetRawDataCollection<PixelRDORawData> RDO_Collection_type;
133
134 // loop on all RDOs
135 RDO_Collection_type::const_iterator nextRDO = RDO_Collection->begin();
136 RDO_Collection_type::const_iterator lastRDO = RDO_Collection->end();
137 RDO_Collection_type::const_iterator nextRDO1 = rdocoll->begin();
138 RDO_Collection_type::const_iterator lastRDO1 = rdocoll->end();
139 for (; nextRDO != lastRDO && nextRDO1 != lastRDO1 ; ++nextRDO, ++nextRDO1) {
140 // Look for match
141 if (((*nextRDO)->identify() != (*nextRDO1)->identify()) ||
142 ((*nextRDO)->getWord() != (*nextRDO1)->getWord())) {
143
144 ATH_MSG_ERROR("RDO's do NOT match: ids, word "
145 << m_pixelId->show_to_string((*nextRDO)->identify()) << " "
146 << m_pixelId->show_to_string((*nextRDO1)->identify()) << " "
147 << MSG::hex << (*nextRDO)->getWord() << " "
148 << MSG::hex << (*nextRDO1)->getWord() << " "
149 );
150 error = true;
151 }
152 else {
153 nmatch++;
154 }
155 }
156 ATH_MSG_DEBUG("Matching RDOs " << nmatch );
157
158 delete rdocoll;
159 }
160
161 // print out pixel element links
162 // Retrieve the element link vector
163 const PixelRDOElemLinkVec* linkVec = nullptr;
164 ATH_CHECK( evtStore()->retrieve(linkVec, "PixelRDOELs") );
165
166 ATH_MSG_DEBUG("PixelRDOElemLinkVec found with "
167 << linkVec->pixelRDOs().size()
168 << " RDOs " );
169 for (unsigned int i = 0; i < linkVec->pixelRDOs().size(); ++i) {
170 // Print out rdos from element link
172 const PixelRDORawData* ncrdo = *rdo;
173 ATH_MSG_DEBUG("RDO ID=" << m_pixelId->show_to_string((*rdo)->identify())
174 << "RDO ToT=" << ncrdo->getToT() );
175 }
176
177
178 if (error) {
179 ATH_MSG_INFO("ERROR reading and checking Pixel RDO collections " );
180 }
181 else {
182 ATH_MSG_INFO("Successfully read and checked Pixel RDO collections " );
183 }
184
185 return StatusCode::SUCCESS;
186}
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_Container
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator end() const
return const_iterator for end of container
size_t size() const
Duplicate of fullSize for backwards compatability.
const_iterator begin() const
return const_iterator for first entry
virtual Identifier identify() const override final
virtual IdentifierHash identifyHash() const override final
const InDetRawDataCollection< PixelRDORawData > * createPixelRawDataColl(IdentifierHash hashId, const PixelID *pixelId, MsgStream &log)
Create PixelRawDataCollection.
const std::vector< elem_type > & pixelRDOs() const
ElementLink< cont_type > elem_type
virtual int getToT() const =0

◆ checkSCT()

StatusCode RDOReaderDoubleSelector::checkSCT ( ) const
private

Compare objects read with newly created ones.

Definition at line 188 of file RDOReaderDoubleSelector.cxx.

189{
190 ATH_MSG_DEBUG("RDOReaderDoubleSelector::checkSCT()" );
191
192 const SCT_RDO_Container* sctCont = nullptr;
193 ATH_CHECK( evtStore()->retrieve(sctCont, "SCT_RDOs") );
194
195 // loop on all RDO collections read in and check them
196 int nmatch = 0;
197 bool error = false;
198 InDetRawDataFakeCreator creator;
199 IdContext cntx = m_sctId->wafer_context();
200
201 ATH_MSG_DEBUG("SCT_RDO_Container size "
202 << sctCont->size() << " " );
203
204 // Check for non-zero length of container
205 if (sctCont->begin() == sctCont->end()) {
206 ATH_MSG_ERROR("Container '" << "SCT_RDOs" << "' is EMPTY !" );
207 return StatusCode::FAILURE;
208 }
209
210 for (SCT_RDO_Container::const_iterator it = sctCont->begin() ;
211 it != sctCont->end() ; ++it) {
212
213 const InDetRawDataCollection<SCT_RDORawData>* RDO_Collection(&(**it));
214
215 ATH_MSG_DEBUG("Read RDO collection: size, ids "
216 << RDO_Collection->size() << " "
217 << m_sctId->show_to_string(RDO_Collection->identify(), &cntx) << " "
218 << MSG::hex << (unsigned int)RDO_Collection->identifyHash() << MSG::dec );
219
220 // create a new sct RDO collection
221 MsgStream log(msgSvc(), name());
222 const InDetRawDataCollection<SCT_RDORawData> *rdocoll =
223 creator.createSCT_RawDataColl(RDO_Collection->identifyHash(), m_sctId, msg());
224
225 ATH_MSG_DEBUG("Test RDO collection: size, ids "
226 << rdocoll->size() << " "
227 << m_sctId->show_to_string(rdocoll->identify(), &cntx) << " "
228 << MSG::hex << (unsigned int)rdocoll->identifyHash() << MSG::dec );
229
230
231 // Use one of the specific clustering AlgTools to make clusters
232 typedef InDetRawDataCollection<SCT_RDORawData> RDO_Collection_type;
233
234 // loop on all RDOs
235 RDO_Collection_type::const_iterator nextRDO = RDO_Collection->begin();
236 RDO_Collection_type::const_iterator lastRDO = RDO_Collection->end();
237 RDO_Collection_type::const_iterator nextRDO1 = rdocoll->begin();
238 RDO_Collection_type::const_iterator lastRDO1 = rdocoll->end();
239 for (; nextRDO != lastRDO && nextRDO1 != lastRDO1 ; ++nextRDO, ++nextRDO1) {
240 // Look for match
241 if (((*nextRDO)->identify() != (*nextRDO1)->identify()) ||
242 ((*nextRDO)->getGroupSize() != (*nextRDO1)->getGroupSize())) {
243
244 ATH_MSG_ERROR("RDO's do NOT match: ids, group, strip "
245 << m_sctId->show_to_string((*nextRDO)->identify()) << " "
246 << m_sctId->show_to_string((*nextRDO1)->identify()) << " "
247 << MSG::hex
248 << (*nextRDO)->getGroupSize() << " "
249 << (*nextRDO1)->getGroupSize() << " "
250 << MSG::dec
251 );
252 error = true;
253 }
254 else {
255 nmatch++;
256 }
257 }
258 ATH_MSG_DEBUG("Matching RDOs " << nmatch );
259
260 delete rdocoll;
261 }
262
263 if (error) {
264 ATH_MSG_INFO("ERROR reading and checking SCT RDO collections " );
265 }
266 else {
267 ATH_MSG_INFO("Successfully read and checked SCT RDO collections " );
268 }
269
270 return StatusCode::SUCCESS;
271}
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
const InDetRawDataCollection< SCT_RDORawData > * createSCT_RawDataColl(IdentifierHash hashId, const SCT_ID *sctId, MsgStream &log)
Create SCT_RawDataCollection.

◆ checkTRT()

StatusCode RDOReaderDoubleSelector::checkTRT ( ) const
private

Compare objects read with newly created ones.

Definition at line 273 of file RDOReaderDoubleSelector.cxx.

274{
275 ATH_MSG_DEBUG("RDOReaderDoubleSelector::checkTRT()" );
276
277 const TRT_RDO_Container* trtCont = nullptr;
278 ATH_CHECK( evtStore()->retrieve(trtCont, "TRT_RDOs") );
279
280 // loop on all RDO collections read in and check them
281 int nmatch = 0;
282 bool error = false;
283 InDetRawDataFakeCreator creator;
284 IdContext cntx = m_trtId->straw_layer_context();
285
286 ATH_MSG_DEBUG("TRT_RDO_Container size "
287 << trtCont->size() << " " );
288
289 // Check for non-zero length of container
290 if (trtCont->begin() == trtCont->end()) {
291 ATH_MSG_ERROR("Container '" << "TRT_RDOs"
292 << "' is EMPTY !" );
293 return StatusCode::FAILURE;
294 }
295
296 for (TRT_RDO_Container::const_iterator it = trtCont->begin() ;
297 it != trtCont->end() ; ++it) {
298
299 const InDetRawDataCollection<TRT_RDORawData>* RDO_Collection(&(**it));
300
301 ATH_MSG_DEBUG("Read RDO collection: size, ids "
302 << RDO_Collection->size() << " "
303 << m_trtId->show_to_string(RDO_Collection->identify(), &cntx) << " "
304 << MSG::hex << (unsigned int)RDO_Collection->identifyHash() << MSG::dec );
305
306 // create a new trt RDO collection
307 MsgStream log(msgSvc(), name());
308 const InDetRawDataCollection<TRT_RDORawData> *rdocoll =
309 creator.createTRT_RawDataColl(RDO_Collection->identifyHash(), m_trtId, msg());
310
311 ATH_MSG_DEBUG("Test RDO collection: size, ids "
312 << rdocoll->size() << " "
313 << m_trtId->show_to_string(rdocoll->identify(), &cntx) << " "
314 << MSG::hex << (unsigned int)rdocoll->identifyHash() << MSG::dec );
315
316
317 // Use one of the specific clustering AlgTools to make clusters
318 typedef InDetRawDataCollection<TRT_RDORawData> RDO_Collection_type;
319
320 // loop on all RDOs
321 RDO_Collection_type::const_iterator nextRDO = RDO_Collection->begin();
322 RDO_Collection_type::const_iterator lastRDO = RDO_Collection->end();
323 RDO_Collection_type::const_iterator nextRDO1 = rdocoll->begin();
324 RDO_Collection_type::const_iterator lastRDO1 = rdocoll->end();
325 for (; nextRDO != lastRDO && nextRDO1 != lastRDO1 ; ++nextRDO, ++nextRDO1) {
326 // Look for match
327 if (((*nextRDO)->identify() != (*nextRDO1)->identify()) ||
328 ((*nextRDO)->highLevel() != (*nextRDO1)->highLevel()) ||
329 ((*nextRDO)->timeOverThreshold() != (*nextRDO1)->timeOverThreshold()) ||
330 ((*nextRDO)->driftTimeBin() != (*nextRDO1)->driftTimeBin())) {
331
332 ATH_MSG_ERROR("RDO's do NOT match: ids, highlvl, TOT, drift "
333 << m_trtId->show_to_string((*nextRDO)->identify()) << " "
334 << m_trtId->show_to_string((*nextRDO1)->identify()) << " "
335 << MSG::hex
336 << (*nextRDO)->highLevel() << " "
337 << (*nextRDO1)->highLevel() << " "
338 << (*nextRDO)->timeOverThreshold() << " "
339 << (*nextRDO1)->timeOverThreshold() << " "
340 << (*nextRDO)->driftTimeBin() << " "
341 << (*nextRDO1)->driftTimeBin() << " "
342 << MSG::dec
343 );
344 error = true;
345 }
346 else {
347 nmatch++;
348 }
349 }
350 ATH_MSG_DEBUG("Matching RDOs " << nmatch );
351
352 delete rdocoll;
353 }
354
355 if (error) {
356 ATH_MSG_INFO("ERROR reading and checking TRT RDO collections " );
357 }
358 else {
359 ATH_MSG_INFO("Successfully read and checked TRT RDO collections " );
360 }
361
362 return StatusCode::SUCCESS;
363}
InDetRawDataContainer< InDetRawDataCollection< TRT_RDORawData > > TRT_RDO_Container
const InDetRawDataCollection< TRT_RDORawData > * createTRT_RawDataColl(IdentifierHash hashId, const TRT_ID *trtId, MsgStream &log)
Create TRT_RawDataCollection.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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 RDOReaderDoubleSelector::execute ( )
overridevirtual

Algorithm execute once per event.

Definition at line 76 of file RDOReaderDoubleSelector.cxx.

77{
78 ATH_MSG_DEBUG("RDOReaderDoubleSelector::execute()" );
79
84 return StatusCode::SUCCESS;
85}
StatusCode checkPixel() const
Compare objects read with newly created ones.
StatusCode checkCells() const
Compare objects read with newly created ones.
StatusCode checkSCT() const
Compare objects read with newly created ones.
StatusCode checkTRT() const
Compare objects read with newly created ones.

◆ 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}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode RDOReaderDoubleSelector::finalize ( )
overridevirtual

Algorithm finalize at end of job.

Definition at line 467 of file RDOReaderDoubleSelector.cxx.

468{
469 ATH_MSG_INFO("RDOReaderDoubleSelector::finalize()" );
470 return StatusCode::SUCCESS;
471}

◆ initialize()

StatusCode RDOReaderDoubleSelector::initialize ( )
overridevirtual

Algorithm initialize at begin of job.

Definition at line 61 of file RDOReaderDoubleSelector.cxx.

62{
63 ATH_MSG_INFO("RDOReaderDoubleSelector::initialize()" );
64
65 ATH_CHECK( detStore()->retrieve(m_pixelId, "PixelID") );
66 ATH_CHECK( detStore()->retrieve(m_sctId, "SCT_ID") );
67 ATH_CHECK( detStore()->retrieve(m_trtId, "TRT_ID") );
68
69 ATH_CHECK( detStore()->retrieve(m_calocellId, "CaloCell_ID") );
70 ATH_CHECK(m_caloMgrKey.initialize());
71
72 return StatusCode::SUCCESS;
73}
const ServiceHandle< StoreGateSvc > & detStore() const

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

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

Definition at line 24 of file AthCommonMsg.h.

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

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

◆ operator=()

RDOReaderDoubleSelector & RDOReaderDoubleSelector::operator= ( const RDOReaderDoubleSelector & )
private

Avoid use of copy operator.

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

◆ printCells()

void RDOReaderDoubleSelector::printCells ( const CaloCellContainer * larCont) const
private

Print out cell info.

Definition at line 437 of file RDOReaderDoubleSelector.cxx.

438{
439
440 ATH_MSG_INFO("RDOReaderDoubleSelector::printRDOs()" );
441
442 // loop on all cells
443
444 CaloCellContainer::const_iterator first = caloCont->begin();
445 CaloCellContainer::const_iterator last = caloCont->end();
446
447 for (; first != last; ++first) {
448
449 ATH_MSG_DEBUG("CaloCell: id "
450 << m_calocellId->show_to_string((*first)->ID())
451 << std::setprecision(5)
452 << " energy " << (*first)->energy()
453 << " time " << (*first)->time()
454 << " quality " << (*first)->quality()
455 << " provenance " << (*first)->provenance()
456 << " eta " << (*first)->eta()
457 << " phi " << (*first)->phi()
458 );
459 }
460
461 ATH_MSG_DEBUG("RDOReaderDoubleSelector::printCells() end" );
462
463}

◆ 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();
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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
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, AthHistogramAlgorithm, and PyAthena::Alg.

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}
#define ATH_MSG_WARNING(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

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

Member Data Documentation

◆ m_calocellId

const CaloCell_ID* RDOReaderDoubleSelector::m_calocellId
private

Need id helper to create cells.

Definition at line 97 of file RDOReaderDoubleSelector.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> RDOReaderDoubleSelector::m_caloMgrKey
private
Initial value:
{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }

Need DD mgr to create cells.

Definition at line 91 of file RDOReaderDoubleSelector.h.

91 { this
92 , "CaloDetDescrManager"
93 , "CaloDetDescrManager"
94 , "SG Key for CaloDetDescrManager in the Condition Store" };

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

const PixelID* RDOReaderDoubleSelector::m_pixelId
private

IDhelper for creating objects.

Definition at line 82 of file RDOReaderDoubleSelector.h.

◆ m_sctId

const SCT_ID* RDOReaderDoubleSelector::m_sctId
private

IDhelper for creating objects.

Definition at line 85 of file RDOReaderDoubleSelector.h.

◆ m_trtId

const TRT_ID* RDOReaderDoubleSelector::m_trtId
private

IDhelper for creating objects.

Definition at line 88 of file RDOReaderDoubleSelector.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.


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