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

#include <LArHV2Ntuple.h>

Inheritance diagram for LArHV2Ntuple:
Collaboration diagram for LArHV2Ntuple:

Public Member Functions

 LArHV2Ntuple (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor.
virtual ~LArHV2Ntuple ()
 Default Destructor.
virtual StatusCode initialize () override
 standard Athena-Algorithm method
virtual StatusCode execute (const EventContext &ctx) override
 standard Athena-Algorithm method
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
bool filterPassed (const EventContext &ctx) const
void setFilterPassed (bool state, const EventContext &ctx) const
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
const EventContext & getContext () const
 Deprecated methods (use the ones with EventContext).
bool filterPassed () const
void setFilterPassed (bool state) const

Public Attributes

 parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
 dest
 default
 help
 type
 None
 args = parser.parse_args()
 flags = initConfigFlags()
 RunNumbers
 AtlasVersion
 Files
 isMC
 doAlign
 Run
 DatabaseInstance
 GlobalTag
 cfg = MainServicesCfg(flags)
 rootfile = args.out

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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

std::vector< int > GetHVLines (const EMBHVManager::EMBHVData &hvdata_EMB, const EMBPresamplerHVManager::EMBPresamplerHVData &hvdata_EMBPS, const EMECHVManager::EMECHVData &hvdata_EMEC_OUT, const EMECHVManager::EMECHVData &hvdata_EMEC_IN, const EMECPresamplerHVManager::EMECPresamplerHVData &hvdata_EMECPS, const HECHVManager::HECHVData &hvdata_HEC, const FCALHVManager::FCALHVData &hvdata_FCAL, const Identifier &id, const CaloDetDescrManager *calodetdescrmgr)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"}
SG::ReadCondHandleKey< LArHVIdMappingm_hvCablingKey {this, "LArHVIdMapping", "LArHVIdMap", "SG key for HV ID mapping"}
SG::ReadCondHandleKeyArray< CondAttrListCollectionm_DCSFolderKeys { this, "DCSFolderNames", {"/LAR/DCS/HV/BARREl/I16", "/LAR/DCS/HV/BARREL/I8"}, "DCS folders with HV values"}
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey
ServiceHandle< ITHistSvc > m_thistSvc {this,"THistSvc","THistSvc"}
TTree * m_tree
bool m_addcells
int m_bec
int m_isPresampler
float m_eta
float m_phi
int m_electrode
int m_gap
int m_hvline
float m_hv
float m_current
int m_barrelec
int m_posneg
int m_FT
int m_slot
int m_channel
const CaloCell_IDm_caloId
const LArOnlineIDm_onlId
std::map< int, std::vector< HWIdentifier > > m_hvonlId_map
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 38 of file LArHV2Ntuple.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArHV2Ntuple()

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

Standard Athena-Algorithm Constructor.

Definition at line 31 of file LArHV2Ntuple.cxx.

31 :
32 AthAlgorithm(name,pSvcLocator),
33 m_tree(nullptr),
34 m_addcells(false),
35 m_bec(0),
36 m_isPresampler(0),
37 m_eta(0),
38 m_phi(0),
39 m_electrode(0),
40 m_gap(0),
41 m_hvline(0),
42 m_hv(0),
43 m_current(0),
44 m_barrelec(0), m_posneg(0), m_FT(0),m_slot(0),m_channel(0),
45 m_caloId(nullptr), m_onlId(nullptr)
46 {
47 declareProperty("AddCellID",m_addcells);
48 }
Base class from which non-reentrant (not thread-safe) Athena algorithm classes should be derived.

◆ ~LArHV2Ntuple()

LArHV2Ntuple::~LArHV2Ntuple ( )
virtual

Default Destructor.

Definition at line 52 of file LArHV2Ntuple.cxx.

53 {
54 ATH_MSG_DEBUG ( "LArHV2Ntuple destructor called" );
55 }
#define ATH_MSG_DEBUG(x)

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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 LArHV2Ntuple::execute ( const EventContext & ctx)
overridevirtual

standard Athena-Algorithm method

Implements AthAlgorithm.

Definition at line 92 of file LArHV2Ntuple.cxx.

93 {
94
95 //.............................................
96
97 // FIXME: Use LArHVData instead?
98 SG::ReadCondHandle<LArHVIdMapping> hvCabling (m_hvCablingKey, ctx);
99 std::vector<const CondAttrListCollection*> attrLists;
100 for (const SG::ReadCondHandleKey<CondAttrListCollection>& k : m_DCSFolderKeys)
101 {
103 attrLists.push_back (*attrList);
104 }
105 const LArHVManager *manager = nullptr;
106 ATH_CHECK( detStore()->retrieve(manager) );
107
108 const EMBHVManager& hvManager_EMB=manager->getEMBHVManager();
109 const EMBHVManager::EMBHVData hvdata_EMB = hvManager_EMB.getData (**hvCabling, attrLists);
110
111 const EMBPresamplerHVManager& hvManager_EMBPS=manager->getEMBPresamplerHVManager();
112 const EMBPresamplerHVManager::EMBPresamplerHVData hvdata_EMBPS = hvManager_EMBPS.getData (**hvCabling, attrLists);
113
114 const EMECPresamplerHVManager& hvManager_EMECPS=manager->getEMECPresamplerHVManager();
115 const EMECPresamplerHVManager::EMECPresamplerHVData hvdata_EMECPS = hvManager_EMECPS.getData (**hvCabling, attrLists);
116
117 const EMECHVManager& hvManager_EMEC_OUT=manager->getEMECHVManager(EMECHVModule::OUTER);
118 const EMECHVManager::EMECHVData hvdata_EMEC_OUT = hvManager_EMEC_OUT.getData (**hvCabling, attrLists);
119
120 const EMECHVManager& hvManager_EMEC_IN=manager->getEMECHVManager(EMECHVModule::INNER);
121 const EMECHVManager::EMECHVData hvdata_EMEC_IN = hvManager_EMEC_IN.getData (**hvCabling, attrLists);
122
123 const HECHVManager& hvManager_HEC=manager->getHECHVManager();
124 const HECHVManager::HECHVData hvdata_HEC = hvManager_HEC.getData (**hvCabling, attrLists);
125
126 const FCALHVManager& hvManager_FCAL=manager->getFCALHVManager();
127 const FCALHVManager::FCALHVData hvdata_FCAL = hvManager_FCAL.getData (**hvCabling, attrLists);
128
129 if(m_hvonlId_map.empty()) {
130 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, ctx};
131 const LArOnOffIdMapping* cabling{*cablingHdl};
132 if(!cabling) {
133 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
134 return StatusCode::FAILURE;
135 }
136
137 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey, ctx};
138 ATH_CHECK(caloMgrHandle.isValid());
139 const CaloDetDescrManager* calodetdescrmgr=*caloMgrHandle;
140 std::vector<Identifier>::const_iterator cell_b=m_caloId->cell_begin();
141 std::vector<Identifier>::const_iterator cell_e=m_caloId->cell_end();
142 for(;cell_b!=cell_e; ++cell_b) {
143 if(m_caloId->is_tile(*cell_b)) continue;
144 HWIdentifier onlid = cabling->createSignalChannelID(*cell_b);
145 std::vector<int> hvlines = GetHVLines (hvdata_EMB,
146 hvdata_EMBPS,
147 hvdata_EMEC_OUT,
148 hvdata_EMEC_IN,
149 hvdata_EMECPS,
150 hvdata_HEC,
151 hvdata_FCAL,
152 *cell_b,
153 calodetdescrmgr);
154 for(unsigned i=0; i<hvlines.size(); ++i ) {
155 if(m_hvonlId_map.find(hvlines[i]) == m_hvonlId_map.end()) { // new key
156 std::vector<HWIdentifier> vec;
157 vec.push_back(onlid);
158 m_hvonlId_map[hvlines[i]] = vec;
159 } else { // existing key
160 m_hvonlId_map[hvlines[i]].push_back(onlid);
161 }
162 }
163 }// end map filling
164 }
165
166 for (unsigned int iSide=EMBHVManager::beginSideIndex();iSide<EMBHVManager::endSideIndex();iSide++) { // loop over HV modules
167 for (unsigned int iPhi=hvManager_EMB.beginPhiIndex();iPhi<hvManager_EMB.endPhiIndex();iPhi++) {
168 for (unsigned int iSector=EMBHVManager::beginSectorIndex();iSector<EMBHVManager::endSectorIndex();iSector++) {
169 for (unsigned int iEta=hvManager_EMB.beginEtaIndex();iEta<hvManager_EMB.endEtaIndex();iEta++) { //0 to 7
170 const EMBHVModule& hvMod = hvManager_EMB.getHVModule(iSide,iEta,iPhi,iSector);
171 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
172 for (unsigned int ielec=0;ielec<32;ielec++) { //use hvMod->getNumElectrodes when bug is corrected
173 const EMBHVElectrode& electrode = hvMod.getElectrode(ielec);
174 for (unsigned int iGap=0;iGap<2;iGap++) { // EMB : 2, TRY TO FIND AUTOMATICALLY NB OF GAPS
175 float hv = hvdata_EMB.voltage (electrode, iGap);
176 float current = hvdata_EMB.current (electrode, iGap);
177 float phi = electrode.getPhi();
178
179 m_bec=0;
181 m_eta=eta;
182 m_phi=phi;
183 m_electrode = ielec;
184 m_gap = iGap;
185 m_hv = hv;
187 m_hvline = hvdata_EMB.hvLineNo (electrode, iGap);
188
189 if(m_addcells) {
190 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
191 m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
192 m_posneg=m_onlId->pos_neg(m_hvonlId_map[m_hvline][i]);
193 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
194 m_slot=m_onlId->slot(m_hvonlId_map[m_hvline][i]);
195 m_channel=m_onlId->channel(m_hvonlId_map[m_hvline][i]);
196 m_tree->Fill();
197 }
198 } else m_tree->Fill();
199
200 } //end for iGap
201 }
202 }
203 }
204 }
205 } //EMBHVManager
206
207 for (unsigned int iSide=EMBPresamplerHVManager::beginSideIndex();iSide<EMBPresamplerHVManager::endSideIndex();iSide++) { // loop over HV modules
208 for (unsigned int iPhi=hvManager_EMBPS.beginPhiIndex();iPhi<hvManager_EMBPS.endPhiIndex();iPhi++) {
209 for (unsigned int iEta=hvManager_EMBPS.beginEtaIndex();iEta<hvManager_EMBPS.endEtaIndex();iEta++) { //0 to 7
210 const EMBPresamplerHVModule& hvMod = hvManager_EMBPS.getHVModule(iSide,iEta,iPhi);
211 for (int iGap=0;iGap<2;iGap++) {
212 float hv = hvdata_EMBPS.voltage (hvMod, iGap);
213 float current = hvdata_EMBPS.current (hvMod, iGap);
214 float eta = 0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
215 float phi= 0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
216
217 m_bec=0;
219 m_eta=eta;
220 m_phi=phi;
221 m_electrode = 0;
222 m_gap = iGap;
223 m_hv = hv;
225 m_hvline = hvdata_EMBPS.hvLineNo (hvMod, iGap);
226
227 if(m_addcells) {
228 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
229 m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
230 m_posneg=m_onlId->pos_neg(m_hvonlId_map[m_hvline][i]);
231 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
232 m_slot=m_onlId->slot(m_hvonlId_map[m_hvline][i]);
233 m_channel=m_onlId->channel(m_hvonlId_map[m_hvline][i]);
234 m_tree->Fill();
235 }
236 } else m_tree->Fill();
237
238 } //end for iGap
239 }
240 }
241 } //EMBPresampler
242
243 for (unsigned int iSide=EMECPresamplerHVManager::beginSideIndex();iSide<EMECPresamplerHVManager::endSideIndex();iSide++) { // loop over HV modules
244 for (unsigned int iPhi=hvManager_EMECPS.beginPhiIndex();iPhi<hvManager_EMECPS.endPhiIndex();iPhi++) {
245 const EMECPresamplerHVModule& hvMod = hvManager_EMECPS.getHVModule(iSide,iPhi);
246 for (int iGap=0;iGap<2;iGap++) {
247 float hv = hvdata_EMECPS.voltage (hvMod, iGap);
248 float current = hvdata_EMECPS.current (hvMod, iGap);
249 float eta = 0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
250 float phi=0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
251
252 m_bec=1;
254 m_eta=eta;
255 m_phi=phi;
256 m_electrode = 0;
257 m_gap = iGap;
258 m_hv = hv;
260 m_hvline = hvdata_EMECPS.hvLineNo (hvMod, iGap);
261
262 if(m_addcells) {
263 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
264 m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
265 m_posneg=m_onlId->pos_neg(m_hvonlId_map[m_hvline][i]);
266 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
267 m_slot=m_onlId->slot(m_hvonlId_map[m_hvline][i]);
268 m_channel=m_onlId->channel(m_hvonlId_map[m_hvline][i]);
269 m_tree->Fill();
270 }
271 } else m_tree->Fill();
272
273 } //end for iGap
274 }
275 }//EMECPresampler
276
277
278
279 for (unsigned int iSide=EMECHVManager::beginSideIndex();iSide<EMECHVManager::endSideIndex();iSide++) { // loop over HV modules
280 for (unsigned int iPhi=hvManager_EMEC_OUT.beginPhiIndex();iPhi<hvManager_EMEC_OUT.endPhiIndex();iPhi++) {
281 for (unsigned int iSector=hvManager_EMEC_OUT.beginSectorIndex();iSector<hvManager_EMEC_OUT.endSectorIndex();iSector++) {
282 for (unsigned int iEta=hvManager_EMEC_OUT.beginEtaIndex();iEta<hvManager_EMEC_OUT.endEtaIndex();iEta++) {
283 const EMECHVModule& hvMod=hvManager_EMEC_OUT.getHVModule(iSide,iEta,iPhi,iSector);
284 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
285 for (unsigned int ielec=0;ielec<hvMod.getNumElectrodes();ielec++) { //use hvMod.getNumElectrodes when bug is corrected
286 const EMECHVElectrode& electrode = hvMod.getElectrode(ielec);
287 for (unsigned int iGap=0;iGap<2;iGap++) { //EMEC : 2 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
288 float hv = hvdata_EMEC_OUT.voltage (electrode, iGap);
289 float current = hvdata_EMEC_OUT.current (electrode, iGap);
290 float phi = electrode.getPhi();
291
292 m_bec=1;
294 m_eta=eta;
295 m_phi=phi;
296 m_electrode = ielec;
297 m_gap = iGap;
298 m_hv = hv;
300 m_hvline = hvdata_EMEC_OUT.hvLineNo (electrode, iGap);
301
302 if(m_addcells) {
303 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
304 m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
305 m_posneg=m_onlId->pos_neg(m_hvonlId_map[m_hvline][i]);
306 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
307 m_slot=m_onlId->slot(m_hvonlId_map[m_hvline][i]);
308 m_channel=m_onlId->channel(m_hvonlId_map[m_hvline][i]);
309 m_tree->Fill();
310 }
311 } else m_tree->Fill();
312
313 } //end for iGap
314 }
315 }
316 }
317 }
318 }//EMEC Outer
319
320 for (unsigned int iSide=EMECHVManager::beginSideIndex();iSide<EMECHVManager::endSideIndex();iSide++) { // loop over HV modules
321 for (unsigned int iPhi=hvManager_EMEC_IN.beginPhiIndex();iPhi<hvManager_EMEC_IN.endPhiIndex();iPhi++) {
322 for (unsigned int iSector=hvManager_EMEC_IN.beginSectorIndex();iSector<hvManager_EMEC_IN.endSectorIndex();iSector++) {
323 for (unsigned int iEta=hvManager_EMEC_IN.beginEtaIndex();iEta<hvManager_EMEC_IN.endEtaIndex();iEta++) {
324 const EMECHVModule& hvMod=hvManager_EMEC_IN.getHVModule(iSide,iEta,iPhi,iSector);
325 float eta=0.5*(hvMod.getEtaMin()+hvMod.getEtaMax());
326 for (unsigned int ielec=0;ielec<hvMod.getNumElectrodes();ielec++) { //use hvMod.getNumElectrodes when bug is corrected
327 const EMECHVElectrode& electrode = hvMod.getElectrode(ielec);
328 for (unsigned int iGap=0;iGap<2;iGap++) { //EMEC : 2 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
329 float hv = hvdata_EMEC_IN.voltage (electrode, iGap);
330 float current = hvdata_EMEC_IN.current (electrode, iGap);
331 float phi = electrode.getPhi();
332
333 m_bec=2;
335 m_eta=eta;
336 m_phi=phi;
337 m_electrode = ielec;
338 m_gap = iGap;
339 m_hv = hv;
341 m_hvline = hvdata_EMEC_IN.hvLineNo (electrode, iGap);
342
343 if(m_addcells) {
344 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
345 m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
346 m_posneg=m_onlId->pos_neg(m_hvonlId_map[m_hvline][i]);
347 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
348 m_slot=m_onlId->slot(m_hvonlId_map[m_hvline][i]);
349 m_channel=m_onlId->channel(m_hvonlId_map[m_hvline][i]);
350 m_tree->Fill();
351 }
352 } else m_tree->Fill();
353
354 } //end for iGap
355 }
356 }
357 }
358 }
359 }// EMEC Inner
360
361 float etamax_layer[4]={3.3,3.1,3.1,3.3};
362 float etamin_layer[4]={1.5,1.5,1.6,1.7};
363
364
365 for (unsigned int iSide=HECHVManager::beginSideIndex();iSide<HECHVManager::endSideIndex();iSide++) { // loop over HV modules
366 for (unsigned int iPhi=HECHVManager::beginPhiIndex();iPhi<HECHVManager::endPhiIndex();iPhi++) {
367 for (unsigned int iSampling=HECHVManager::beginSamplingIndex();iSampling<HECHVManager::endSamplingIndex();iSampling++) {
368 float eta_min,eta_max;
369 if (iSide==1) {
370 eta_min = etamin_layer[iSampling];
371 eta_max = etamax_layer[iSampling];
372 } else {
373 eta_min = -1.*etamax_layer[iSampling];
374 eta_max = -1.*etamin_layer[iSampling];
375 }
376 float eta = 0.5*(eta_min+eta_max);
377 const HECHVModule& hvMod = hvManager_HEC.getHVModule(iSide,iPhi,iSampling);
378 float phi = 0.5*(hvMod.getPhiMin()+hvMod.getPhiMax());
379
380 for (unsigned int iGap=0;iGap<HECHVModule::getNumSubgaps();iGap++) {//HEC : 4 gaps, TRY TO FIND AUTOMATICALLY NB OF GAPS
381 const HECHVSubgap& subgap=hvMod.getSubgap(iGap);
382 float hv = hvdata_HEC.voltage (subgap);
383 float current = hvdata_HEC.current (subgap);
384 m_bec = 10+iSampling;
386 m_eta=eta;
387 m_phi=phi;
388 m_electrode = 0;
389 m_gap = iGap;
390 m_hv=hv;
392 m_hvline = hvdata_HEC.hvLineNo (subgap);
393 if(m_addcells) {
394 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
395 m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
396 m_posneg=m_onlId->pos_neg(m_hvonlId_map[m_hvline][i]);
397 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
398 m_slot=m_onlId->slot(m_hvonlId_map[m_hvline][i]);
399 m_channel=m_onlId->channel(m_hvonlId_map[m_hvline][i]);
400 m_tree->Fill();
401 }
402 } else m_tree->Fill();
403 }// end for iGap
404 }
405 }
406 }//HECHVManager
407
408 for (unsigned int iSide=FCALHVManager::beginSideIndex();iSide<FCALHVManager::endSideIndex();iSide++) { // loop over HV modules
409 float eta_min=3.1,eta_max=4.9;
410 if (iSide==0) { eta_min=-4.9; eta_max=-3.1; }
411
412 float eta = 0.5*(eta_min+eta_max);
413 for (unsigned int iSampling=FCALHVManager::beginSamplingIndex();iSampling<FCALHVManager::endSamplingIndex();iSampling++) {
414 for (unsigned int iSector=FCALHVManager::beginSectorIndex(iSampling);iSector<FCALHVManager::endSectorIndex(iSampling);iSector++) {
415
416 const FCALHVModule& hvMod = hvManager_FCAL.getHVModule(iSide,iSector,iSampling);
417
418 float dphi=CaloPhiRange::twopi()/16;
419 if (iSampling==1) dphi=CaloPhiRange::twopi()/8.;
420 if (iSampling==2) dphi=CaloPhiRange::twopi()/4.;
421 float phi_min = ((float)(iSector))*dphi;
422 phi_min = CaloPhiRange::fix(phi_min);
423 float phi_max = CaloPhiRange::fix(dphi+phi_min);
424 float phi = 0.5*(phi_min+phi_max);
425
426 for (unsigned int iLine=0;iLine<FCALHVModule::getNumHVLines();iLine++) {
427 const FCALHVLine& hvline = hvMod.getHVLine(iLine);
428 float hv = hvdata_FCAL.voltage (hvline);
429 float current = hvdata_FCAL.current (hvline);
430 m_bec = 14+iSampling;
432 m_eta=eta;
433 m_phi=phi;
434 m_electrode = iSector;
435 m_gap = iLine;
436 m_hv=hv;
438 m_hvline = hvdata_FCAL.hvLineNo (hvline);
439 if(m_addcells) {
440 for(unsigned i=0; i<m_hvonlId_map[m_hvline].size(); ++i) {
441 m_barrelec=m_onlId->barrel_ec(m_hvonlId_map[m_hvline][i]);
442 m_posneg=m_onlId->pos_neg(m_hvonlId_map[m_hvline][i]);
443 m_FT=m_onlId->feedthrough(m_hvonlId_map[m_hvline][i]);
444 m_slot=m_onlId->slot(m_hvonlId_map[m_hvline][i]);
445 m_channel=m_onlId->channel(m_hvonlId_map[m_hvline][i]);
446 m_tree->Fill();
447 }
448 } else m_tree->Fill();
449 }
450 } //iSector
451 }//iSampling
452 }//iSide
453
454 return StatusCode::SUCCESS;
455 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
std::vector< size_t > vec
id_iterator cell_begin() const
begin iterator over full set of Identifiers (LAr + Tiles)
id_iterator cell_end() const
end iterator over full set of Identifiers (LAr + Tiles)
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
static double twopi()
static double fix(double phi)
double getPhi() const
int hvLineNo(const EMBHVElectrode &electrode, const int &iGap) const
double voltage(const EMBHVElectrode &electrode, const int &iGap) const
double current(const EMBHVElectrode &electrode, const int &iGap) const
This class provides direct access to information on the HV electrodes within the barrels.
unsigned int beginPhiIndex() const
unsigned int endEtaIndex() const
static unsigned int endSectorIndex()
unsigned int beginEtaIndex() const
static unsigned int beginSectorIndex()
const EMBHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
EMBHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
const EMBHVElectrode & getElectrode(unsigned int iElectrode) const
double getEtaMin() const
double getEtaMax() const
double voltage(const EMBPresamplerHVModule &module, const int &iGap) const
double current(const EMBPresamplerHVModule &module, const int &iGap) const
int hvLineNo(const EMBPresamplerHVModule &module, const int &iGap) const
This class provides direct access to information on the HV electrodes within the barrels.
const EMBPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi) const
EMBPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
unsigned int beginPhiIndex() const
static unsigned int endSideIndex()
unsigned int beginEtaIndex() const
double getPhi() const
double current(const EMECHVElectrode &electrode, const int &iGap) const
double voltage(const EMECHVElectrode &electrode, const int &iGap) const
int hvLineNo(const EMECHVElectrode &electrode, const int &iGap) const
This class provides direct access to information on the HV electrodes within the EMEC.
unsigned int beginEtaIndex() const
const EMECHVModule & getHVModule(unsigned int iSide, unsigned int iEta, unsigned int iPhi, unsigned int iSector) const
unsigned int beginSectorIndex() const
unsigned int endPhiIndex() const
static unsigned int beginSideIndex()
static unsigned int endSideIndex()
unsigned int endEtaIndex() const
unsigned int endSectorIndex() const
unsigned int beginPhiIndex() const
EMECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
double getEtaMax() const
const EMECHVElectrode & getElectrode(unsigned int iElectrode) const
unsigned int getNumElectrodes() const
double getEtaMin() const
double voltage(const EMECPresamplerHVModule &module, const int &iGap) const
double current(const EMECPresamplerHVModule &module, const int &iGap) const
int hvLineNo(const EMECPresamplerHVModule &module, const int &iGap) const
This class provides direct access to information on the HV electrodes within the EMEC.
EMECPresamplerHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
const EMECPresamplerHVModule & getHVModule(unsigned int iSide, unsigned int iPhi) const
static unsigned int beginSideIndex()
double current(const FCALHVLine &line) const
double voltage(const FCALHVLine &line) const
int hvLineNo(const FCALHVLine &line) const
This class provides direct access to information on the HV electrodes within the barrels.
static unsigned int beginSideIndex()
static unsigned int endSamplingIndex()
static unsigned int endSideIndex()
static unsigned int beginSectorIndex(unsigned int iSampling)
static unsigned int beginSamplingIndex()
const FCALHVModule & getHVModule(unsigned int iSide, unsigned int iSector, unsigned int iSampling) const
static unsigned int endSectorIndex(unsigned int iSampling)
FCALHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
const FCALHVLine & getHVLine(unsigned int iLine) const
static unsigned int getNumHVLines()
double current(const HECHVSubgap &subgap) const
int hvLineNo(const HECHVSubgap &subgap) const
double voltage(const HECHVSubgap &subgap) const
This class provides direct access to information on the HV electrodes within the barrels.
static unsigned int beginPhiIndex()
static unsigned int endSamplingIndex()
const HECHVModule & getHVModule(unsigned int iSide, unsigned int iPhi, unsigned int iSampling) const
static unsigned int endSideIndex()
HECHVData getData(const LArHVIdMapping &hvIdMapping, const std::vector< const CondAttrListCollection * > &attrLists) const
static unsigned int beginSideIndex()
static unsigned int beginSamplingIndex()
static unsigned int endPhiIndex()
const HECHVSubgap & getSubgap(unsigned int iElectrode) const
double getPhiMin() const
static unsigned int getNumSubgaps()
double getPhiMax() const
std::vector< int > GetHVLines(const EMBHVManager::EMBHVData &hvdata_EMB, const EMBPresamplerHVManager::EMBPresamplerHVData &hvdata_EMBPS, const EMECHVManager::EMECHVData &hvdata_EMEC_OUT, const EMECHVManager::EMECHVData &hvdata_EMEC_IN, const EMECPresamplerHVManager::EMECPresamplerHVData &hvdata_EMECPS, const HECHVManager::HECHVData &hvdata_HEC, const FCALHVManager::FCALHVData &hvdata_FCAL, const Identifier &id, const CaloDetDescrManager *calodetdescrmgr)
TTree * m_tree
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
std::map< int, std::vector< HWIdentifier > > m_hvonlId_map
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
const CaloCell_ID * m_caloId
const LArOnlineID * m_onlId
This class provides access to the High Voltage throughout the LAr.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
const std::string & key() const
Return the StoreGate ID for the referenced object.
@ iPhi
Definition ParamDefs.h:47

◆ extraDeps_update_handler()

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

◆ filterPassed() [1/2]

bool AthAlgorithm::filterPassed ( ) const
inherited

Definition at line 94 of file AthAlgorithm.cxx.

94 {
95 return filterPassed( Gaudi::Hive::currentContext() );
96}
bool filterPassed() const

◆ filterPassed() [2/2]

bool AthAlgorithm::filterPassed ( const EventContext & ctx) const
inherited

Definition at line 98 of file AthAlgorithm.cxx.

98 {
99 return execState( ctx ).filterPassed();
100}

◆ getContext()

const EventContext & AthAlgorithm::getContext ( ) const
inherited

Deprecated methods (use the ones with EventContext).

Definition at line 90 of file AthAlgorithm.cxx.

90 {
91 return Gaudi::Hive::currentContext();
92}

◆ GetHVLines()

std::vector< int > LArHV2Ntuple::GetHVLines ( const EMBHVManager::EMBHVData & hvdata_EMB,
const EMBPresamplerHVManager::EMBPresamplerHVData & hvdata_EMBPS,
const EMECHVManager::EMECHVData & hvdata_EMEC_OUT,
const EMECHVManager::EMECHVData & hvdata_EMEC_IN,
const EMECPresamplerHVManager::EMECPresamplerHVData & hvdata_EMECPS,
const HECHVManager::HECHVData & hvdata_HEC,
const FCALHVManager::FCALHVData & hvdata_FCAL,
const Identifier & id,
const CaloDetDescrManager * calodetdescrmgr )
private

Definition at line 457 of file LArHV2Ntuple.cxx.

465 {
466
467 std::set<int> hv;
468
469 // LAr EMB
470 if (m_caloId->is_em(id) && m_caloId->sampling(id)>0) {
471 if (abs(m_caloId->em_idHelper()->barrel_ec(id))==1) {
472 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(calodetdescrmgr->get_element(id));
473 if (!embElement) std::abort();
474 const EMBCellConstLink cell = embElement->getEMBCell();
475 unsigned int nelec = cell->getNumElectrodes();
476 for (unsigned int i=0;i<nelec;i++) {
477 const EMBHVElectrode& electrode = cell->getElectrode(i);
478 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMB.hvLineNo(electrode, igap));
479 }
480 } else { // LAr EMEC
481 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(calodetdescrmgr->get_element(id));
482 if (!emecElement) std::abort();
483 const EMECCellConstLink cell = emecElement->getEMECCell();
484 unsigned int nelec = cell->getNumElectrodes();
485 for (unsigned int i=0;i<nelec;i++) {
486 const EMECHVElectrode& electrode = cell->getElectrode(i);
487 const EMECHVModule& module = electrode.getModule();
488 const EMECHVManager::EMECHVData& hvdata =
489 module.getWheelIndex() == EMECHVModule::INNER ?
490 hvdata_EMEC_IN :
491 hvdata_EMEC_OUT;
492 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata.hvLineNo (electrode, igap));
493 }
494 }
495 } else if (m_caloId->is_hec(id)) { // LAr HEC
496 const HECDetectorElement* hecElement = dynamic_cast<const HECDetectorElement*>(calodetdescrmgr->get_element(id));
497 if (!hecElement) std::abort();
498 const HECCellConstLink cell = hecElement->getHECCell();
499 unsigned int nsubgaps = cell->getNumSubgaps();
500 for (unsigned int igap=0;igap<nsubgaps;igap++) {
501 const HECHVSubgap& subgap = cell->getSubgap(igap);
502 hv.insert(hvdata_HEC.hvLineNo (subgap));
503 }
504 } else if (m_caloId->is_fcal(id)) { // LAr FCAL
505 const FCALDetectorElement* fcalElement = dynamic_cast<const FCALDetectorElement*>(calodetdescrmgr->get_element(id));
506 if (!fcalElement) std::abort();
507 const FCALTile* tile = fcalElement->getFCALTile();
508 unsigned int nlines = FCALTile::getNumHVLines();
509 for (unsigned int i=0;i<nlines;i++) {
510 const FCALHVLine* line = tile->getHVLine(i);
511 if (line) hv.insert(hvdata_FCAL.hvLineNo (*line));
512 }
513 } else if (m_caloId->is_em(id) && m_caloId->sampling(id)==0) { // Presamplers
514 if (abs(m_caloId->em_idHelper()->barrel_ec(id))==1) {
515 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(calodetdescrmgr->get_element(id));
516 if (!embElement) std::abort();
517 const EMBCellConstLink cell = embElement->getEMBCell();
518 const EMBPresamplerHVModule& hvmodule = cell->getPresamplerHVModule();
519 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMBPS.hvLineNo (hvmodule, igap));
520 } else {
521 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(calodetdescrmgr->get_element(id));
522 if (!emecElement) std::abort();
523 const EMECCellConstLink cell = emecElement->getEMECCell();
524 const EMECPresamplerHVModule& hvmodule = cell->getPresamplerHVModule ();
525 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata_EMECPS.hvLineNo (hvmodule, igap));
526 }
527 }
528
529 std::vector<int> hvlines;
530 for (std::set<int>::iterator i=hv.begin();i!=hv.end();++i) hvlines.push_back(*i);
531 return hvlines;
532 }
bool is_fcal(const Identifier id) const
test if the id belongs to the FCAL - true also for MiniFCAL
int sampling(const Identifier id) const
LAr field values (NOT_VALID == invalid request).
bool is_hec(const Identifier id) const
test if the id belongs to the HEC
bool is_em(const Identifier id) const
test if the id belongs to LArEM
const LArEM_ID * em_idHelper() const
access to EM idHelper
Definition CaloCell_ID.h:63
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
LAr EMB Detector Element.
EMBCellConstLink getEMBCell() const
EMB Cell description from LArReadoutGeometry.
EMECCellConstLink getEMECCell() const
EMEC Cell description from LArReadoutGeometry.
const EMECHVModule & getModule() const
const FCALTile * getFCALTile() const
FCAL Tile description from LArReadoutGeometry.
static unsigned int getNumHVLines()
Get num hvlines.
Definition FCALTile.cxx:81
HECCellConstLink getHECCell() const
HEC Cell description from LArReadoutGeometry.
int barrel_ec(const Identifier id) const
return barrel_ec according to :

◆ initialize()

StatusCode LArHV2Ntuple::initialize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 57 of file LArHV2Ntuple.cxx.

58 {
59 ATH_CHECK( m_thistSvc.retrieve() );
60
61 ATH_CHECK( m_cablingKey.initialize() );
62 ATH_CHECK( m_caloMgrKey.initialize() );
63 ATH_CHECK( detStore()->retrieve(m_caloId, "CaloCell_ID") );
64
65 m_tree = new TTree("mytree","Calo Noise ntuple");
66 m_tree->Branch("bec",&m_bec,"bec/I");
67 m_tree->Branch("isPresampler",&m_isPresampler,"isPresampler/I");
68 m_tree->Branch("eta",&m_eta,"eta/F");
69 m_tree->Branch("phi",&m_phi,"phi/F");
70 m_tree->Branch("HVline",&m_hvline,"HVline/I");
71 m_tree->Branch("electrode",&m_electrode,"electrode/I");
72 m_tree->Branch("gap",&m_gap,"gap/I");
73 m_tree->Branch("hv",&m_hv,"hv/F");
74 m_tree->Branch("current",&m_current,"current/F");
75 if(m_addcells) {
76 m_tree->Branch("barrel_ec",&m_barrelec,"barrel_ec/I");
77 m_tree->Branch("side",&m_posneg,"side/I");
78 m_tree->Branch("FT",&m_FT,"FT/I");
79 m_tree->Branch("slot",&m_slot,"slot/I");
80 m_tree->Branch("channel",&m_channel,"channel/I");
81 ATH_CHECK( detStore()->retrieve(m_onlId, "LArOnlineID") );
82 }
83
84 ATH_CHECK( m_hvCablingKey.initialize() );
85 ATH_CHECK( m_DCSFolderKeys.initialize() );
86
87 ATH_CHECK( m_thistSvc->regTree("/file1/hv/mytree",m_tree) );
88 return StatusCode::SUCCESS;
89
90 }
const ServiceHandle< StoreGateSvc > & detStore() const
StatusCode initialize(bool used=true)

◆ inputHandles()

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

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 111 of file AthAlgorithm.h.

111{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed() [1/2]

void AthAlgorithm::setFilterPassed ( bool state) const
inherited

Definition at line 102 of file AthAlgorithm.cxx.

102 {
103 setFilterPassed( state, Gaudi::Hive::currentContext() );
104}
void setFilterPassed(bool state) const

◆ setFilterPassed() [2/2]

void AthAlgorithm::setFilterPassed ( bool state,
const EventContext & ctx ) const
inherited

Definition at line 106 of file AthAlgorithm.cxx.

106 {
107 execState( ctx ).setFilterPassed(state);
108}

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

Member Data Documentation

◆ args

LArHV2Ntuple.args = parser.parse_args()

Definition at line 19 of file LArHV2Ntuple.py.

◆ AtlasVersion

LArHV2Ntuple.AtlasVersion

Definition at line 30 of file LArHV2Ntuple.py.

◆ cfg

LArHV2Ntuple.cfg = MainServicesCfg(flags)

Definition at line 58 of file LArHV2Ntuple.py.

◆ DatabaseInstance

LArHV2Ntuple.DatabaseInstance

Definition at line 42 of file LArHV2Ntuple.py.

◆ default

LArHV2Ntuple.default

Definition at line 14 of file LArHV2Ntuple.py.

◆ dest

LArHV2Ntuple.dest

Definition at line 14 of file LArHV2Ntuple.py.

◆ doAlign

LArHV2Ntuple.doAlign

Definition at line 36 of file LArHV2Ntuple.py.

◆ Files

LArHV2Ntuple.Files

Definition at line 32 of file LArHV2Ntuple.py.

◆ flags

LArHV2Ntuple.flags = initConfigFlags()

Definition at line 26 of file LArHV2Ntuple.py.

◆ GlobalTag

LArHV2Ntuple.GlobalTag

Definition at line 48 of file LArHV2Ntuple.py.

◆ help

LArHV2Ntuple.help

Definition at line 14 of file LArHV2Ntuple.py.

◆ isMC

LArHV2Ntuple.isMC

Definition at line 34 of file LArHV2Ntuple.py.

◆ m_addcells

bool LArHV2Ntuple::m_addcells
private

Definition at line 70 of file LArHV2Ntuple.h.

◆ m_barrelec

int LArHV2Ntuple::m_barrelec
private

Definition at line 83 of file LArHV2Ntuple.h.

◆ m_bec

int LArHV2Ntuple::m_bec
private

Definition at line 73 of file LArHV2Ntuple.h.

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArHV2Ntuple::m_cablingKey {this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"}
private

Definition at line 53 of file LArHV2Ntuple.h.

53{this, "OnOffMap", "LArOnOffIdMap", "SG key for mapping object"};

◆ m_caloId

const CaloCell_ID* LArHV2Ntuple::m_caloId
private

Definition at line 90 of file LArHV2Ntuple.h.

◆ m_caloMgrKey

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

Definition at line 58 of file LArHV2Ntuple.h.

58 { this
59 , "CaloDetDescrManager"
60 , "CaloDetDescrManager"
61 , "SG Key for CaloDetDescrManager in the Condition Store" };

◆ m_channel

int LArHV2Ntuple::m_channel
private

Definition at line 87 of file LArHV2Ntuple.h.

◆ m_current

float LArHV2Ntuple::m_current
private

Definition at line 81 of file LArHV2Ntuple.h.

◆ m_DCSFolderKeys

SG::ReadCondHandleKeyArray<CondAttrListCollection> LArHV2Ntuple::m_DCSFolderKeys { this, "DCSFolderNames", {"/LAR/DCS/HV/BARREl/I16", "/LAR/DCS/HV/BARREL/I8"}, "DCS folders with HV values"}
private

Definition at line 56 of file LArHV2Ntuple.h.

57{ this, "DCSFolderNames", {"/LAR/DCS/HV/BARREl/I16", "/LAR/DCS/HV/BARREL/I8"}, "DCS folders with HV values"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_electrode

int LArHV2Ntuple::m_electrode
private

Definition at line 77 of file LArHV2Ntuple.h.

◆ m_eta

float LArHV2Ntuple::m_eta
private

Definition at line 75 of file LArHV2Ntuple.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::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 114 of file AthAlgorithm.h.

◆ m_FT

int LArHV2Ntuple::m_FT
private

Definition at line 85 of file LArHV2Ntuple.h.

◆ m_gap

int LArHV2Ntuple::m_gap
private

Definition at line 78 of file LArHV2Ntuple.h.

◆ m_hv

float LArHV2Ntuple::m_hv
private

Definition at line 80 of file LArHV2Ntuple.h.

◆ m_hvCablingKey

SG::ReadCondHandleKey<LArHVIdMapping> LArHV2Ntuple::m_hvCablingKey {this, "LArHVIdMapping", "LArHVIdMap", "SG key for HV ID mapping"}
private

Definition at line 54 of file LArHV2Ntuple.h.

55{this, "LArHVIdMapping", "LArHVIdMap", "SG key for HV ID mapping"};

◆ m_hvline

int LArHV2Ntuple::m_hvline
private

Definition at line 79 of file LArHV2Ntuple.h.

◆ m_hvonlId_map

std::map<int, std::vector<HWIdentifier> > LArHV2Ntuple::m_hvonlId_map
private

Definition at line 92 of file LArHV2Ntuple.h.

◆ m_isPresampler

int LArHV2Ntuple::m_isPresampler
private

Definition at line 74 of file LArHV2Ntuple.h.

◆ m_onlId

const LArOnlineID* LArHV2Ntuple::m_onlId
private

Definition at line 91 of file LArHV2Ntuple.h.

◆ m_phi

float LArHV2Ntuple::m_phi
private

Definition at line 76 of file LArHV2Ntuple.h.

◆ m_posneg

int LArHV2Ntuple::m_posneg
private

Definition at line 84 of file LArHV2Ntuple.h.

◆ m_slot

int LArHV2Ntuple::m_slot
private

Definition at line 86 of file LArHV2Ntuple.h.

◆ m_thistSvc

ServiceHandle<ITHistSvc> LArHV2Ntuple::m_thistSvc {this,"THistSvc","THistSvc"}
private

Definition at line 67 of file LArHV2Ntuple.h.

67{this,"THistSvc","THistSvc"};

◆ m_tree

TTree* LArHV2Ntuple::m_tree
private

Definition at line 68 of file LArHV2Ntuple.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ None

LArHV2Ntuple.None

Definition at line 16 of file LArHV2Ntuple.py.

◆ parser

LArHV2Ntuple.parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)

Definition at line 13 of file LArHV2Ntuple.py.

◆ rootfile

LArHV2Ntuple.rootfile = args.out

Definition at line 77 of file LArHV2Ntuple.py.

◆ Run

LArHV2Ntuple.Run

Definition at line 41 of file LArHV2Ntuple.py.

◆ RunNumbers

LArHV2Ntuple.RunNumbers

Definition at line 28 of file LArHV2Ntuple.py.

◆ type

LArHV2Ntuple.type

Definition at line 14 of file LArHV2Ntuple.py.


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