ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::SimHitTreeCreator Class Reference

#include <SimHitTreeCreator.h>

Inheritance diagram for ISF::SimHitTreeCreator:
Collaboration diagram for ISF::SimHitTreeCreator:

Public Member Functions

 SimHitTreeCreator (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters.
virtual ~SimHitTreeCreator ()
 Destructor.
virtual StatusCode initialize () override final
 Athena algorithm's interface method initialize()
virtual StatusCode execute () override final
 Athena algorithm's interface method execute()
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

StatusCode createSimHitsTree ()
 Create the simhits tree - validation mode only.
StatusCode fillSimHitsTree ()
 Fill the simhits tree - validation mode only.
void addHepMcParticleLinkInfoToTree (HepMcParticleLink &HMPL)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< ITHistSvc > m_thistSvc
 the histogram service
std::string m_validationStream
 validation THist stream name
TTree * m_t_simHits
 Validation output TTree (+variables)
int m_pileup
int m_type
int m_id
int m_mother
int m_barcode
float m_time
float m_drift
float m_edeposit
float m_momentum
float m_theta
float m_phi
float m_eta
SG::ReadHandleKey< SiHitCollectionm_bcmHits
SG::ReadHandleKey< SiHitCollectionm_blmHits
SG::ReadHandleKey< SiHitCollectionm_pixHits
SG::ReadHandleKey< SiHitCollectionm_sctHits
SG::ReadHandleKey< TRTUncompressedHitCollectionm_trtHits
SG::ReadHandleKey< SiHitCollectionm_pixPileupHits
SG::ReadHandleKey< SiHitCollectionm_sctPileupHits
SG::ReadHandleKey< TRTUncompressedHitCollectionm_trtPileupHits
SG::ReadHandleKey< MDTSimHitCollectionm_mdtHits
SG::ReadHandleKey< RPCSimHitCollectionm_rpcHits
SG::ReadHandleKey< TGCSimHitCollectionm_tgcHits
SG::ReadHandleKey< CSCSimHitCollectionm_cscHits
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 27 of file SimHitTreeCreator.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

◆ SimHitTreeCreator()

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

Constructor with parameters.

Definition at line 18 of file SimHitTreeCreator.cxx.

19 : ::AthAlgorithm( name, pSvcLocator )
20 , m_thistSvc("THistSvc",name)
21 , m_validationStream("ISFSimHit")
22 , m_t_simHits(nullptr)
23 , m_pileup(-1)
24 , m_type(-1)
25 , m_id(-1)
26 , m_mother(-1)
27 , m_barcode(-1)
28 , m_time(-1.)
29 , m_drift(-1.)
30 , m_edeposit(-1.)
31 , m_momentum(-1.)
32 , m_theta(-1.)
33 , m_phi(-1.)
34 , m_eta(-1.)
35 , m_bcmHits("BCMHits")
36 , m_blmHits("BLMHits")
37 , m_pixHits("PixelHits")
38 , m_sctHits("SCT_Hits")
39 , m_trtHits("TRTUncompressedHits")
40 , m_pixPileupHits("PileupPixelHits")
41 , m_sctPileupHits("PileupSCT_Hits")
42 , m_trtPileupHits("PileupTRTUncompressedHits")
43 , m_mdtHits("MDT_Hits")
44 , m_rpcHits("RPC_Hits")
45 , m_tgcHits("TGC_Hits")
46 , m_cscHits("CSC_Hits")
47{
48 declareProperty("ValidationStreamName",
49 m_validationStream = "ISFSimHit",
50 "Name of the output stream" );
51 declareProperty("THistService",
53 "The THistSvc" );
54
55 declareProperty("BCM_HitCollection", m_bcmHits );
56 declareProperty("BLM_HitCollection", m_blmHits );
57 declareProperty("PixelHitCollection", m_pixHits );
58 declareProperty("SCT_HitCollection", m_sctHits );
59 declareProperty("TRT_HitCollection", m_trtHits );
60 declareProperty("PileupPixelHitCollection", m_pixPileupHits );
61 declareProperty("PileupSCT_HitCollection", m_sctPileupHits );
62 declareProperty("PileupTRT_HitCollection", m_trtPileupHits );
63 declareProperty("MDT_HitCollection", m_mdtHits );
64 declareProperty("RPC_HitCollection", m_rpcHits );
65 declareProperty("TGC_HitCollection", m_tgcHits );
66 declareProperty("CSC_HitCollection", m_cscHits );
67
68}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
SG::ReadHandleKey< SiHitCollection > m_bcmHits
SG::ReadHandleKey< SiHitCollection > m_blmHits
SG::ReadHandleKey< TGCSimHitCollection > m_tgcHits
SG::ReadHandleKey< RPCSimHitCollection > m_rpcHits
SG::ReadHandleKey< SiHitCollection > m_sctHits
std::string m_validationStream
validation THist stream name
SG::ReadHandleKey< MDTSimHitCollection > m_mdtHits
SG::ReadHandleKey< TRTUncompressedHitCollection > m_trtPileupHits
SG::ReadHandleKey< SiHitCollection > m_pixPileupHits
SG::ReadHandleKey< SiHitCollection > m_pixHits
SG::ReadHandleKey< TRTUncompressedHitCollection > m_trtHits
ServiceHandle< ITHistSvc > m_thistSvc
the histogram service
SG::ReadHandleKey< SiHitCollection > m_sctPileupHits
SG::ReadHandleKey< CSCSimHitCollection > m_cscHits
TTree * m_t_simHits
Validation output TTree (+variables)

◆ ~SimHitTreeCreator()

ISF::SimHitTreeCreator::~SimHitTreeCreator ( )
virtual

Destructor.

Definition at line 72 of file SimHitTreeCreator.cxx.

73{}

Member Function Documentation

◆ addHepMcParticleLinkInfoToTree()

void ISF::SimHitTreeCreator::addHepMcParticleLinkInfoToTree ( HepMcParticleLink & HMPL)
private

Definition at line 310 of file SimHitTreeCreator.cxx.

310 {
311 if (HMPL.isValid()) {
312 auto t_mom=(HMPL.cptr())->momentum();
313 m_momentum = std::sqrt( t_mom.x()*t_mom.x()+t_mom.y()*t_mom.y()+t_mom.z()*t_mom.z());
314 m_eta= (HMPL.cptr())->momentum().eta();
315 m_theta= (HMPL.cptr())->momentum().theta();
316 m_phi = (HMPL.cptr())->momentum().phi();
317 }
318 else {
319 m_momentum=-1.;
320 m_theta=-1.;
321 m_eta=-10.;
322 m_phi = -10.;
323 }
324 return;
325}

◆ createSimHitsTree()

StatusCode ISF::SimHitTreeCreator::createSimHitsTree ( )
private

Create the simhits tree - validation mode only.

Definition at line 103 of file SimHitTreeCreator.cxx.

103 {
104 // Create the prefix of histogram names for the THistSvc
105 //std::string prefix = "/" + m_validationStream + "/";
106 const char *treeName="simhits";
107 const std::string prefix = "/" + m_validationStream + "/"+ treeName;
108 m_t_simHits = new TTree( treeName, treeName );
109 m_t_simHits->Branch("pileup" , &m_pileup , "pileup/I" );
110 m_t_simHits->Branch("type" , &m_type , "type/I" );
111 m_t_simHits->Branch("id" , &m_id , "id/I" );
112 m_t_simHits->Branch("mother" , &m_mother , "mother/I" );
113 m_t_simHits->Branch("barcode" , &m_barcode , "barcode/I" );
114 m_t_simHits->Branch("momentum" , &m_momentum , "momentum/F" );
115 m_t_simHits->Branch("time" , &m_time , "time/F" );
116 m_t_simHits->Branch("drift" , &m_drift , "dist/F" );
117 m_t_simHits->Branch("edeposit" , &m_edeposit , "edeposit/F" );
118 m_t_simHits->Branch("theta" , &m_theta , "theta/F" );
119 m_t_simHits->Branch("phi" , &m_phi , "phi/F" );
120 m_t_simHits->Branch("eta" , &m_eta , "eta/F" );
121
122 // register the Tree to the THistSvc and return it's StatusCodes
123 ATH_CHECK( m_thistSvc->regTree( prefix, m_t_simHits) );
124
125 return StatusCode::SUCCESS;
126}
#define ATH_CHECK
Evaluate an expression and check for errors.

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

◆ 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 ISF::SimHitTreeCreator::execute ( )
finaloverridevirtual

Athena algorithm's interface method execute()

Definition at line 97 of file SimHitTreeCreator.cxx.

97 {
99 return StatusCode::SUCCESS;
100}
StatusCode fillSimHitsTree()
Fill the simhits tree - validation mode only.

◆ 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

◆ fillSimHitsTree()

StatusCode ISF::SimHitTreeCreator::fillSimHitsTree ( )
private

Fill the simhits tree - validation mode only.

Fill the simhit TTree - validation mode only.

Definition at line 129 of file SimHitTreeCreator.cxx.

130{
131 // loop over collections
132
133 SG::ReadHandle<MDTSimHitCollection> mdtHits(m_mdtHits);
134 if (mdtHits.isValid() && mdtHits->size()) {
135 MDTSimHitCollection::const_iterator ih=mdtHits->begin();
136 while ( ih!=mdtHits->end()) {
137 m_type = 1;
138 m_id = (*ih).MDTid();
139 m_mother = (*ih).particleEncoding();
140 m_time = (*ih).globalTime();
141 m_drift = (*ih).driftRadius();
142 m_edeposit = (*ih).energyDeposit();
143 m_barcode = (*ih).truthBarcode();
144 HepMcParticleLink HMPL = (*ih).particleLink();
146
147 ++ih;
148 while (ih!=mdtHits->end() && m_id==(*ih).MDTid() && m_barcode==(*ih).truthBarcode() ) {
149 // merge energy deposits and move on
150 m_edeposit += (*ih).energyDeposit();
151 ++ih;
152 }
153 m_t_simHits->Fill();
154 }
155 }
156
157 SG::ReadHandle<RPCSimHitCollection> rpcHits(m_rpcHits);
158 if (rpcHits.isValid() && rpcHits->size()) {
159 RPCSimHitCollection::const_iterator ih=rpcHits->begin();
160 while (ih!=rpcHits->end()) {
161 m_type = 2;
162 m_id = (*ih).RPCid();
163 m_mother = (*ih).particleEncoding();
164 m_time = (*ih).globalTime();
165 m_drift = 0.;
166 m_edeposit = (*ih).energyDeposit();
167 m_barcode = (*ih).truthBarcode();
168 HepMcParticleLink HMPL = (*ih).particleLink();
170
171 ++ih;
172 while (ih!=rpcHits->end() && m_id==(*ih).RPCid() && m_barcode==(*ih).truthBarcode() ) {
173 // merge energy deposits and move on
174 m_edeposit += (*ih).energyDeposit();
175 ++ih;
176 }
177 m_t_simHits->Fill();
178 }
179 }
180
181 SG::ReadHandle<TGCSimHitCollection> tgcHits(m_tgcHits);
182 if (tgcHits.isValid() && tgcHits->size()) {
183 TGCSimHitCollection::const_iterator ih=tgcHits->begin();
184 while ( ih!=tgcHits->end()) {
185 m_type = 3;
186 m_id = (*ih).TGCid();
187 m_mother = (*ih).particleEncoding();
188 m_time = (*ih).globalTime();
189 m_drift = 0.;
190 m_edeposit = (*ih).energyDeposit();
191 m_barcode = (*ih).truthBarcode();
192 HepMcParticleLink HMPL = (*ih).particleLink();
194
195 ++ih;
196 while (ih!=tgcHits->end() && m_id==(*ih).TGCid() && m_barcode==(*ih).truthBarcode() ) {
197 // merge energy deposits and move on
198 m_edeposit += (*ih).energyDeposit();
199 ++ih;
200 }
201 m_t_simHits->Fill();
202 }
203 }
204
205 SG::ReadHandle<CSCSimHitCollection> cscHits(m_cscHits);
206 if (cscHits.isValid() && cscHits->size()) {
207 CSCSimHitCollection::const_iterator ih=cscHits->begin();
208 while ( ih!=cscHits->end()) {
209 m_type = 4;
210 m_id = (*ih).CSCid();
211 m_mother = (*ih).particleID();
212 m_time = (*ih).globalTime();
213 m_drift = 0.;
214 m_edeposit = (*ih).energyDeposit();
215 m_barcode = (*ih).truthBarcode();
216 HepMcParticleLink HMPL = (*ih).particleLink();
218
219 ++ih;
220 while (ih!=cscHits->end() && m_id==(*ih).CSCid() && m_barcode==(*ih).truthBarcode() ) {
221 // merge energy deposits and move on
222 m_edeposit += (*ih).energyDeposit();
223 ++ih;
224 }
225 m_t_simHits->Fill();
226 }
227 }
228
229 for (int ipileup=0;ipileup<2;ipileup++) {
230 m_pileup = ipileup;
231
232 SG::ReadHandle<SiHitCollection> pixHits((ipileup==0) ? m_pixHits : m_pixPileupHits);
233 if (pixHits.isValid() && pixHits->size()) {
234 SiHitCollection::const_iterator ih=pixHits->begin();
235 while (ih!=pixHits->end()) {
236 m_type = 5;
237 m_id = (*ih).identify();
238 HepMcParticleLink HMPL = (*ih).particleLink();
239 if (HMPL.isValid()) m_mother = (HMPL.cptr())->pdg_id();
240 else m_mother=0;
241 m_time = (*ih).meanTime();
242 m_drift = 0.;
243 m_edeposit = (*ih).energyLoss();
244 m_barcode = (*ih).truthBarcode();
246
247 ++ih;
248 while (ih!=pixHits->end() && ((unsigned int)m_id)==(*ih).identify() && m_barcode==(*ih).truthBarcode() ) {
249 // merge energy deposits and move on
250 m_edeposit += (*ih).energyLoss();
251 ++ih;
252 }
253 m_t_simHits->Fill();
254 }
255 }
256
257 SG::ReadHandle<SiHitCollection> sctHits((ipileup==0) ? m_sctHits : m_sctPileupHits);
258 if (sctHits.isValid() && sctHits->size()) {
259 SiHitCollection::const_iterator ih=sctHits->begin();
260 while (ih!=sctHits->end()) {
261 m_type = 6;
262 m_id = (*ih).identify();
263 HepMcParticleLink HMPL = (*ih).particleLink();
264 if (HMPL.isValid()) m_mother = (HMPL.cptr())->pdg_id();
265 else m_mother=0;
266 m_time = (*ih).meanTime();
267 m_drift = 0.;
268 m_edeposit = (*ih).energyLoss();
269 m_barcode = (*ih).truthBarcode();
271
272 ++ih;
273 while (ih!=sctHits->end() && ((unsigned int)m_id)==(*ih).identify() && m_barcode==(*ih).truthBarcode() ) {
274 // merge energy deposits and move on
275 m_edeposit += (*ih).energyLoss();
276 ++ih;
277 }
278 m_t_simHits->Fill();
279 }
280 }
281
282 SG::ReadHandle<TRTUncompressedHitCollection> trtHits((ipileup==0) ? m_trtHits : m_trtPileupHits);
283 if (trtHits.isValid() && trtHits->size()) {
285 while ( ih!=trtHits->end()) {
286 m_type = 7;
287 m_id = (*ih).GetHitID();
288 m_mother = (*ih).GetParticleEncoding();
289 HepMcParticleLink HMPL = (*ih).particleLink();
290 m_time = (*ih).GetGlobalTime();
291 m_drift = 0.;
292 m_edeposit = (*ih).GetEnergyDeposit();
293 m_barcode = (*ih).truthBarcode();
295
296 ++ih;
297 while (ih!=trtHits->end() && m_id==(*ih).GetHitID() && m_barcode==(*ih).truthBarcode() ) {
298 // merge energy deposits and move on
299 m_edeposit += (*ih).GetEnergyDeposit();
300 ++ih;
301 }
302 m_t_simHits->Fill();
303 }
304 }
305 }
306 return StatusCode::SUCCESS;
307}
CONT::const_iterator const_iterator
void addHepMcParticleLinkInfoToTree(HepMcParticleLink &HMPL)

◆ initialize()

StatusCode ISF::SimHitTreeCreator::initialize ( )
finaloverridevirtual

Athena algorithm's interface method initialize()

framework methods

Definition at line 76 of file SimHitTreeCreator.cxx.

76 {
77 // retrieve the histogram service
78 ATH_CHECK( m_thistSvc.retrieve() );
79
81
82 ATH_CHECK( m_bcmHits.initialize() );
83 ATH_CHECK( m_blmHits.initialize() );
84 ATH_CHECK( m_pixHits.initialize() );
85 ATH_CHECK( m_sctHits.initialize() );
86 ATH_CHECK( m_trtHits.initialize() );
87 ATH_CHECK( m_pixPileupHits.initialize() );
88 ATH_CHECK( m_sctPileupHits.initialize() );
89 ATH_CHECK( m_trtPileupHits.initialize() );
90 ATH_CHECK( m_mdtHits.initialize() );
91 ATH_CHECK( m_rpcHits.initialize() );
92 ATH_CHECK( m_tgcHits.initialize() );
93 ATH_CHECK( m_cscHits.initialize() );
94 return StatusCode::SUCCESS;
95}
StatusCode createSimHitsTree()
Create the simhits tree - validation mode only.

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

◆ 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();
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_ERROR(x)
#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_barcode

int ISF::SimHitTreeCreator::m_barcode
private

Definition at line 58 of file SimHitTreeCreator.h.

◆ m_bcmHits

SG::ReadHandleKey<SiHitCollection> ISF::SimHitTreeCreator::m_bcmHits
private

Definition at line 69 of file SimHitTreeCreator.h.

◆ m_blmHits

SG::ReadHandleKey<SiHitCollection> ISF::SimHitTreeCreator::m_blmHits
private

Definition at line 70 of file SimHitTreeCreator.h.

◆ m_cscHits

SG::ReadHandleKey<CSCSimHitCollection> ISF::SimHitTreeCreator::m_cscHits
private

Definition at line 82 of file SimHitTreeCreator.h.

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

float ISF::SimHitTreeCreator::m_drift
private

Definition at line 60 of file SimHitTreeCreator.h.

◆ m_edeposit

float ISF::SimHitTreeCreator::m_edeposit
private

Definition at line 61 of file SimHitTreeCreator.h.

◆ m_eta

float ISF::SimHitTreeCreator::m_eta
private

Definition at line 65 of file SimHitTreeCreator.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_id

int ISF::SimHitTreeCreator::m_id
private

Definition at line 56 of file SimHitTreeCreator.h.

◆ m_mdtHits

SG::ReadHandleKey<MDTSimHitCollection> ISF::SimHitTreeCreator::m_mdtHits
private

Definition at line 79 of file SimHitTreeCreator.h.

◆ m_momentum

float ISF::SimHitTreeCreator::m_momentum
private

Definition at line 62 of file SimHitTreeCreator.h.

◆ m_mother

int ISF::SimHitTreeCreator::m_mother
private

Definition at line 57 of file SimHitTreeCreator.h.

◆ m_phi

float ISF::SimHitTreeCreator::m_phi
private

Definition at line 64 of file SimHitTreeCreator.h.

◆ m_pileup

int ISF::SimHitTreeCreator::m_pileup
private

Definition at line 54 of file SimHitTreeCreator.h.

◆ m_pixHits

SG::ReadHandleKey<SiHitCollection> ISF::SimHitTreeCreator::m_pixHits
private

Definition at line 71 of file SimHitTreeCreator.h.

◆ m_pixPileupHits

SG::ReadHandleKey<SiHitCollection> ISF::SimHitTreeCreator::m_pixPileupHits
private

Definition at line 74 of file SimHitTreeCreator.h.

◆ m_rpcHits

SG::ReadHandleKey<RPCSimHitCollection> ISF::SimHitTreeCreator::m_rpcHits
private

Definition at line 80 of file SimHitTreeCreator.h.

◆ m_sctHits

SG::ReadHandleKey<SiHitCollection> ISF::SimHitTreeCreator::m_sctHits
private

Definition at line 72 of file SimHitTreeCreator.h.

◆ m_sctPileupHits

SG::ReadHandleKey<SiHitCollection> ISF::SimHitTreeCreator::m_sctPileupHits
private

Definition at line 75 of file SimHitTreeCreator.h.

◆ m_t_simHits

TTree* ISF::SimHitTreeCreator::m_t_simHits
private

Validation output TTree (+variables)

ROOT tree containing simulated hit info

Definition at line 53 of file SimHitTreeCreator.h.

◆ m_tgcHits

SG::ReadHandleKey<TGCSimHitCollection> ISF::SimHitTreeCreator::m_tgcHits
private

Definition at line 81 of file SimHitTreeCreator.h.

◆ m_theta

float ISF::SimHitTreeCreator::m_theta
private

Definition at line 63 of file SimHitTreeCreator.h.

◆ m_thistSvc

ServiceHandle<ITHistSvc> ISF::SimHitTreeCreator::m_thistSvc
private

the histogram service

Definition at line 50 of file SimHitTreeCreator.h.

◆ m_time

float ISF::SimHitTreeCreator::m_time
private

Definition at line 59 of file SimHitTreeCreator.h.

◆ m_trtHits

SG::ReadHandleKey<TRTUncompressedHitCollection> ISF::SimHitTreeCreator::m_trtHits
private

Definition at line 73 of file SimHitTreeCreator.h.

◆ m_trtPileupHits

SG::ReadHandleKey<TRTUncompressedHitCollection> ISF::SimHitTreeCreator::m_trtPileupHits
private

Definition at line 76 of file SimHitTreeCreator.h.

◆ m_type

int ISF::SimHitTreeCreator::m_type
private

Definition at line 55 of file SimHitTreeCreator.h.

◆ m_validationStream

std::string ISF::SimHitTreeCreator::m_validationStream
private

validation THist stream name

Definition at line 51 of file SimHitTreeCreator.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: