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< StoreGateSvc > StoreGateSvc_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 {0}
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
const LArEM_ID * m_emId {nullptr}
const LArFCAL_ID * m_fcalId {nullptr}
const LArHEC_ID * m_hecId {nullptr}
const LArOnlineID * m_onlineHelper {nullptr}
std::ofstream m_outfile
Gaudi::Property< std::string > m_containerKey {this, "ContainerKey", "", "SG key of the TBLArDigitContainer (empty: retrieve default)"}
Gaudi::Property< std::string > m_dumpFile {this, "DumpFile", "", "Name of the text dump file (empty: no dump)"}
Gaudi::Property< bool > m_printCellLoc {this, "PrintCellLocation", false, "Print cell layer/eta/phi in the dump file"}
Gaudi::Property< bool > m_printFebChan {this, "PrintFebChan", true, "Print FEB ID and channel in the dump file"}
NTuple::Tuple * m_ntuplePtr {nullptr}
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 376 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{
20}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

◆ ~ReadTBLArDigits()

ReadTBLArDigits::~ReadTBLArDigits ( )

Definition at line 22 of file ReadTBLArDigits.cxx.

23{//empty
24}

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

Execute method.

Implements AthAlgorithm.

Definition at line 79 of file ReadTBLArDigits.cxx.

80{
81
82 MsgStream log(msgSvc(), name());
83 m_count++;
85 log << MSG::DEBUG << "======== executing event "<< m_count << " ========" << endmsg;
86 log << MSG::DEBUG << "Retrieving TBLArDigitContainer. Key= " << m_containerKey.value() << endmsg;
87 TBLArDigitContainer* larDigitCont = nullptr;
88 if (m_containerKey.value().size())
89 sc = evtStore()->retrieve(larDigitCont ,m_containerKey.value());
90 else
91 sc = evtStore()->retrieve(larDigitCont);
92 if (sc.isFailure())
93 {log << MSG::FATAL << " Cannot read TBLArDigitContainer from StoreGate! key=" << m_containerKey.value() << endmsg;
94 return StatusCode::FAILURE;
95 }
96
97
98 if (m_outfile.is_open()) {
99 log << MSG::DEBUG << "Sorting digits" << endmsg;
100 SortDigits sortDigits(m_onlineHelper);
101 std::sort(larDigitCont->begin(),larDigitCont->end(),sortDigits);
102 }
103
104 SG::ReadCondHandle<LArOnOffIdMapping> cabling (m_cablingKey, ctx);
105
106 log << MSG::DEBUG << "Finished sorting" << endmsg;
107 unsigned cellCounter=0;
108 if (larDigitCont->size()>0)
109 m_Nsamples=larDigitCont->front()->samples().size();
110 else
111 m_Nsamples=0;
112 log << MSG::DEBUG << "Now loop over digits" << endmsg;
113 for (const LArDigit* digit : *larDigitCont) {
114 HWIdentifier chid=digit->hardwareID();
115 log << MSG::DEBUG << "Get offline ID" << endmsg;
116 const Identifier id=cabling->cnvToIdentifier(chid);
117 const std::vector<short>& vSamples=digit->samples();
118 m_cellIndex=cellCounter;
119 log << MSG::DEBUG << "Now find eta/phi (EM only right now)" << endmsg;
120 if (m_emId->is_lar_em(id)) {
121 m_eta[m_cellIndex]=m_emId->eta(id);
122 m_phi[m_cellIndex]=m_emId->phi(id);
123 m_layer[m_cellIndex]=m_emId->sampling(id);
124 } else if (m_fcalId->is_lar_fcal(id)) {
125 m_eta[m_cellIndex]=m_fcalId->eta(id);
126 m_phi[m_cellIndex]=m_fcalId->phi(id);
127 m_layer[m_cellIndex]=m_fcalId->module(id);
128 } else if (m_hecId->is_lar_hec(id)) {
129 m_eta[m_cellIndex]=m_hecId->eta(id);
130 m_phi[m_cellIndex]=m_hecId->phi(id);
131 m_layer[m_cellIndex]=m_hecId->sampling(id);
132 } else {
136 }
137 log << MSG::DEBUG << "Store identifier arrays" << endmsg;
138 m_barrel_ec[m_cellIndex]=m_onlineHelper->barrel_ec(chid);
139 m_pos_neg[m_cellIndex] = m_onlineHelper->pos_neg(chid);
140 m_FT[m_cellIndex] = m_onlineHelper->feedthrough(chid);
141 m_slot[m_cellIndex] = m_onlineHelper->slot(chid);
142 m_channel[m_cellIndex] = m_onlineHelper->channel(chid);
143 m_gain[m_cellIndex]=digit->gain();
144
145 log << MSG::DEBUG << "Loop over samples" << endmsg;
146 int nSamples=vSamples.size();
147 for (int i=0;i<nSamples && i<32;i++)
148 m_samples[m_cellIndex][i]=vSamples[i];
149
150 if (m_outfile.is_open()) {
151 m_outfile << "Evt="<< m_count << " ";
152 if (m_printCellLoc)
153 m_outfile << "Cell l/e/p= " << m_layer[m_cellIndex] << "/" << m_eta[m_cellIndex]
154 << "/" << m_phi[m_cellIndex] << " ";
155 if (m_printFebChan)
156 m_outfile << "FebId= 0x" << std::hex << m_onlineHelper->feb_Id(chid).get_compact()
157 << std::dec << " Ch= " << m_onlineHelper->channel(chid) << " ";
158 for (int i=0;i<nSamples;i++) {
159 m_outfile << " " << vSamples[i];
160 }
161 m_outfile << " G=" << m_gain[m_cellIndex] << std::endl;
162 }
163 cellCounter++;
164 }
165 sc=ntupleSvc()->writeRecord(m_ntuplePtr);
166 if (sc!=StatusCode::SUCCESS) {
167 log << MSG::ERROR << "writeRecord failed" << endmsg;
168 return StatusCode::FAILURE;
169 }
170
171 if (m_count%1000==0)
172 log << MSG::INFO << "Event " << m_count << " contains " << cellCounter << " channels\n";
173 return StatusCode::SUCCESS;
174}
#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
const LArFCAL_ID * m_fcalId
const LArEM_ID * m_emId
NTuple::Array< long > m_slot
NTuple::Array< long > m_pos_neg
const LArHEC_ID * m_hecId
NTuple::Array< long > m_eta
Gaudi::Property< bool > m_printFebChan
NTuple::Item< long > m_cellIndex
NTuple::Item< long > m_Nsamples
Gaudi::Property< bool > m_printCellLoc
NTuple::Array< long > m_barrel_ec
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
NTuple::Array< long > m_layer
NTuple::Array< long > m_gain
const LArOnlineID * m_onlineHelper
Gaudi::Property< std::string > m_containerKey
NTuple::Tuple * m_ntuplePtr
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 176 of file ReadTBLArDigits.cxx.

177{ MsgStream log(msgSvc(), name());
178 if (m_outfile.is_open())
179 m_outfile.close();
180 log << MSG::INFO << "finalize ReadTBLArDigits" << endmsg;
181 return StatusCode::SUCCESS;
182}

◆ initialize()

StatusCode ReadTBLArDigits::initialize ( )
overridevirtual

Definition at line 26 of file ReadTBLArDigits.cxx.

27{ MsgStream log(msgSvc(), name());
28 log << MSG::INFO << "Initialize" << endmsg;
29
30 const CaloCell_ID* idHelper = nullptr;
31 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
32 m_emId=idHelper->em_idHelper();
33 m_fcalId=idHelper->fcal_idHelper();
34 m_hecId=idHelper->hec_idHelper();
35
36 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
37
38 if (m_dumpFile.value().size()>0)
39 m_outfile.open(m_dumpFile.value().c_str(),std::ios::out);
40 //Ntuple booking
41
42
43 NTupleFilePtr file1(ntupleSvc(),"/NTUPLES/FILE1");
44 if (!file1)
45 {log << MSG::ERROR << "Booking of NTuple failed" << endmsg;
46 return StatusCode::FAILURE;
47 }
48 NTuplePtr nt(ntupleSvc(),"/NTUPLES/FILE1/LARDIGITS");
49 if (!nt) {
50 nt=ntupleSvc()->book("/NTUPLES/FILE1/LARDIGITS",CLID_ColumnWiseTuple,"LArDigits");
51 }
52 if (!nt)
53 {log << MSG::ERROR << "Booking of NTuple failed" << endmsg;
54 return StatusCode::FAILURE;
55 }
56
57 ATH_CHECK( nt->addItem("icell",m_cellIndex,0,3600) );
58 ATH_CHECK( nt->addItem("layer",m_cellIndex,m_layer) );
59 ATH_CHECK( nt->addItem("ieta",m_cellIndex,m_eta) );
60 ATH_CHECK( nt->addItem("iphi",m_cellIndex,m_phi) );
61 ATH_CHECK( nt->addItem("barrel_ec",m_cellIndex,m_barrel_ec) );
62 ATH_CHECK( nt->addItem("pos_neg",m_cellIndex,m_pos_neg) );
63 ATH_CHECK( nt->addItem("FT",m_cellIndex,m_FT) );
64 ATH_CHECK( nt->addItem("slot",m_cellIndex,m_slot) );
65 ATH_CHECK( nt->addItem("channel",m_cellIndex,m_channel) );
66 ATH_CHECK( nt->addItem("gain",m_cellIndex,m_gain) );
67 ATH_CHECK( nt->addItem("NSamples",m_Nsamples,0,32) );
68 ATH_CHECK( nt->addItem("Samples",m_cellIndex,m_samples,32) );
69
70 ATH_CHECK( m_cablingKey.initialize() );
71
73 m_count=0;
74 log << MSG::INFO << "======== ReadTBLArDigits initialize successfully ========" << endmsg;
75 return StatusCode::SUCCESS;
76}
#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
Gaudi::Property< std::string > m_dumpFile

◆ 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 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

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, 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 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

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

Gaudi::Property<std::string> ReadTBLArDigits::m_containerKey {this, "ContainerKey", "", "SG key of the TBLArDigitContainer (empty: retrieve default)"}
private

Definition at line 46 of file ReadTBLArDigits.h.

46{this, "ContainerKey", "", "SG key of the TBLArDigitContainer (empty: retrieve default)"};

◆ m_count

int ReadTBLArDigits::m_count {0}
private

Definition at line 38 of file ReadTBLArDigits.h.

38{0};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_dumpFile

Gaudi::Property<std::string> ReadTBLArDigits::m_dumpFile {this, "DumpFile", "", "Name of the text dump file (empty: no dump)"}
private

Definition at line 47 of file ReadTBLArDigits.h.

47{this, "DumpFile", "", "Name of the text dump file (empty: no dump)"};

◆ m_emId

const LArEM_ID* ReadTBLArDigits::m_emId {nullptr}
private

Definition at line 41 of file ReadTBLArDigits.h.

41{nullptr};

◆ 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 378 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 {nullptr}
private

Definition at line 42 of file ReadTBLArDigits.h.

42{nullptr};

◆ 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 {nullptr}
private

Definition at line 43 of file ReadTBLArDigits.h.

43{nullptr};

◆ 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 {nullptr}
private

Definition at line 52 of file ReadTBLArDigits.h.

52{nullptr};

◆ m_onlineHelper

const LArOnlineID* ReadTBLArDigits::m_onlineHelper {nullptr}
private

Definition at line 44 of file ReadTBLArDigits.h.

44{nullptr};

◆ 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

Gaudi::Property<bool> ReadTBLArDigits::m_printCellLoc {this, "PrintCellLocation", false, "Print cell layer/eta/phi in the dump file"}
private

Definition at line 48 of file ReadTBLArDigits.h.

48{this, "PrintCellLocation", false, "Print cell layer/eta/phi in the dump file"};

◆ m_printFebChan

Gaudi::Property<bool> ReadTBLArDigits::m_printFebChan {this, "PrintFebChan", true, "Print FEB ID and channel in the dump file"}
private

Definition at line 49 of file ReadTBLArDigits.h.

49{this, "PrintFebChan", true, "Print FEB ID and channel in the dump file"};

◆ 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 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


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