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

#include <ReadTBLArDigits.h>

Inheritance diagram for ReadTBLArDigits:
Collaboration diagram for ReadTBLArDigits:

Classes

class  SortDigits

Public Member Functions

 ReadTBLArDigits (const std::string &name, ISvcLocator *pSvcLocator)
 ~ReadTBLArDigits ()
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

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

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

Private Attributes

int m_count
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
const LArEM_IDm_emId
const LArFCAL_IDm_fcalId
const LArHEC_IDm_hecId
const LArOnlineIDm_onlineHelper
std::ofstream m_outfile
std::string m_containerKey
std::string m_dumpFile
bool m_printCellLoc
bool m_printFebChan
NTuple::Tuple * m_ntuplePtr
NTuple::Item< long > m_cellIndex
NTuple::Array< long > m_layer
NTuple::Array< long > m_eta
NTuple::Array< long > m_phi
NTuple::Array< long > m_gain
NTuple::Array< long > m_barrel_ec
NTuple::Array< long > m_pos_neg
NTuple::Array< long > m_FT
NTuple::Array< long > m_slot
NTuple::Array< long > m_channel
NTuple::Matrix< long > m_samples
NTuple::Item< long > m_Nsamples
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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 25 of file ReadTBLArDigits.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

◆ ReadTBLArDigits()

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

Definition at line 17 of file ReadTBLArDigits.cxx.

18 : AthAlgorithm(name, pSvcLocator),
19 m_count(0),
20 m_emId(0),
21 m_fcalId(0),
22 m_hecId(0),
25{
26 declareProperty("ContainerKey",m_containerKey="");
27 declareProperty("DumpFile",m_dumpFile="");
28 declareProperty("PrintCellLocation",m_printCellLoc=false);
29 declareProperty("PrintFebChan",m_printFebChan=true);
30
31}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const LArFCAL_ID * m_fcalId
const LArEM_ID * m_emId
const LArHEC_ID * m_hecId
std::string m_containerKey
std::string m_dumpFile
const LArOnlineID * m_onlineHelper
NTuple::Tuple * m_ntuplePtr

◆ ~ReadTBLArDigits()

ReadTBLArDigits::~ReadTBLArDigits ( )

Definition at line 33 of file ReadTBLArDigits.cxx.

34{//empty
35}

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 }

◆ 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 ReadTBLArDigits::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 90 of file ReadTBLArDigits.cxx.

91{
92
93 MsgStream log(msgSvc(), name());
94 m_count++;
96 log << MSG::DEBUG << "======== executing event "<< m_count << " ========" << endmsg;
97 log << MSG::DEBUG << "Retrieving TBLArDigitContainer. Key= " << m_containerKey << endmsg;
98 TBLArDigitContainer* larDigitCont = nullptr;
99 if (m_containerKey.size())
100 sc = evtStore()->retrieve(larDigitCont ,m_containerKey);
101 else
102 sc = evtStore()->retrieve(larDigitCont);
103 if (sc.isFailure())
104 {log << MSG::FATAL << " Cannot read TBLArDigitContainer from StoreGate! key=" << m_containerKey << endmsg;
105 return StatusCode::FAILURE;
106 }
107
108
109 if (m_outfile.is_open()) {
110 log << MSG::DEBUG << "Sorting digits" << endmsg;
111 SortDigits sortDigits(m_onlineHelper);
112 std::sort(larDigitCont->begin(),larDigitCont->end(),sortDigits);
113 }
114
115 SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey, ctx);
116
117 log << MSG::DEBUG << "Finished sorting" << endmsg;
118 unsigned cellCounter=0;
119 if (larDigitCont->size()>0)
120 m_Nsamples=larDigitCont->front()->samples().size();
121 else
122 m_Nsamples=0;
123 log << MSG::DEBUG << "Now loop over digits" << endmsg;
124 for (const LArDigit* digit : *larDigitCont) {
125 HWIdentifier chid=digit->hardwareID();
126 log << MSG::DEBUG << "Get offline ID" << endmsg;
127 const Identifier id=cabling->cnvToIdentifier(chid);
128 const std::vector<short>& vSamples=digit->samples();
129 m_cellIndex=cellCounter;
130 log << MSG::DEBUG << "Now find eta/phi (EM only right now)" << endmsg;
131 if (m_emId->is_lar_em(id)) {
132 m_eta[m_cellIndex]=m_emId->eta(id);
133 m_phi[m_cellIndex]=m_emId->phi(id);
134 m_layer[m_cellIndex]=m_emId->sampling(id);
135 } else if (m_fcalId->is_lar_fcal(id)) {
136 m_eta[m_cellIndex]=m_fcalId->eta(id);
137 m_phi[m_cellIndex]=m_fcalId->phi(id);
138 m_layer[m_cellIndex]=m_fcalId->module(id);
139 } else if (m_hecId->is_lar_hec(id)) {
140 m_eta[m_cellIndex]=m_hecId->eta(id);
141 m_phi[m_cellIndex]=m_hecId->phi(id);
142 m_layer[m_cellIndex]=m_hecId->sampling(id);
143 } else {
147 }
148 log << MSG::DEBUG << "Store identifier arrays" << endmsg;
149 m_barrel_ec[m_cellIndex]=m_onlineHelper->barrel_ec(chid);
150 m_pos_neg[m_cellIndex] = m_onlineHelper->pos_neg(chid);
151 m_FT[m_cellIndex] = m_onlineHelper->feedthrough(chid);
152 m_slot[m_cellIndex] = m_onlineHelper->slot(chid);
153 m_channel[m_cellIndex] = m_onlineHelper->channel(chid);
154 m_gain[m_cellIndex]=digit->gain();
155
156 log << MSG::DEBUG << "Loop over samples" << endmsg;
157 int nSamples=vSamples.size();
158 for (int i=0;i<nSamples && i<32;i++)
159 m_samples[m_cellIndex][i]=vSamples[i];
160
161 if (m_outfile.is_open()) {
162 m_outfile << "Evt="<< m_count << " ";
163 if (m_printCellLoc)
164 m_outfile << "Cell l/e/p= " << m_layer[m_cellIndex] << "/" << m_eta[m_cellIndex]
165 << "/" << m_phi[m_cellIndex] << " ";
166 if (m_printFebChan)
167 m_outfile << "FebId= 0x" << std::hex << m_onlineHelper->feb_Id(chid).get_compact()
168 << std::dec << " Ch= " << m_onlineHelper->channel(chid) << " ";
169 for (int i=0;i<nSamples;i++) {
170 m_outfile << " " << vSamples[i];
171 }
172 m_outfile << " G=" << m_gain[m_cellIndex] << std::endl;
173 }
174 cellCounter++;
175 }
176 sc=ntupleSvc()->writeRecord(m_ntuplePtr);
177 if (sc!=StatusCode::SUCCESS) {
178 log << MSG::ERROR << "writeRecord failed" << endmsg;
179 return StatusCode::FAILURE;
180 }
181
182 if (m_count%1000==0)
183 log << MSG::INFO << "Event " << m_count << " contains " << cellCounter << " channels\n";
184 return StatusCode::SUCCESS;
185}
#define endmsg
static Double_t sc
INTupleSvc * ntupleSvc()
ServiceHandle< StoreGateSvc > & evtStore()
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
const T * front() const
Access the first element in the collection as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.
const std::vector< short > & samples() const
Definition LArDigit.h:78
NTuple::Array< long > m_phi
std::ofstream m_outfile
NTuple::Array< long > m_slot
NTuple::Array< long > m_pos_neg
NTuple::Array< long > m_eta
NTuple::Item< long > m_cellIndex
NTuple::Item< long > m_Nsamples
NTuple::Array< long > m_barrel_ec
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
NTuple::Array< long > m_layer
NTuple::Array< long > m_gain
NTuple::Matrix< long > m_samples
NTuple::Array< long > m_FT
NTuple::Array< long > m_channel
::StatusCode StatusCode
StatusCode definition for legacy code.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ 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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode ReadTBLArDigits::finalize ( )
overridevirtual

Definition at line 187 of file ReadTBLArDigits.cxx.

188{ MsgStream log(msgSvc(), name());
189 if (m_outfile.is_open())
190 m_outfile.close();
191 log << MSG::INFO << "finalize ReadTBLArDigits" << endmsg;
192 return StatusCode::SUCCESS;
193}

◆ initialize()

StatusCode ReadTBLArDigits::initialize ( )
overridevirtual

Definition at line 37 of file ReadTBLArDigits.cxx.

38{ MsgStream log(msgSvc(), name());
39 log << MSG::INFO << "Initialize" << endmsg;
40
41 const CaloCell_ID* idHelper = nullptr;
42 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
43 m_emId=idHelper->em_idHelper();
44 m_fcalId=idHelper->fcal_idHelper();
45 m_hecId=idHelper->hec_idHelper();
46
47 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
48
49 if (m_dumpFile.size()>0)
50 m_outfile.open(m_dumpFile.c_str(),std::ios::out);
51 //Ntuple booking
52
53
54 NTupleFilePtr file1(ntupleSvc(),"/NTUPLES/FILE1");
55 if (!file1)
56 {log << MSG::ERROR << "Booking of NTuple failed" << endmsg;
57 return StatusCode::FAILURE;
58 }
59 NTuplePtr nt(ntupleSvc(),"/NTUPLES/FILE1/LARDIGITS");
60 if (!nt) {
61 nt=ntupleSvc()->book("/NTUPLES/FILE1/LARDIGITS",CLID_ColumnWiseTuple,"LArDigits");
62 }
63 if (!nt)
64 {log << MSG::ERROR << "Booking of NTuple failed" << endmsg;
65 return StatusCode::FAILURE;
66 }
67
68 ATH_CHECK( nt->addItem("icell",m_cellIndex,0,3600) );
69 ATH_CHECK( nt->addItem("layer",m_cellIndex,m_layer) );
70 ATH_CHECK( nt->addItem("ieta",m_cellIndex,m_eta) );
71 ATH_CHECK( nt->addItem("iphi",m_cellIndex,m_phi) );
72 ATH_CHECK( nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec) );
73 ATH_CHECK( nt->addItem("pos_neg",m_cellIndex,m_pos_neg) );
74 ATH_CHECK( nt->addItem("FT",m_cellIndex,m_FT) );
75 ATH_CHECK( nt->addItem("slot",m_cellIndex,m_slot) );
76 ATH_CHECK( nt->addItem("channel",m_cellIndex,m_channel) );
77 ATH_CHECK( nt->addItem("gain",m_cellIndex,m_gain) );
78 ATH_CHECK( nt->addItem("NSamples",m_Nsamples,0,32) );
79 ATH_CHECK( nt->addItem("Samples",m_cellIndex,m_samples,32) );
80
81 ATH_CHECK( m_cablingKey.initialize() );
82
84 m_count=0;
85 log << MSG::INFO << "======== ReadTBLArDigits initialize successfully ========" << endmsg;
86 return StatusCode::SUCCESS;
87}
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Definition CaloCell_ID.h:75
const LArEM_ID * em_idHelper() const
access to EM idHelper
Definition CaloCell_ID.h:63
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
Definition CaloCell_ID.h:69

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

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ 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()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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

◆ m_barrel_ec

NTuple::Array<long> ReadTBLArDigits::m_barrel_ec
private

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_cablingKey

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

Definition at line 39 of file ReadTBLArDigits.h.

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

◆ m_cellIndex

NTuple::Item<long> ReadTBLArDigits::m_cellIndex
private

Definition at line 54 of file ReadTBLArDigits.h.

◆ m_channel

NTuple::Array<long> ReadTBLArDigits::m_channel
private

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_containerKey

std::string ReadTBLArDigits::m_containerKey
private

Definition at line 46 of file ReadTBLArDigits.h.

◆ m_count

int ReadTBLArDigits::m_count
private

Definition at line 38 of file ReadTBLArDigits.h.

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

std::string ReadTBLArDigits::m_dumpFile
private

Definition at line 47 of file ReadTBLArDigits.h.

◆ m_emId

const LArEM_ID* ReadTBLArDigits::m_emId
private

Definition at line 41 of file ReadTBLArDigits.h.

◆ m_eta

NTuple::Array<long> ReadTBLArDigits::m_eta
private

Definition at line 55 of file ReadTBLArDigits.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 AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_fcalId

const LArFCAL_ID* ReadTBLArDigits::m_fcalId
private

Definition at line 42 of file ReadTBLArDigits.h.

◆ m_FT

NTuple::Array<long> ReadTBLArDigits::m_FT
private

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_gain

NTuple::Array<long> ReadTBLArDigits::m_gain
private

Definition at line 55 of file ReadTBLArDigits.h.

◆ m_hecId

const LArHEC_ID* ReadTBLArDigits::m_hecId
private

Definition at line 43 of file ReadTBLArDigits.h.

◆ m_layer

NTuple::Array<long> ReadTBLArDigits::m_layer
private

Definition at line 55 of file ReadTBLArDigits.h.

◆ m_Nsamples

NTuple::Item<long> ReadTBLArDigits::m_Nsamples
private

Definition at line 58 of file ReadTBLArDigits.h.

◆ m_ntuplePtr

NTuple::Tuple* ReadTBLArDigits::m_ntuplePtr
private

Definition at line 52 of file ReadTBLArDigits.h.

◆ m_onlineHelper

const LArOnlineID* ReadTBLArDigits::m_onlineHelper
private

Definition at line 44 of file ReadTBLArDigits.h.

◆ m_outfile

std::ofstream ReadTBLArDigits::m_outfile
private

Definition at line 45 of file ReadTBLArDigits.h.

◆ m_phi

NTuple::Array<long> ReadTBLArDigits::m_phi
private

Definition at line 55 of file ReadTBLArDigits.h.

◆ m_pos_neg

NTuple::Array<long> ReadTBLArDigits::m_pos_neg
private

Definition at line 56 of file ReadTBLArDigits.h.

◆ m_printCellLoc

bool ReadTBLArDigits::m_printCellLoc
private

Definition at line 48 of file ReadTBLArDigits.h.

◆ m_printFebChan

bool ReadTBLArDigits::m_printFebChan
private

Definition at line 49 of file ReadTBLArDigits.h.

◆ m_samples

NTuple::Matrix<long> ReadTBLArDigits::m_samples
private

Definition at line 57 of file ReadTBLArDigits.h.

◆ m_slot

NTuple::Array<long> ReadTBLArDigits::m_slot
private

Definition at line 56 of file ReadTBLArDigits.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.


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