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

#include <LArCond2NtupleBase.h>

Inherits AthAlgorithm.

Inherited by CaloCellGroup2Ntuple, CaloCondBlob2Ntuple, LArADC2MeV2Ntuple, LArAccumulatedDigits2Ntuple, LArAutoCorr2Ntuple, LArAverages2Ntuple, LArDSPConfig2Ntuple, LArDSPThresholds2Ntuple, LArDigits2Ntuple, LArFEBTemp2Ntuple, LArFebTimeOffset2Ntuple, LArGainThresholds2Ntuple, LArHVScaleCorr2Ntuple, LArMinBias2Ntuple, LArMphysOverMcal2Ntuple, LArNoise2Ntuple, LArOFC2Ntuple, LArOFCBin2Ntuple, LArOFCBinAlg, LArParams2Ntuple, LArPedestals2Ntuple, LArPhysCaliTDiffAlg, LArRamps2Ntuple, LArRinj2Ntuple, LArShape2Ntuple, LArWFParams2Ntuple, LArWaves2Ntuple, LArfSampl2Ntuple, and LAruA2MeV2Ntuple.

Public Member Functions

 LArCond2NtupleBase (const std::string &name, ISvcLocator *pSvcLocator)
 ~LArCond2NtupleBase ()
StatusCode initialize ()
StatusCode execute ()
bool fillFromIdentifier (const HWIdentifier &id)
const SG::ReadCondHandleKey< LArOnOffIdMapping > & cablingKey () const
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 Types

enum  { NOT_VALID = -999 }

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.

Protected Attributes

Gaudi::Property< bool > m_addBC {this, "AddBadChannelInfo", true, "dump BadChan info ?"}
Gaudi::Property< bool > m_addFEBTemp {this, "AddFEBTempInfo", false, "dump FEB temperature info ?"}
Gaudi::Property< bool > m_isSC {this, "isSC", false, "are we working with SC?"}
Gaudi::Property< bool > m_isFlat {this, "isFlat", false, "are we working with Flat conditions ?"}
Gaudi::Property< bool > m_OffId {this, "OffId", false, "dump also offline ID ?"}
Gaudi::Property< bool > m_addHash {this, "AddHash", false, "add also ID hash info ?"}
Gaudi::Property< bool > m_addCalib {this, "AddCalib", false, "add also calib line info info ?"}
Gaudi::Property< bool > m_realgeom {this, "RealGeometry", false, "add real geometry values ?"}
Gaudi::Property< bool > m_expandId {this,"ExpandId", true ,"add online Id decoded fields ?"}
Gaudi::Property< int > m_NGains {this,"nGains", CaloGain::LARNGAIN,"Number of gains"}
std::string m_ntpath
std::string m_ntTitle
NTuple::Tuple * m_nt
NTuple::Item< long > m_detector
NTuple::Item< long > m_region
NTuple::Item< long > m_layer
NTuple::Item< long > m_eta
NTuple::Item< long > m_phi
NTuple::Item< long > m_onlChanId
NTuple::Item< long > m_oflChanId
NTuple::Item< long > m_pos_neg
NTuple::Item< long > m_barrel_ec
NTuple::Item< long > m_FT
NTuple::Item< long > m_slot
NTuple::Item< long > m_channel
NTuple::Item< long > m_calibLine
NTuple::Item< long > m_badChanWord
NTuple::Item< long > m_isConnected
NTuple::Item< long > m_chanHash
NTuple::Item< long > m_febHash
NTuple::Item< long > m_oflHash
NTuple::Item< float > m_reta
NTuple::Item< float > m_rphi
NTuple::Item< float > m_FEBTemp1
NTuple::Item< float > m_FEBTemp2
StoreGateSvcm_detStore
const LArEM_Base_IDm_emId
const LArHEC_Base_IDm_hecId
const LArFCAL_Base_IDm_fcalId
const LArOnlineID_Basem_onlineId
const CaloCell_Base_IDm_caloId
ToolHandle< ILArFEBTempToolm_FEBTempTool
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingSCKey {this,"CablingSCKey","LArOnOffIdMapSC","SG Key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< LArBadChannelContm_BCKey {this, "BadChanKey", "LArBadChannel", "SG bad channels key"}
SG::ReadCondHandleKey< LArCalibLineMappingm_calibMapKey {this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"}
SG::ReadCondHandleKey< LArCalibLineMappingm_calibMapSCKey {this,"CalibMapSCKey","LArCalibIdMapSC","SG Key of calib line mapping object"}
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store"}
SG::ReadCondHandleKey< CaloSuperCellDetDescrManagerm_caloSuperCellMgrKey {this, "CaloSuperCellDetDescrManager", "CaloSuperCellDetDescrManager", "SG key of the resulting CaloSuperCellDetDescrManager" }

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_initialized
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 33 of file LArCond2NtupleBase.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
NOT_VALID 

Definition at line 65 of file LArCond2NtupleBase.h.

Constructor & Destructor Documentation

◆ LArCond2NtupleBase()

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

Definition at line 15 of file LArCond2NtupleBase.cxx.

16 : AthAlgorithm(name, pSvcLocator)
17 , m_initialized(false)
18 , m_nt(nullptr)
19 , m_detStore(nullptr)
20 , m_emId(nullptr)
21 , m_hecId(nullptr)
22 , m_fcalId(nullptr)
23 , m_onlineId(nullptr)
24 , m_caloId(nullptr)
25 , m_FEBTempTool("LArFEBTempTool")
26{
27}
AthAlgorithm()
Default constructor:
StoreGateSvc * m_detStore
const CaloCell_Base_ID * m_caloId
const LArEM_Base_ID * m_emId
ToolHandle< ILArFEBTempTool > m_FEBTempTool
const LArHEC_Base_ID * m_hecId
const LArOnlineID_Base * m_onlineId
const LArFCAL_Base_ID * m_fcalId

◆ ~LArCond2NtupleBase()

LArCond2NtupleBase::~LArCond2NtupleBase ( )

Definition at line 29 of file LArCond2NtupleBase.cxx.

29 {
30 ;
31}

Member Function Documentation

◆ cablingKey()

const SG::ReadCondHandleKey< LArOnOffIdMapping > & LArCond2NtupleBase::cablingKey ( ) const

Definition at line 458 of file LArCond2NtupleBase.cxx.

459{
460 if(m_isSC) return m_cablingSCKey;
461 return m_cablingKey;
462}
Gaudi::Property< bool > m_isSC
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingSCKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey

◆ 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 LArCond2NtupleBase::execute ( )
inline

Definition at line 41 of file LArCond2NtupleBase.h.

41{return StatusCode::SUCCESS;}

◆ 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

◆ fillFromIdentifier()

bool LArCond2NtupleBase::fillFromIdentifier ( const HWIdentifier & id)

Definition at line 290 of file LArCond2NtupleBase.cxx.

290 {
291
292 ATH_MSG_VERBOSE("Starting fillFromIdentifier");
293 const LArBadChannelCont *bcCont = nullptr;
294 if ( m_addBC) {
295 SG::ReadCondHandle<LArBadChannelCont> readHandle{m_BCKey};
296 bcCont =*readHandle;
297 if( !bcCont) {
298 ATH_MSG_WARNING( "Do not have Bad chan container " << m_BCKey.key() );
299 return false;
300 }
301 }
302
303 const LArCalibLineMapping *clCont=nullptr;
304 if(m_addCalib) {
305 if(m_isSC){
306 SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapSCKey};
307 clCont={*clHdl};
308 }
309 else{
310 SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
311 clCont={*clHdl};
312 }
313 if(!clCont) {
314 ATH_MSG_WARNING( "Do not have calib line mapping !!!" );
315 return false;
316 }
317 }
318
319 const LArOnOffIdMapping* cabling=nullptr;
320 if(m_isSC){
321 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingSCKey};
322 cabling=*cablingHdl;
323 }
324 else{
325 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
326 cabling=*cablingHdl;
327 }
328
329 if(!cabling) {
330 ATH_MSG_WARNING( "Do not have cabling !" );
331 return false;
332 }
333
334 m_onlChanId = hwid.get_identifier32().get_compact();
335
336 if(m_expandId) {
337 m_barrel_ec = m_onlineId->barrel_ec(hwid);
338 m_pos_neg = m_onlineId->pos_neg(hwid);
339 m_FT = m_onlineId->feedthrough(hwid);
340 m_slot = m_onlineId->slot(hwid);
341 m_channel = m_onlineId->channel(hwid);
342 }
343
344 if (m_addHash) {
345 m_chanHash=m_onlineId->channel_Hash(hwid);
346 m_febHash=m_onlineId->feb_Hash(m_onlineId->feb_Id(hwid));
347 }
348
349 if(m_addCalib) {
351 const std::vector<HWIdentifier>& calibLineV=clCont->calibSlotLine(hwid);
352 if(!calibLineV.empty()) {
353 if(m_isSC) {
354 //FIXME - that is hacky, but do not have legacy helper in case of SC
355 m_calibLine = ((hwid.get_identifier32().get_compact())>>8)&0x7F;
356 } else {
357 m_calibLine = m_onlineId->channel(calibLineV[0]);
358 }
359 }
360 }
361
362
363 if ( m_OffId ) {
368
369 if(m_realgeom){
372 }
376 }
377
378 if (m_addBC) m_badChanWord=0;
379 bool connected=false;
380
381 const CaloDetDescrManager_Base* dd_man = nullptr;
382 if (m_realgeom) {
383 if(m_isSC) {
384 SG::ReadCondHandle<CaloSuperCellDetDescrManager> caloSuperCellMgrHandle{m_caloSuperCellMgrKey};
385 dd_man = *caloSuperCellMgrHandle;
386 }
387 else {
388 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey};
389 dd_man = *caloMgrHandle;
390 }
391 }
392
393 try {
394 if (cabling->isOnlineConnected(hwid)) {
395 Identifier id=cabling->cnvToIdentifier(hwid);
396 if ( m_OffId ) {
397 m_oflChanId = id.get_identifier32().get_compact();
398 if (m_addHash) m_oflHash=m_caloId->calo_cell_hash(id);
399
400 if (dd_man) {
401 const CaloDetDescrElement *elem = dd_man->get_element(id);
402 if(!elem) {
403 ATH_MSG_WARNING("Do not have CDDE for "<<id.getString());
404 } else {
405 m_reta = elem->eta_raw();
406 m_rphi = elem->phi_raw();
407 }
408 }
409
410 if (m_emId->is_lar_em(id)) {
411 m_eta = m_emId->eta(id);
412 m_phi = m_emId->phi(id);
413 m_layer = m_emId->sampling(id);
414 m_region = m_emId->region(id);
415 m_detector = std::abs(m_emId->barrel_ec(id)) - 1; //0-barrel, 1-EMEC-OW, 2-EMEC-IW
416 }
417 else if (m_hecId->is_lar_hec(id)) {
418 m_eta = m_hecId->eta(id);
419 m_phi = m_hecId->phi(id);
420 m_layer = m_hecId->sampling(id);
421 m_region = m_hecId->region(id);
422 m_detector = 3;
423 }
424 else if (m_fcalId->is_lar_fcal(id)) {
425 m_eta = m_fcalId->eta(id);
426 m_phi = m_fcalId->phi(id);
427 m_layer = m_fcalId->module(id);
428 m_region = 0;
429 m_detector = 4;
430 }
431 } // m_OffId
432 connected=true;
433 }//end if is connected
434 }catch (LArID_Exception & except) {}
435
436 //bad-channel word
437 if (m_addBC) m_badChanWord=bcCont->status(hwid).packedData();
438 // FEB temperatures
439 if (m_addFEBTemp) {
440 FEBTemp tv = m_FEBTempTool->getFebTemp(hwid);
441 if( !tv.empty() ) {
442 FEBTemp::const_iterator itb = tv.begin();
443 FEBTemp::const_iterator ite = tv.end();
444 for(;itb!=ite;++itb) {
445 m_FEBTemp1 = (*itb).first;
446 m_FEBTemp2 = (*itb).second;
447 }
448 }
449 }
450
451 if(m_addCalib) m_isConnected = (long)connected;
452
453 return connected;
454}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
std::vector< std::pair< float, float > > FEBTemp
LArBadXCont< LArBadChannel > LArBadChannelCont
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
BitWord packedData() const
LArBC_t status(const HWIdentifier channel) const
Query the status of a particular channel or FEB This is the main client access method.
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
NTuple::Item< long > m_isConnected
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
NTuple::Item< long > m_calibLine
NTuple::Item< long > m_region
NTuple::Item< long > m_layer
NTuple::Item< long > m_chanHash
Gaudi::Property< bool > m_addCalib
NTuple::Item< float > m_reta
NTuple::Item< long > m_onlChanId
SG::ReadCondHandleKey< LArCalibLineMapping > m_calibMapKey
Gaudi::Property< bool > m_addHash
NTuple::Item< long > m_eta
NTuple::Item< long > m_barrel_ec
NTuple::Item< long > m_FT
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
NTuple::Item< long > m_oflHash
NTuple::Item< float > m_rphi
Gaudi::Property< bool > m_realgeom
NTuple::Item< long > m_slot
NTuple::Item< long > m_febHash
NTuple::Item< long > m_detector
NTuple::Item< float > m_FEBTemp1
NTuple::Item< long > m_oflChanId
NTuple::Item< float > m_FEBTemp2
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
NTuple::Item< long > m_phi
NTuple::Item< long > m_badChanWord
Gaudi::Property< bool > m_addBC
NTuple::Item< long > m_channel
NTuple::Item< long > m_pos_neg
SG::ReadCondHandleKey< LArCalibLineMapping > m_calibMapSCKey
Gaudi::Property< bool > m_expandId
Gaudi::Property< bool > m_addFEBTemp
Gaudi::Property< bool > m_OffId

◆ initialize()

StatusCode LArCond2NtupleBase::initialize ( )

do we need both of them at some point when data has both SC and cells?

Definition at line 33 of file LArCond2NtupleBase.cxx.

33 {
34
35 ATH_MSG_DEBUG("Initializing LArCond2Ntuple base class");
36
37 if (m_ntpath.empty() || m_ntTitle.empty()) {
38 ATH_MSG_ERROR( "Need to set variable 'm_ntpath' and 'm_ntTitle' in constructor of deriving class!" );
39 return StatusCode::FAILURE;
40 }
41
42 size_t i=m_ntpath.rfind('/');
43 if (i==std::string::npos) {
44 ATH_MSG_ERROR( "Expected at least on '/' in path " << m_ntpath );
45 return StatusCode::FAILURE;
46 }
47 std::string basepath(m_ntpath.begin(),m_ntpath.begin()+i);
48 //std::cout << "Basepath" << basepath << std::endl;
49
50
51 NTupleFilePtr file1(ntupleSvc(),basepath);
52 if (!file1){
53 ATH_MSG_ERROR( "Could not get NTupleFilePtr with path " << basepath << " failed" );
54 return StatusCode::FAILURE;
55 }
56 NTuplePtr nt(ntupleSvc(),m_ntpath);
57 if (!nt) {
58 nt=ntupleSvc()->book(m_ntpath,CLID_ColumnWiseTuple,m_ntTitle);
59 }
60 if (!nt){
61 ATH_MSG_ERROR( "Booking of NTuple at "<< m_ntpath << " and name " << m_ntTitle << " failed" );
62 return StatusCode::FAILURE;
63 }
64
65 m_nt=nt;
66 //std::cout << "Ntuple ptr:" << m_nt << std::endl;
67
68 m_detStore= &(*detStore()); //for backward compatiblity
69
70 const CaloIdManager* calo_id_manager;
71 ATH_CHECK(detStore()->retrieve(calo_id_manager,"CaloIdManager"));
72
75 ATH_CHECK(m_caloMgrKey.initialize(m_realgeom && !m_isSC));
76 if ( m_isSC ){
77 const LArOnline_SuperCellID* ll;
78 sc = detStore()->retrieve(ll, "LArOnline_SuperCellID");
79 if (sc.isFailure()) {
80 ATH_MSG_ERROR( "Could not get LArOnlineID helper !" );
81 return StatusCode::FAILURE;
82 } else {
83 m_onlineId = ll;
84 ATH_MSG_DEBUG("Found the LArOnline_SuperCellID helper");
85 }
86 m_caloId = calo_id_manager->getCaloCell_SuperCell_ID();
87 } else { // m_isSC
88 const LArOnlineID* ll;
89 sc = detStore()->retrieve(ll, "LArOnlineID");
90 if (sc.isFailure()) {
91 msg(MSG::ERROR) << "Could not get LArOnlineID helper !" << endmsg;
92 return StatusCode::FAILURE;
93 } else {
94 m_onlineId = ll;
95 ATH_MSG_DEBUG(" Found the LArOnlineID helper. ");
96 }
97 m_caloId = calo_id_manager->getCaloCell_ID();
98 } // end of m_isSC if
99
100 m_emId=m_caloId->em_idHelper();
101 m_fcalId=m_caloId->fcal_idHelper();
102 m_hecId=m_caloId->hec_idHelper();
103
104 if (!m_emId) {
105 ATH_MSG_ERROR( "Could not access lar EM ID helper" );
106 return StatusCode::FAILURE;
107 }
108 if (!m_fcalId) {
109 ATH_MSG_ERROR( "Could not access lar FCAL ID helper" );
110 return StatusCode::FAILURE;
111 }
112 if (!m_hecId) {
113 ATH_MSG_ERROR( "Could not access lar HEC ID helper" );
114 return StatusCode::FAILURE;
115 }
116
117
118
119 if (m_addFEBTemp) {
120 sc = m_FEBTempTool.retrieve();
121 if (sc!=StatusCode::SUCCESS) {
122 ATH_MSG_ERROR( " Can't get FEBTempTool." );
123 return sc;
124 }
125 }
126
127 if (m_BCKey.key().empty()) m_addBC=false;
128
129 ATH_CHECK( m_BCKey.initialize(m_addBC) );
131 ATH_CHECK( m_cablingSCKey.initialize(m_isSC) );
132 ATH_CHECK( m_calibMapSCKey.initialize(m_addCalib && m_isSC) );
133 ATH_CHECK( m_cablingKey.initialize(!m_isSC) );
134 ATH_CHECK( m_calibMapKey.initialize(m_addCalib && !m_isSC) );
135
136 //Online-identifier variables
137 sc=nt->addItem("channelId",m_onlChanId,0x38000000,0x3A000000);
138 if (sc!=StatusCode::SUCCESS) {
139 ATH_MSG_ERROR( "addItem 'channelId' failed" );
140 return StatusCode::FAILURE;
141 }
142
143 if(m_expandId) {
144
145 sc=nt->addItem("barrel_ec",m_barrel_ec,0,1);
146 if (sc!=StatusCode::SUCCESS) {
147 ATH_MSG_ERROR( "addItem 'barrel_ec' failed" );
148 return StatusCode::FAILURE;
149 }
150
151 sc=nt->addItem("pos_neg",m_pos_neg,0,1);
152 if (sc!=StatusCode::SUCCESS) {
153 ATH_MSG_ERROR( "addItem 'pos_neg' failed" );
154 return StatusCode::FAILURE;
155 }
156
157 sc=nt->addItem("FT",m_FT,0,32);
158 if (sc!=StatusCode::SUCCESS) {
159 ATH_MSG_ERROR( "addItem 'FT' failed" );
160 return StatusCode::FAILURE;
161 }
162
163 sc=nt->addItem("slot",m_slot,1,15);
164 if (sc!=StatusCode::SUCCESS) {
165 ATH_MSG_ERROR( "addItem 'slot' failed" );
166 return StatusCode::FAILURE;
167 }
168
169 sc=nt->addItem("channel",m_channel,0,127);
170 if (sc!=StatusCode::SUCCESS){
171 ATH_MSG_ERROR( "addItem 'channel' failed" );
172 return StatusCode::FAILURE;
173 }
174 }//m_expandId
175
176 if(m_addCalib) {
177 sc=nt->addItem("calibLine",m_calibLine,0,127);
178 if (sc!=StatusCode::SUCCESS) {
179 ATH_MSG_ERROR( "addItem 'calibLine' failed" );
180 return StatusCode::FAILURE;
181 }
182
183
184 sc=nt->addItem("isConnected",m_isConnected,0,1);
185 if (sc!=StatusCode::SUCCESS) {
186 ATH_MSG_ERROR( "addItem 'isConnected' failed" );
187 return StatusCode::FAILURE;
188 }
189 }//m_addCalib
190
191
192 if (m_addHash) {
193 sc=nt->addItem("channelHash",m_chanHash,0,200000);
194 if (sc!=StatusCode::SUCCESS) {
195 ATH_MSG_ERROR( "addItem 'channelHash' failed" );
196 return StatusCode::FAILURE;
197 }
198
199 sc=nt->addItem("febHash",m_febHash,0,2000);
200 if (sc!=StatusCode::SUCCESS) {
201 ATH_MSG_ERROR( "addItem 'febHash' failed" );
202 return StatusCode::FAILURE;
203 }
204
205 if (m_OffId) {
206 sc=m_nt->addItem("oflHash",m_oflHash,0,200000);
207 if (sc!=StatusCode::SUCCESS) {
208 ATH_MSG_ERROR( "addItem 'oflHash' failed" );
209 return StatusCode::FAILURE;
210 }
211 }
212 }//m_addHash
213
214
215 //Offline-identifier variables
216 if ( m_OffId ) {
217 sc=nt->addItem("offlineId",m_oflChanId,0x20000000,0x40000000);
218 if (sc!=StatusCode::SUCCESS) {
219 ATH_MSG_ERROR( "addItem 'channelId' failed" );
220 return StatusCode::FAILURE;
221 }
222
223 sc=nt->addItem("layer",m_layer,0,4);
224 if (sc!=StatusCode::SUCCESS) {
225 ATH_MSG_ERROR( "addItem 'layer' failed" );
226 return StatusCode::FAILURE;
227 }
228
229 if(m_realgeom) {
230 sc=nt->addItem("eta",m_reta);
231 if (sc!=StatusCode::SUCCESS) {
232 ATH_MSG_ERROR( "addItem 'eta' failed" );
233 return StatusCode::FAILURE;
234 }
235 sc=nt->addItem("phi",m_rphi);
236 if (sc!=StatusCode::SUCCESS) {
237 ATH_MSG_ERROR( "addItem 'phi' failed" );
238 return StatusCode::FAILURE;
239 }
240 }
241 sc=nt->addItem("ieta",m_eta,0,510);
242 if (sc!=StatusCode::SUCCESS) {
243 ATH_MSG_ERROR( "addItem 'ieta' failed" );
244 return StatusCode::FAILURE;
245 }
246 sc=nt->addItem("iphi",m_phi,0,1023);
247 if (sc!=StatusCode::SUCCESS) {
248 ATH_MSG_ERROR( "addItem 'iphi' failed" );
249 return StatusCode::FAILURE;
250 }
251
252 sc=nt->addItem("region",m_region,0,5);
253 if (sc!=StatusCode::SUCCESS) {
254 ATH_MSG_ERROR( "addItem 'region' failed" );
255 return StatusCode::FAILURE;
256 }
257 sc=nt->addItem("detector",m_detector,0,2);
258 if (sc!=StatusCode::SUCCESS) {
259 ATH_MSG_ERROR( "addItem 'detector' failed" );
260 return StatusCode::FAILURE;
261
262 }
263 }// m_OffId
264
265 if (m_addBC) {
266 sc=nt->addItem("badChan",m_badChanWord);
267 if (sc!=StatusCode::SUCCESS) {
268 ATH_MSG_ERROR( "addItem 'badChan' failed" );
269 return StatusCode::FAILURE;
270 }
271 }
272
273 if (m_addFEBTemp) {
274 sc=nt->addItem("FEBTemp1",m_FEBTemp1);
275 if (sc!=StatusCode::SUCCESS) {
276 ATH_MSG_ERROR( "addItem 'FEBTemp1' failed" );
277 return StatusCode::FAILURE;
278 }
279 sc=nt->addItem("FEBTemp2",m_FEBTemp2);
280 if (sc!=StatusCode::SUCCESS) {
281 ATH_MSG_ERROR( "addItem 'FEBTemp2' failed" );
282 return StatusCode::FAILURE;
283 }
284 }
285
286 m_initialized=true;
287 return StatusCode::SUCCESS;
288}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
INTupleSvc * ntupleSvc()
const ServiceHandle< StoreGateSvc > & detStore() const
MsgStream & msg() const
const CaloCell_SuperCell_ID * getCaloCell_SuperCell_ID(void) const
const CaloCell_ID * getCaloCell_ID(void) const
Access to IdHelper.
::StatusCode StatusCode
StatusCode definition for legacy code.
long long ll

◆ 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}
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

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

Gaudi::Property< bool > LArCond2NtupleBase::m_addBC {this, "AddBadChannelInfo", true, "dump BadChan info ?"}
protected

Definition at line 54 of file LArCond2NtupleBase.h.

54{this, "AddBadChannelInfo", true, "dump BadChan info ?"};

◆ m_addCalib

Gaudi::Property< bool > LArCond2NtupleBase::m_addCalib {this, "AddCalib", false, "add also calib line info info ?"}
protected

Definition at line 60 of file LArCond2NtupleBase.h.

60{this, "AddCalib", false, "add also calib line info info ?"};

◆ m_addFEBTemp

Gaudi::Property< bool > LArCond2NtupleBase::m_addFEBTemp {this, "AddFEBTempInfo", false, "dump FEB temperature info ?"}
protected

Definition at line 55 of file LArCond2NtupleBase.h.

55{this, "AddFEBTempInfo", false, "dump FEB temperature info ?"};

◆ m_addHash

Gaudi::Property< bool > LArCond2NtupleBase::m_addHash {this, "AddHash", false, "add also ID hash info ?"}
protected

Definition at line 59 of file LArCond2NtupleBase.h.

59{this, "AddHash", false, "add also ID hash info ?"};

◆ m_badChanWord

NTuple::Item<long> LArCond2NtupleBase::m_badChanWord
protected

Definition at line 75 of file LArCond2NtupleBase.h.

◆ m_barrel_ec

NTuple::Item<long> LArCond2NtupleBase::m_barrel_ec
protected

Definition at line 74 of file LArCond2NtupleBase.h.

◆ m_BCKey

SG::ReadCondHandleKey<LArBadChannelCont> LArCond2NtupleBase::m_BCKey {this, "BadChanKey", "LArBadChannel", "SG bad channels key"}
protected

Definition at line 94 of file LArCond2NtupleBase.h.

94{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArCond2NtupleBase::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
protected

Definition at line 91 of file LArCond2NtupleBase.h.

91{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};

◆ m_cablingSCKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArCond2NtupleBase::m_cablingSCKey {this,"CablingSCKey","LArOnOffIdMapSC","SG Key of LArOnOffIdMapping object"}
protected

Definition at line 92 of file LArCond2NtupleBase.h.

92{this,"CablingSCKey","LArOnOffIdMapSC","SG Key of LArOnOffIdMapping object"};

◆ m_calibLine

NTuple::Item<long> LArCond2NtupleBase::m_calibLine
protected

Definition at line 75 of file LArCond2NtupleBase.h.

◆ m_calibMapKey

SG::ReadCondHandleKey<LArCalibLineMapping> LArCond2NtupleBase::m_calibMapKey {this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"}
protected

Definition at line 95 of file LArCond2NtupleBase.h.

95{this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"};

◆ m_calibMapSCKey

SG::ReadCondHandleKey<LArCalibLineMapping> LArCond2NtupleBase::m_calibMapSCKey {this,"CalibMapSCKey","LArCalibIdMapSC","SG Key of calib line mapping object"}
protected

Definition at line 96 of file LArCond2NtupleBase.h.

96{this,"CalibMapSCKey","LArCalibIdMapSC","SG Key of calib line mapping object"};

◆ m_caloId

const CaloCell_Base_ID* LArCond2NtupleBase::m_caloId
protected

Definition at line 88 of file LArCond2NtupleBase.h.

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> LArCond2NtupleBase::m_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store"}
protected

Definition at line 98 of file LArCond2NtupleBase.h.

98{this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store"};

◆ m_caloSuperCellMgrKey

SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> LArCond2NtupleBase::m_caloSuperCellMgrKey {this, "CaloSuperCellDetDescrManager", "CaloSuperCellDetDescrManager", "SG key of the resulting CaloSuperCellDetDescrManager" }
protected

Definition at line 99 of file LArCond2NtupleBase.h.

99{this, "CaloSuperCellDetDescrManager", "CaloSuperCellDetDescrManager", "SG key of the resulting CaloSuperCellDetDescrManager" };

◆ m_chanHash

NTuple::Item<long> LArCond2NtupleBase::m_chanHash
protected

Definition at line 77 of file LArCond2NtupleBase.h.

◆ m_channel

NTuple::Item<long> LArCond2NtupleBase::m_channel
protected

Definition at line 74 of file LArCond2NtupleBase.h.

◆ m_detector

NTuple::Item<long> LArCond2NtupleBase::m_detector
protected

Definition at line 73 of file LArCond2NtupleBase.h.

◆ m_detStore

StoreGateSvc* LArCond2NtupleBase::m_detStore
protected

Definition at line 83 of file LArCond2NtupleBase.h.

◆ m_emId

const LArEM_Base_ID* LArCond2NtupleBase::m_emId
protected

Definition at line 84 of file LArCond2NtupleBase.h.

◆ m_eta

NTuple::Item<long> LArCond2NtupleBase::m_eta
protected

Definition at line 73 of file LArCond2NtupleBase.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_expandId

Gaudi::Property< bool > LArCond2NtupleBase::m_expandId {this,"ExpandId", true ,"add online Id decoded fields ?"}
protected

Definition at line 62 of file LArCond2NtupleBase.h.

62{this,"ExpandId", true ,"add online Id decoded fields ?"};

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_fcalId

const LArFCAL_Base_ID* LArCond2NtupleBase::m_fcalId
protected

Definition at line 86 of file LArCond2NtupleBase.h.

◆ m_febHash

NTuple::Item<long> LArCond2NtupleBase::m_febHash
protected

Definition at line 77 of file LArCond2NtupleBase.h.

◆ m_FEBTemp1

NTuple::Item<float> LArCond2NtupleBase::m_FEBTemp1
protected

Definition at line 80 of file LArCond2NtupleBase.h.

◆ m_FEBTemp2

NTuple::Item<float> LArCond2NtupleBase::m_FEBTemp2
protected

Definition at line 80 of file LArCond2NtupleBase.h.

◆ m_FEBTempTool

ToolHandle<ILArFEBTempTool> LArCond2NtupleBase::m_FEBTempTool
protected

Definition at line 89 of file LArCond2NtupleBase.h.

◆ m_FT

NTuple::Item<long> LArCond2NtupleBase::m_FT
protected

Definition at line 74 of file LArCond2NtupleBase.h.

◆ m_hecId

const LArHEC_Base_ID* LArCond2NtupleBase::m_hecId
protected

Definition at line 85 of file LArCond2NtupleBase.h.

◆ m_initialized

bool LArCond2NtupleBase::m_initialized
private

Definition at line 51 of file LArCond2NtupleBase.h.

◆ m_isConnected

NTuple::Item<long> LArCond2NtupleBase::m_isConnected
protected

Definition at line 76 of file LArCond2NtupleBase.h.

◆ m_isFlat

Gaudi::Property< bool > LArCond2NtupleBase::m_isFlat {this, "isFlat", false, "are we working with Flat conditions ?"}
protected

Definition at line 57 of file LArCond2NtupleBase.h.

57{this, "isFlat", false, "are we working with Flat conditions ?"};

◆ m_isSC

Gaudi::Property< bool > LArCond2NtupleBase::m_isSC {this, "isSC", false, "are we working with SC?"}
protected

Definition at line 56 of file LArCond2NtupleBase.h.

56{this, "isSC", false, "are we working with SC?"};

◆ m_layer

NTuple::Item<long> LArCond2NtupleBase::m_layer
protected

Definition at line 73 of file LArCond2NtupleBase.h.

◆ m_NGains

Gaudi::Property< int > LArCond2NtupleBase::m_NGains {this,"nGains", CaloGain::LARNGAIN,"Number of gains"}
protected

Definition at line 63 of file LArCond2NtupleBase.h.

63{this,"nGains", CaloGain::LARNGAIN,"Number of gains"};
@ LARNGAIN
Definition CaloGain.h:19

◆ m_nt

NTuple::Tuple* LArCond2NtupleBase::m_nt
protected

Definition at line 70 of file LArCond2NtupleBase.h.

◆ m_ntpath

std::string LArCond2NtupleBase::m_ntpath
protected

Definition at line 67 of file LArCond2NtupleBase.h.

◆ m_ntTitle

std::string LArCond2NtupleBase::m_ntTitle
protected

Definition at line 67 of file LArCond2NtupleBase.h.

◆ m_OffId

Gaudi::Property< bool > LArCond2NtupleBase::m_OffId {this, "OffId", false, "dump also offline ID ?"}
protected

Definition at line 58 of file LArCond2NtupleBase.h.

58{this, "OffId", false, "dump also offline ID ?"};

◆ m_oflChanId

NTuple::Item<long> LArCond2NtupleBase::m_oflChanId
protected

Definition at line 73 of file LArCond2NtupleBase.h.

◆ m_oflHash

NTuple::Item<long> LArCond2NtupleBase::m_oflHash
protected

Definition at line 77 of file LArCond2NtupleBase.h.

◆ m_onlChanId

NTuple::Item<long> LArCond2NtupleBase::m_onlChanId
protected

Definition at line 73 of file LArCond2NtupleBase.h.

◆ m_onlineId

const LArOnlineID_Base* LArCond2NtupleBase::m_onlineId
protected

Definition at line 87 of file LArCond2NtupleBase.h.

◆ m_phi

NTuple::Item<long> LArCond2NtupleBase::m_phi
protected

Definition at line 73 of file LArCond2NtupleBase.h.

◆ m_pos_neg

NTuple::Item<long> LArCond2NtupleBase::m_pos_neg
protected

Definition at line 74 of file LArCond2NtupleBase.h.

◆ m_realgeom

Gaudi::Property< bool > LArCond2NtupleBase::m_realgeom {this, "RealGeometry", false, "add real geometry values ?"}
protected

Definition at line 61 of file LArCond2NtupleBase.h.

61{this, "RealGeometry", false, "add real geometry values ?"};

◆ m_region

NTuple::Item<long> LArCond2NtupleBase::m_region
protected

Definition at line 73 of file LArCond2NtupleBase.h.

◆ m_reta

NTuple::Item<float> LArCond2NtupleBase::m_reta
protected

Definition at line 79 of file LArCond2NtupleBase.h.

◆ m_rphi

NTuple::Item<float> LArCond2NtupleBase::m_rphi
protected

Definition at line 79 of file LArCond2NtupleBase.h.

◆ m_slot

NTuple::Item<long> LArCond2NtupleBase::m_slot
protected

Definition at line 74 of file LArCond2NtupleBase.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: