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

Test Algorithm for POOL I/O, writes InDetRawData to transient store. More...

#include <InDetRawDataFakeWriter.h>

Inheritance diagram for InDetRawDataFakeWriter:
Collaboration diagram for InDetRawDataFakeWriter:

Public Member Functions

 InDetRawDataFakeWriter (const std::string &name, ISvcLocator *pSvcLocator)
 Algorithm constructor.
virtual StatusCode initialize ()
 Algorithm initialize at begin of job.
virtual StatusCode execute ()
 Algorithm execute once per event.
virtual StatusCode finalize ()
 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

 InDetRawDataFakeWriter ()
 Avoid use of default constructor.
 InDetRawDataFakeWriter (const InDetRawDataFakeWriter &)
 Avoid use of copy constructor.
InDetRawDataFakeWriteroperator= (const InDetRawDataFakeWriter &)
 Avoid use of copy operator.
StatusCode createPixels ()
 Create pixel collections.
StatusCode createSCTs ()
 Create sct collections.
StatusCode createTRTs ()
 Create trt collections.
StatusCode printRDOs () const
 Print out RDOs.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

PixelRDO_Containerm_pixCont
 Identifiable containers are created only once.
SCT_RDO_Containerm_sctCont
 Identifiable containers are created only once.
TRT_RDO_Containerm_trtCont
 Identifiable containers are created only once.
const PixelIDm_pixelId
 IDhelper needed for identifiable container.
const SCT_IDm_sctId
 IDhelper needed for identifiable container.
const TRT_IDm_trtId
 IDhelper needed for identifiable container.
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

Test Algorithm for POOL I/O, writes InDetRawData to transient store.

Definition at line 37 of file InDetRawDataFakeWriter.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

◆ InDetRawDataFakeWriter() [1/3]

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

Algorithm constructor.

Definition at line 42 of file InDetRawDataFakeWriter.cxx.

43 :
44 AthAlgorithm(name,pSvcLocator),
45 m_pixCont(nullptr),
46 m_sctCont(nullptr),
47 m_trtCont(nullptr),
48 m_pixelId(nullptr),
49 m_sctId(nullptr),
50 m_trtId(nullptr)
51{}
AthAlgorithm()
Default constructor:
const TRT_ID * m_trtId
IDhelper needed for identifiable container.
const PixelID * m_pixelId
IDhelper needed for identifiable container.
const SCT_ID * m_sctId
IDhelper needed for identifiable container.
TRT_RDO_Container * m_trtCont
Identifiable containers are created only once.
PixelRDO_Container * m_pixCont
Identifiable containers are created only once.
SCT_RDO_Container * m_sctCont
Identifiable containers are created only once.

◆ InDetRawDataFakeWriter() [2/3]

InDetRawDataFakeWriter::InDetRawDataFakeWriter ( )
private

Avoid use of default constructor.

◆ InDetRawDataFakeWriter() [3/3]

InDetRawDataFakeWriter::InDetRawDataFakeWriter ( const InDetRawDataFakeWriter & )
private

Avoid use of copy constructor.

Member Function Documentation

◆ createPixels()

StatusCode InDetRawDataFakeWriter::createPixels ( )
private

Create pixel collections.

Definition at line 104 of file InDetRawDataFakeWriter.cxx.

105{
106 ATH_MSG_DEBUG("InDetRawDataFakeWriter::createPixels()" );
107
108
109 // IDC creation and registration, done once per job:
110
111 // the IDC is created in the initialize, must clear the IDC every event:
112 m_pixCont->cleanup();
113
114 // register the Pixel IdentifiableContainer into StoreGate
115 ATH_CHECK( evtStore()->record(m_pixCont,"PixelRDOs") );
116
117 // Create and record the element link vector
118 PixelRDOElemLinkVec* linkVec = new PixelRDOElemLinkVec;
119 ATH_CHECK( evtStore()->record(linkVec,"PixelRDOELs") );
120
121 // loop over 10 different pixel wafers
122 int deltaWafer = m_pixelId->wafer_hash_max()/15;
123 IdentifierHash waferHash = deltaWafer;
124
125 InDetRawDataFakeCreator creator;
126
127 IdContext cntx = m_pixelId->wafer_context();
128
129 for (int i=0; i < 10; ++i, waferHash += deltaWafer) {
130
131 // Print out contents of RDO
132 ATH_MSG_DEBUG("Creating RDO collection: "
133 << m_pixelId->show_to_string(m_pixelId->wafer_id(waferHash), &cntx) << " "
134 << MSG::hex << m_pixelId->wafer_id(waferHash) << MSG::dec << " "
135 << MSG::hex << (unsigned int)waferHash << MSG::dec );
136
137 // create a new pixel RDO collection
138 MsgStream log(msgSvc(), name());
139 const InDetRawDataCollection<PixelRDORawData> *p_rdocoll =
140 creator.createPixelRawDataColl(waferHash, m_pixelId, log);
141
142 // register the rdo collection in StoreGate
143 // add rdo collection to the container
144 IdentifierHash id_hash = p_rdocoll->identifyHash();
145 ATH_CHECK( m_pixCont->addCollection(p_rdocoll, id_hash) );
146
147 // Loop over RDOs and add ELs to vector
148 for (unsigned int irdo = 0; irdo < p_rdocoll->size(); ++irdo) {
149 unsigned int itest = irdo % 3;
150 if (itest == 2) {
151 // Create el with element and container
152 ATH_MSG_VERBOSE("Pixel RDOs: create EL without index");
153 PixelRDOElemLinkVec::elem_type el((*p_rdocoll)[irdo], *m_pixCont);
154 linkVec->pixelRDOs().push_back(el);
155 }
156 else {
157 // Create el with hash and sometimes index
158 IdentContIndex index;
159 index.setCollHash(waferHash);
160 if (itest == 1) index.setObjIndex(irdo);
161 ATH_MSG_VERBOSE("Pixel RDOs: create EL - hash, index, hashAndIndex: "
162 << index.collHash() << " " << index.objIndex() << " "
163 << MSG::hex << index.hashAndIndex() << MSG::dec);
164 // Create el with element and index
166 el.setElement((*p_rdocoll)[irdo]);
167 linkVec->pixelRDOs().push_back(el);
168 }
169 }
170 }
171
172 return StatusCode::SUCCESS;
173}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
size_type size() const noexcept
Returns the number of elements in the collection.
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
str index
Definition DeMoScan.py:362
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ createSCTs()

StatusCode InDetRawDataFakeWriter::createSCTs ( )
private

Create sct collections.

Definition at line 175 of file InDetRawDataFakeWriter.cxx.

176{
177 ATH_MSG_DEBUG("InDetRawDataFakeWriter::execute()" );
178
179 // IDC creation and registration, done once per job:
180
181 // the IDC is created in the initialize, must clear the IDC every event:
182 m_sctCont->cleanup();
183
184
185 ATH_CHECK( evtStore()->record(m_sctCont,"SCT_RDOs") );
186
187 // loop over 10 different sct wafers
188 int deltaWafer = m_sctId->wafer_hash_max()/15;
189 IdentifierHash waferHash = deltaWafer;
190
191 InDetRawDataFakeCreator creator;
192
193 IdContext cntx = m_sctId->wafer_context();
194
195 for (int i=0; i < 10; ++i, waferHash += deltaWafer) {
196
197 // Print out contents of RDO
198 ATH_MSG_DEBUG("Creating RDO collection: "
199 << m_sctId->show_to_string(m_sctId->wafer_id(waferHash), &cntx) << " "
200 << MSG::hex << m_sctId->wafer_id(waferHash) << MSG::dec << " "
201 << MSG::hex << (unsigned int)waferHash << MSG::dec );
202
203 // create a new sct RDO collection
204 MsgStream log(msgSvc(), name());
205 const InDetRawDataCollection<SCT_RDORawData> *p_rdocoll =
206 creator.createSCT_RawDataColl(waferHash, m_sctId, msg());
207
208 // register the rdo collection in StoreGate
209 IdentifierHash id_hash = p_rdocoll->identifyHash();
210 ATH_CHECK( m_sctCont->addCollection(p_rdocoll, id_hash) );
211 }
212
213 return StatusCode::SUCCESS;
214}
MsgStream & msg() const
const InDetRawDataCollection< SCT_RDORawData > * createSCT_RawDataColl(IdentifierHash hashId, const SCT_ID *sctId, MsgStream &log)
Create SCT_RawDataCollection.

◆ createTRTs()

StatusCode InDetRawDataFakeWriter::createTRTs ( )
private

Create trt collections.

Definition at line 216 of file InDetRawDataFakeWriter.cxx.

217{
218 ATH_MSG_DEBUG("InDetRawDataFakeWriter::execute()" );
219
220 // IDC creation and registration, done once per job:
221
222 // the IDC is created in the initialize, must clear the IDC every event:
223 m_trtCont->cleanup();
224
225
226 // register the TRT_ IdentifiableContainer into StoreGate
227 ATH_CHECK( evtStore()->record(m_trtCont,"TRT_RDOs") );
228
229 // loop over 10 different trt straw layers
230 int deltaStrLay = m_trtId->straw_layer_hash_max()/15;
231 IdentifierHash strLayHash = deltaStrLay;
232
233 InDetRawDataFakeCreator creator;
234
235 IdContext cntx = m_trtId->straw_layer_context();
236
237 for (int i=0; i < 10; ++i, strLayHash += deltaStrLay) {
238
239 // Print out contents of RDO
240 ATH_MSG_DEBUG("Creating RDO collection: "
241 << m_trtId->show_to_string(m_trtId->layer_id(strLayHash), &cntx) << " "
242 << MSG::hex << m_trtId->layer_id(strLayHash) << MSG::dec << " "
243 << MSG::hex << (unsigned int)strLayHash << MSG::dec );
244
245 // create a new trt RDO collection
246 const InDetRawDataCollection<TRT_RDORawData> *p_rdocoll =
247 creator.createTRT_RawDataColl(strLayHash, m_trtId, msg());
248
249 // register the rdo collection in StoreGate
250 IdentifierHash id_hash = p_rdocoll->identifyHash();
251 ATH_CHECK( m_trtCont->addCollection(p_rdocoll, id_hash) );
252 }
253
254 return StatusCode::SUCCESS;
255}
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 InDetRawDataFakeWriter::execute ( )
virtual

Algorithm execute once per event.

Definition at line 93 of file InDetRawDataFakeWriter.cxx.

94{
95 // Get the messaging service, print where you are
96 ATH_MSG_DEBUG( "InDetRawDataFakeWriter::execute()" );
100 ATH_CHECK( printRDOs() );
101 return StatusCode::SUCCESS;
102}
StatusCode createTRTs()
Create trt collections.
StatusCode printRDOs() const
Print out RDOs.
StatusCode createSCTs()
Create sct collections.
StatusCode createPixels()
Create pixel collections.

◆ 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 InDetRawDataFakeWriter::finalize ( )
virtual

Algorithm finalize at end of job.

Definition at line 359 of file InDetRawDataFakeWriter.cxx.

360{
361 ATH_MSG_INFO("InDetRawDataFakeWriter::finalize()" );
362 return StatusCode::SUCCESS;
363}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode InDetRawDataFakeWriter::initialize ( )
virtual

Algorithm initialize at begin of job.

Definition at line 54 of file InDetRawDataFakeWriter.cxx.

55{
56 ATH_MSG_INFO("InDetRawDataFakeWriter::initialize()" );
57
58 ATH_CHECK( detStore()->retrieve(m_pixelId, "PixelID") );
59 ATH_CHECK( detStore()->retrieve(m_sctId, "SCT_ID") );
60 ATH_CHECK( detStore()->retrieve(m_trtId, "TRT_ID") );
61
62 // create the IdentifiableContainers to contain the rdo collections
63 try {
64 m_pixCont=new PixelRDO_Container(m_pixelId->wafer_hash_max());
65 } catch (const std::bad_alloc&) {
66 ATH_MSG_ERROR("Could not create a new Pixel RawDataContainer !");
67 return StatusCode::FAILURE;
68 }
69
70 try {
71 m_sctCont=new SCT_RDO_Container(m_sctId->wafer_hash_max());
72 } catch (const std::bad_alloc&) {
73 ATH_MSG_ERROR("Could not create a new SCT RawDataContainer !");
74 return StatusCode::FAILURE;
75 }
76
77 try {
78 m_trtCont=new TRT_RDO_Container(m_trtId->straw_layer_hash_max());
79 } catch (const std::bad_alloc&) {
80 ATH_MSG_ERROR("Could not create a new TRT RawDataContainer !");
81 return StatusCode::FAILURE;
82 }
83
84 // preventing SG from deleting object:
85 m_pixCont->addRef();
86 m_sctCont->addRef();
87 m_trtCont->addRef();
88
89 return StatusCode::SUCCESS;
90}
#define ATH_MSG_ERROR(x)
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_Container
InDetRawDataContainer< InDetRawDataCollection< SCT_RDORawData > > SCT_RDO_Container
InDetRawDataContainer< InDetRawDataCollection< TRT_RDORawData > > TRT_RDO_Container
const ServiceHandle< StoreGateSvc > & detStore() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

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

InDetRawDataFakeWriter & InDetRawDataFakeWriter::operator= ( const InDetRawDataFakeWriter & )
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.

◆ printRDOs()

StatusCode InDetRawDataFakeWriter::printRDOs ( ) const
private

Print out RDOs.

Definition at line 261 of file InDetRawDataFakeWriter.cxx.

262{
263 ATH_MSG_INFO("InDetRawDataFakeWriter::printRDOs()" );
264
265 // loop on all RDO collections
266
267 // pixels
268
270 it!=m_pixCont->end() ; ++it) {
271
272 const InDetRawDataCollection< PixelRDORawData > *rdocoll=&(**it);
273
274 ATH_MSG_DEBUG("PixelRDORawData collection found with id "
275 << m_pixelId->show_to_string(rdocoll->identify())
276 << " and " << rdocoll->size() << " RDOs" );
277
278 // loop on all RDOs
280 for(rdo=rdocoll->begin() ;
281 rdo!=rdocoll->end() ; ++rdo) {
282
283 ATH_MSG_DEBUG("RDO ID=" << m_pixelId->show_to_string((*rdo)->identify())
284 << "RDO ToT=" << (*rdo)->getToT() << " id:"
285 << (*rdo)->identify().getString() );
286
287 }
288 }
289
290 // pixel element links
291
292 // Retrieve the element link vector
293 const PixelRDOElemLinkVec* linkVec = nullptr;
294 ATH_CHECK( evtStore()->retrieve(linkVec, "PixelRDOELs") );
295
296 ATH_MSG_DEBUG("PixelRDOElemLinkVec found with " << linkVec->pixelRDOs().size() << " RDOs " );
297 for(unsigned int i = 0; i < linkVec->pixelRDOs().size(); ++i) {
298 // Print out rdos from element link
300 ATH_MSG_DEBUG("RDO ID=" << m_pixelId->show_to_string((*rdo)->identify())
301 << "RDO ToT=" << (*rdo)->getToT()
302 << " id:" << (*rdo)->identify().getString() );
303 }
304
305
306 // scts
307
309 it!=m_sctCont->end() ; ++it) {
310
311 const InDetRawDataCollection< SCT_RDORawData > *rdocoll=&(**it);
312
313 ATH_MSG_DEBUG("SCT_RDORawData collection found with id "
314 << m_sctId->show_to_string(rdocoll->identify())
315 << " and " << rdocoll->size() << " RDOs" );
316
317 // loop on all RDOs
319 for(rdo=rdocoll->begin() ;
320 rdo!=rdocoll->end() ; ++rdo) {
321
322 ATH_MSG_DEBUG("RDO ID=" << m_sctId->show_to_string((*rdo)->identify())
323 << "RDO grp=" << (*rdo)->getGroupSize() );
324
325 }
326 }
327
328 // trts
329
331 it!=m_trtCont->end() ; ++it) {
332
333 const InDetRawDataCollection< TRT_RDORawData > *rdocoll=&(**it);
334
335 ATH_MSG_DEBUG("TRT_RDORawData collection found with id "
336 << m_trtId->show_to_string(rdocoll->identify())
337 << " and " << rdocoll->size() << " RDOs" );
338
339 // loop on all RDOs
341 for(rdo=rdocoll->begin() ;
342 rdo!=rdocoll->end() ; ++rdo) {
343
344 ATH_MSG_DEBUG("RDO ID=" << m_trtId->show_to_string((*rdo)->identify())
345 << "RDO hilvl=" << (*rdo)->highLevel() << " ToT:"
346 << (*rdo)->timeOverThreshold() << " drift: " << (*rdo)->driftTimeBin());
347
348 }
349 }
350
351 ATH_MSG_DEBUG("InDetRawDataFakeWriter::printRDOs() end" );
352
353 return StatusCode::SUCCESS;
354
355}
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:838
const_iterator end() const noexcept
const_iterator begin() const noexcept
virtual Identifier identify() const override final

◆ 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_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_pixCont

PixelRDO_Container* InDetRawDataFakeWriter::m_pixCont
private

Identifiable containers are created only once.

Definition at line 88 of file InDetRawDataFakeWriter.h.

◆ m_pixelId

const PixelID* InDetRawDataFakeWriter::m_pixelId
private

IDhelper needed for identifiable container.

Definition at line 97 of file InDetRawDataFakeWriter.h.

◆ m_sctCont

SCT_RDO_Container* InDetRawDataFakeWriter::m_sctCont
private

Identifiable containers are created only once.

Definition at line 91 of file InDetRawDataFakeWriter.h.

◆ m_sctId

const SCT_ID* InDetRawDataFakeWriter::m_sctId
private

IDhelper needed for identifiable container.

Definition at line 100 of file InDetRawDataFakeWriter.h.

◆ m_trtCont

TRT_RDO_Container* InDetRawDataFakeWriter::m_trtCont
private

Identifiable containers are created only once.

Definition at line 94 of file InDetRawDataFakeWriter.h.

◆ m_trtId

const TRT_ID* InDetRawDataFakeWriter::m_trtId
private

IDhelper needed for identifiable container.

Definition at line 103 of file InDetRawDataFakeWriter.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: