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

#include <CBNT_Timing.h>

Inheritance diagram for CBNT_Timing:

Public Member Functions

 CBNT_Timing (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~CBNT_Timing ()
virtual StatusCode CBNT_initialize () override
virtual StatusCode CBNT_execute () override
virtual StatusCode CBNT_finalize () override
virtual StatusCode CBNT_clear () override
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
virtual StatusCode pre_execute ()
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 Types

enum  { NOT_VALID = -999 }

Protected Member Functions

template<class T>
void addBranch (const std::string &branchname, T &obj, const std::string &leaflist)
template<class T>
void addBranch (const std::string &branchname, T *&obj)
template<class T>
void addBranch (const std::string &branchname, T *&obj, int bufferSize, int splitLevel)
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.

Protected Attributes

std::string m_ntpath
std::string m_ntTitle
TTree * m_nt {nullptr}
MsgStream * m_log {nullptr}
const LArEM_ID * m_emId {nullptr}
const LArHEC_ID * m_hecId {nullptr}
const LArFCAL_ID * m_fcalId {nullptr}
const LArOnlineID * m_onlineId {nullptr}

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

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

Private Attributes

SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
const LArOnlineID * m_onlineHelper {nullptr}
Gaudi::Property< double > m_energy_cut {this, "EnergyCut", 2.*CLHEP::GeV, "Cell energy cut"}
bool m_first_event {true}
Gaudi::Property< std::string > m_tbphase {this, "TBPhase", "TBPhase", "SG key of TBPhase"}
Gaudi::Property< std::vector< std::string > > m_sampling_names {this, "IncludedSamplings", {}, "Names of included calorimeter samplings"}
Gaudi::Property< std::string > m_caloCellName {this, "CellContainerName", "AllCalo", "SG key of CaloCellContainer"}
std::vector< CaloSampling::CaloSample > m_samplingIndices
 stores
std::map< CaloCell_ID::SUBCALO, std::vector< CaloSampling::CaloSample > > m_calosAndSamplings
std::vector< HWIdentifier > m_febIDs
std::map< int, std::string > m_slotToFebNameLookup
std::map< CaloCell_ID::SUBCALO, std::string > m_caloToNameLookup
std::map< std::string, CaloCell_ID::SUBCALO > m_caloFromNameLookup
std::map< CaloSampling::CaloSample, std::string > m_samplingToNameLookup
std::map< std::string, CaloSampling::CaloSample > m_samplingFromNameLookup
std::map< CaloSampling::CaloSample, CaloCell_ID::SUBCALO > m_caloLookup
std::vector< long > * m_layer_cell {nullptr}
std::vector< long > * m_eta_cell {nullptr}
std::vector< long > * m_phi_cell {nullptr}
std::vector< long > * m_febId_cell {nullptr}
std::vector< float > * m_energy_cell {nullptr}
std::vector< float > * m_time_cell {nullptr}
std::vector< float > * m_time_layer {nullptr}
std::vector< long > * m_layer_layer {nullptr}
std::vector< long > * m_febId_feb {nullptr}
std::vector< float > * m_time_feb {nullptr}
std::vector< long > * m_slot_feb {nullptr}
std::vector< long > * m_feedthrough_feb {nullptr}
float m_energy {0}
float m_time {0}
float m_tdc_phase {0}
bool m_initialized {false}
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

Static Private Attributes

static const int NOTIME = -999
static const int NOENERGY = -999

Detailed Description

Definition at line 23 of file CBNT_Timing.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protectedinherited
Enumerator
NOT_VALID 

Definition at line 56 of file CBNT_TBRecBase.h.

56{NOT_VALID = -999};

Constructor & Destructor Documentation

◆ CBNT_Timing()

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

Definition at line 26 of file CBNT_Timing.cxx.

27 :CBNT_TBRecBase(name, pSvcLocator)
28{}
CBNT_TBRecBase(const std::string &name, ISvcLocator *pSvcLocator)

◆ ~CBNT_Timing()

CBNT_Timing::~CBNT_Timing ( )
virtual

Definition at line 30 of file CBNT_Timing.cxx.

31{//empty
32}

Member Function Documentation

◆ addBranch() [1/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T & obj,
const std::string & leaflist )
inlineprotectedinherited

Definition at line 44 of file CBNT_TBRecBase.h.

44 {
45 m_nt->Branch(branchname.c_str(), &obj, leaflist.c_str());
46 }

◆ addBranch() [2/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T *& obj )
inlineprotectedinherited

Definition at line 47 of file CBNT_TBRecBase.h.

47 {
48 obj = new T();
49 m_nt->Branch(branchname.c_str(), &obj);
50 }
unsigned long long T

◆ addBranch() [3/3]

template<class T>
void CBNT_TBRecBase::addBranch ( const std::string & branchname,
T *& obj,
int bufferSize,
int splitLevel )
inlineprotectedinherited

Definition at line 51 of file CBNT_TBRecBase.h.

51 {
52 obj = new T();
53 m_nt->Branch(branchname.c_str(), &obj, bufferSize, splitLevel);
54 }

◆ CBNT_clear()

StatusCode CBNT_Timing::CBNT_clear ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 439 of file CBNT_Timing.cxx.

439 {
440
441 if(m_layer_cell) m_layer_cell->clear();
442 if(m_eta_cell) m_eta_cell->clear();
443 if(m_phi_cell) m_phi_cell->clear();
444 if(m_febId_cell) m_febId_cell->clear();
445 if(m_energy_cell) m_energy_cell->clear();
446 if(m_time_cell) m_time_cell->clear();
447 if(m_time_layer) m_time_layer->clear();
448 if(m_layer_layer) m_layer_layer->clear();
449 if(m_febId_feb) m_febId_feb->clear();
450 if(m_time_feb) m_time_feb->clear();
451 if(m_slot_feb) m_slot_feb->clear();
453 return StatusCode::SUCCESS;
454}
std::vector< long > * m_phi_cell
Definition CBNT_Timing.h:67
std::vector< float > * m_time_layer
Definition CBNT_Timing.h:70
std::vector< long > * m_feedthrough_feb
Definition CBNT_Timing.h:77
std::vector< long > * m_febId_cell
Definition CBNT_Timing.h:67
std::vector< long > * m_layer_layer
Definition CBNT_Timing.h:71
std::vector< long > * m_layer_cell
Definition CBNT_Timing.h:67
std::vector< long > * m_febId_feb
Definition CBNT_Timing.h:74
std::vector< long > * m_eta_cell
Definition CBNT_Timing.h:67
std::vector< long > * m_slot_feb
Definition CBNT_Timing.h:76
std::vector< float > * m_time_cell
Definition CBNT_Timing.h:68
std::vector< float > * m_energy_cell
Definition CBNT_Timing.h:68
std::vector< float > * m_time_feb
Definition CBNT_Timing.h:75

◆ CBNT_execute()

StatusCode CBNT_Timing::CBNT_execute ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 106 of file CBNT_Timing.cxx.

107{
108 ATH_MSG_DEBUG ( "in execute()" );
109
111 // Data Access //
113
114 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
115 const LArOnOffIdMapping* cabling{*cablingHdl};
116 if(!cabling) {
117 ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_cablingKey.key() );
118 return StatusCode::FAILURE;
119 }
120
121 // CaloCells
122 const CaloCellContainer* cellContainer = nullptr;
123 ATH_CHECK( evtStore()->retrieve(cellContainer, m_caloCellName.value() ) );
124
125 // TBPhase
126 TBPhase * phase = nullptr;
127 ATH_CHECK( evtStore()->retrieve(phase,m_tbphase.value()) );
128
129 m_tdc_phase = phase->getPhase();
130
132 // First Event Action //
134
135 if (m_first_event) {
136
137 // find all febID's related to the requested samplings
138 // loop over desired calorimeter modules first, more efficient this way
139 for (const auto& p : m_calosAndSamplings) {
140 CaloCell_ID::SUBCALO idCalo = p.first;
141 std::vector<CaloSampling::CaloSample> samplingV = p.second;
142
143 // loop over the corresponding CaloCell's
144 for (CaloCellContainer::const_iterator cell = cellContainer->beginConstCalo(idCalo);
145 cell != cellContainer->endConstCalo(idCalo); ++cell) {
146
147 // get the corresponding sample
149 const CaloDetDescrElement * theCaloDDE= (*cell)->caloDDE();
150 if (theCaloDDE) {
151 idSample = (CaloSampling::CaloSample) theCaloDDE->getSampling();
152 }else{
153 idSample = CaloSampling::Unknown;
154 }
155
156 // only consider CaloCell's in the requested sampling
157 if (find(samplingV.begin(), samplingV.end(), idSample) != samplingV.end()) {
158
159 // here you have the CaloCell with idCalo, idSample, **cell
160 // find the hardware ID and the corresponding febID
161
162 HWIdentifier id = cabling->createSignalChannelID((*cell)->ID());
163 HWIdentifier febID = m_onlineHelper->feb_Id(id);
164
165 // store it if you don't have it already
166 if (find(m_febIDs.begin(), m_febIDs.end(), febID) == m_febIDs.end()) m_febIDs.push_back(febID);
167
168 }
169 }
170 }
171 // print out
172 msg() << MSG::INFO << "FEB IDs: ";
173 for (HWIdentifier febID : m_febIDs) {
174 std::ostringstream os;
175 os << std::hex << febID;
176 msg() << MSG::INFO << " \042" << os.str() << "\042";
177 }
178 msg() << MSG::INFO << endmsg;
179
180 m_first_event = false;
181 }
182
183
185 // sampling timing distributions //
187
188 // energy weighted time stores
189 std::map<CaloSampling::CaloSample, double> sumEPerSampling, sumETimePerSampling; // sampling id keyed
190 std::map<HWIdentifier, double> sumEPerFeb, sumETimePerFeb; // febID keyed
191 double sumETotal = 0, sumETimeTotal = 0;
192 bool eSet = false;
193
194 // fill energy weighted time stores
195 // loop over desired calorimeter modules first, more efficient this way
196 m_energy = 0;
197
198 for (const auto& p : m_calosAndSamplings) {
199 CaloCell_ID::SUBCALO idCalo = p.first;
201 ( "Looping over CaloCells of calorimeter : \042"
202 << m_caloToNameLookup[idCalo]
203 << "\042" );
204 std::vector<CaloSampling::CaloSample> samplingV = p.second;
205
206 // loop over the corresponding CaloCell's
207 for (CaloCellContainer::const_iterator cell = cellContainer->beginConstCalo(idCalo);
208 cell != cellContainer->endConstCalo(idCalo); ++cell) {
209
210 // get the corresponding sample
211 //CaloSampling::CaloSample idSample = CaloSampling::getSampling(**cell);
213 const CaloDetDescrElement * theCaloDDE= (*cell)->caloDDE();
214 if (theCaloDDE) {
215 idSample = (CaloSampling::CaloSample) theCaloDDE->getSampling();
216 }else{
217 idSample = CaloSampling::Unknown;
218 }
219
220 // only consider CaloCell's in the requested sampling
221 if (find(samplingV.begin(), samplingV.end(), idSample) != samplingV.end()) {
222
223 // here you have the CaloCell with idCalo, idSample, **cell
224 // find the hardware ID and the corresponding febID
225
226 HWIdentifier id = cabling->createSignalChannelID((*cell)->ID());
227 HWIdentifier febID = m_onlineHelper->feb_Id(id);
228
229 // gather sums for energy weighted cubic peaking time
230 // select cells for which the cubic interpolation was successfully applied
231 // *** for now, this is done by requiring that time(ns) is not too close to 25ns * n
232 // *** but it should be done using the CaloCell quality, when available...
233 // select cells above an energy threshold
234
235 double energy = (*cell)->e();
236 double time = (*cell)->time();
237 if (fabs(time/ns - float(int(time/(25*ns))*25.)) > 0.001 && energy > m_energy_cut) {
238
239 m_time_cell->push_back(time/ns);
240 m_energy_cell->push_back(energy/GeV);
242
243 sumEPerSampling[idSample] += energy;
244 sumETimePerSampling[idSample] += energy * time;
245
246 sumEPerFeb[febID] += energy;
247 sumETimePerFeb[febID] += energy * time;
248
249 sumETotal += energy;
250 sumETimeTotal += energy * time;
251 eSet = true;
252
254 ( "cell time = " << time/ns << " ns"
255 << "; energy = " << energy/GeV << " GeV" );
256
257 } else {
258 // below energy cut
259 m_time_cell->push_back(NOTIME);
260 m_energy_cell->push_back(NOENERGY);
261 }
262
263 m_febId_cell->push_back(febID.get_identifier32().get_compact());
264 //try {
265 //const Identifier ident = cabling->cnvToIdentifier(id);
266 if ( m_emId->is_lar_em((*cell)->ID()) ) {
267 m_eta_cell->push_back(m_emId->eta((*cell)->ID()));
268 m_phi_cell->push_back(m_emId->phi((*cell)->ID()));
269 m_layer_cell->push_back(m_emId->sampling((*cell)->ID()));
270 } else {
271 m_eta_cell->push_back(0);
272 m_phi_cell->push_back(0);
273 m_layer_cell->push_back(0);
274 }
275 //}
276 /*catch (LArID_Exception & except) {
277 m_eta_cell->push_back(-999);
278 m_phi_cell->push_back(-999);
279 m_layer_cell->push_back(-999);
280 }*/
281
282 }
283 }
284 }
285
286 // fill energy weighted cubic peaking time for each requested sampling
288 // go on only if there is data stored for this sample:
289 //if (sumEPerSampling.find(idSample) != sumEPerSampling.end()) {
290 double peakTime = (sumEPerSampling[idSample] > 0.) ? sumETimePerSampling[idSample]/sumEPerSampling[idSample] : NOTIME;
291 m_time_layer->push_back(peakTime/ns);
292 m_layer_layer->push_back(idSample);
293 //}
294 }
295
296 // fill energy weighted cubic peaking time for each requested FEB
297 for (HWIdentifier febID : m_febIDs) {
298 // go on only if there is data stored for this febID
299 //if (sumEPerFeb.find(febID) != sumEPerFeb.end()) {
300 double peakTime = (sumEPerFeb[febID] > 0.) ? sumETimePerFeb[febID]/sumEPerFeb[febID] : NOTIME;
301 m_time_feb->push_back(peakTime/ns);
302 m_febId_feb->push_back(febID.get_identifier32().get_compact());
303 m_slot_feb->push_back(m_onlineHelper->slot(febID));
304 m_feedthrough_feb->push_back(m_onlineHelper->feedthrough(febID));
305 //}
306 }
307
308 // fill energy weighted cubic peaking time for everything
309 if (eSet) {
310 m_time = (sumETotal > 0.) ? sumETimeTotal/sumETotal : 0.;
311 }
312
313 //if (m_Ncells > 0) std::cout << "#cells: " << m_Ncells << std::endl;
314 return StatusCode::SUCCESS;
315}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
ServiceHandle< StoreGateSvc > & evtStore()
const LArEM_ID * m_emId
std::map< CaloCell_ID::SUBCALO, std::vector< CaloSampling::CaloSample > > m_calosAndSamplings
Definition CBNT_Timing.h:53
const LArOnlineID * m_onlineHelper
Definition CBNT_Timing.h:41
bool m_first_event
Definition CBNT_Timing.h:44
static const int NOENERGY
Definition CBNT_Timing.h:38
std::vector< HWIdentifier > m_febIDs
Definition CBNT_Timing.h:54
std::vector< CaloSampling::CaloSample > m_samplingIndices
stores
Definition CBNT_Timing.h:52
static const int NOTIME
Definition CBNT_Timing.h:37
Gaudi::Property< std::string > m_caloCellName
Definition CBNT_Timing.h:48
Gaudi::Property< std::string > m_tbphase
Definition CBNT_Timing.h:46
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition CBNT_Timing.h:40
float m_tdc_phase
Definition CBNT_Timing.h:80
float m_energy
Definition CBNT_Timing.h:80
Gaudi::Property< double > m_energy_cut
Definition CBNT_Timing.h:43
std::map< CaloCell_ID::SUBCALO, std::string > m_caloToNameLookup
Definition CBNT_Timing.h:59
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
CaloCell_ID::CaloSample getSampling() const
cell sampling
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:861
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:140
time(flags, cells_name, *args, **kw)

◆ CBNT_finalize()

StatusCode CBNT_Timing::CBNT_finalize ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 321 of file CBNT_Timing.cxx.

322{
323 ATH_MSG_DEBUG ( "in finalize()" );
324 return StatusCode::SUCCESS;
325}

◆ CBNT_initialize()

StatusCode CBNT_Timing::CBNT_initialize ( )
overridevirtual

Reimplemented from CBNT_TBRecBase.

Definition at line 34 of file CBNT_Timing.cxx.

34 {
35
36 ATH_MSG_DEBUG ( "CBNT_Timing in initialize()" );
37
38 ATH_CHECK( m_cablingKey.initialize() );
39 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
40
41 addBranch ("TDC_TimeCell",m_time_cell);
42 addBranch ("TDC_EnergyCell",m_energy_cell);
43 addBranch ("TDC_LayerCell",m_layer_cell);
44 addBranch ("TDC_EtaCell", m_eta_cell);
45 addBranch ("TDC_PhiCell", m_phi_cell);
46 addBranch ("TDC_FebIDCell", m_febId_cell);
47 addBranch ("TDC_TimeLayer",m_time_layer);
48 addBranch ("TDC_LayerIDLayer",m_layer_layer);
49 addBranch ("TDC_TimeFeb",m_time_feb);
50 addBranch ("TDC_FebIdFeb",m_febId_feb);
51 addBranch ("TDC_SlotFeb", m_slot_feb);
52 addBranch ("TDC_FeedthroughFeb", m_feedthrough_feb);
53 addBranch ("TDC_Phase",m_tdc_phase, "Phase/F");
54 addBranch ("TDC_TimeTotal",m_time, "TimeTotal/F");
55 addBranch ("TDC_EnergyTotal",m_energy, "EnergyTotal/F");
56
57
58
59
60 // setup calorimeter module and sampling lookup tables
62
63 // get calorimeter samplings ids for the requested samplings
64 msg() << MSG::INFO << "Included calorimeter samplings: ";
65 for (const std::string& sampling : m_sampling_names.value()) {
67 if (idSamp != CaloSampling::Unknown) {
68 m_samplingIndices.push_back(idSamp);
69 msg() << MSG::INFO << "\042" << sampling
70 << "\042 ";
71 }
72 }
73 msg() << MSG::INFO << endmsg;
74
75 // get an idCalo keyed map of vectors of idSample for the requested samplings
77 // find the idCalo
78 CaloCell_ID::SUBCALO idCalo = m_caloLookup[idSample];
79 // build the vector of idSample
80 std::vector<CaloSampling::CaloSample> samplingV = m_calosAndSamplings[idCalo];
81 samplingV.push_back(idSample);
82 m_calosAndSamplings[idCalo] = std::move(samplingV);
83 }
84 // printout
85 for (const auto& p : m_calosAndSamplings) {
86 CaloCell_ID::SUBCALO idCalo = p.first;
87 msg() << MSG::INFO
88 << "Included calorimeter : \042"
89 << m_caloToNameLookup[idCalo]
90 << "\042 samplings:";
91 const std::vector<CaloSampling::CaloSample>& samplingV = p.second;
92 for (CaloSampling::CaloSample sample : samplingV) {
93 msg() << MSG::INFO
94 << " \042"
96 << "\042";
97 }
98 msg() << MSG::INFO << endmsg;
99 }
100
101 return StatusCode::SUCCESS;
102
103}
const ServiceHandle< StoreGateSvc > & detStore() const
void addBranch(const std::string &branchname, T &obj, const std::string &leaflist)
std::map< CaloSampling::CaloSample, std::string > m_samplingToNameLookup
Definition CBNT_Timing.h:61
std::map< std::string, CaloSampling::CaloSample > m_samplingFromNameLookup
Definition CBNT_Timing.h:62
std::map< CaloSampling::CaloSample, CaloCell_ID::SUBCALO > m_caloLookup
Definition CBNT_Timing.h:63
Gaudi::Property< std::vector< std::string > > m_sampling_names
Definition CBNT_Timing.h:47
StatusCode setupLookupTables()
internal helpers

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

Execute method.

Implements AthAlgorithm.

Definition at line 152 of file CBNT_TBRecBase.cxx.

152 {
153
155
156 // run pre-execution
157 try {
158 sc = this->pre_execute();
159 }
160
161 catch( const std::exception& Exception ) {
162 *m_log << MSG::ERROR << " Standard exception "
163 << Exception.what()
164 << " caught from sub-algorithm::CBNT_pre_execute (). Disable !" << endmsg ;
165 sc = this->setProperty(BooleanProperty( "Enable",false ) );
166 return StatusCode::FAILURE;
167
168 }
169 catch (...) {
170 *m_log << MSG::ERROR << " Unknown exception "
171 << " caught from sub-algorithm::CBNT_pre_execute (). Disable !" << endmsg ;
172 sc = this->setProperty(BooleanProperty( "Enable",false ) );
173 return StatusCode::FAILURE;
174 }
175
176 if (sc.isFailure()) {
177 *m_log << MSG::ERROR << "CBNT_pre_execute() failed. Disable !" << endmsg;
178 sc = this->setProperty(BooleanProperty( "Enable",false ) );
179 return sc;
180 }
181
182 // now subalgorithm execution
183 try {
184 sc = this->CBNT_execute();
185 }
186
187 catch( const std::exception& Exception ) {
188 *m_log << MSG::ERROR << " Standard exception "
189 << Exception.what()
190 << " caught from sub-algorithm::CBNT_execute () :" << endmsg ;
191 return StatusCode::FAILURE;
192 }
193 catch (...) {
194 *m_log << MSG::ERROR << " Unknown exception "
195 << " caught from sub-algorithm::CBNT_execute () :" << endmsg ;
196 return StatusCode::FAILURE;
197 }
198
199 return sc;
200}
static Double_t sc
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
virtual StatusCode CBNT_execute()
MsgStream * m_log
virtual StatusCode pre_execute()
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ 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 CBNT_TBRecBase::finalize ( )
overridevirtualinherited

Definition at line 203 of file CBNT_TBRecBase.cxx.

203 {
204
206
207 //now subalgorithm finalisation
208 try {
209 sc = this->CBNT_finalize();
210 }
211 catch( const std::exception& Exception ) {
212 *m_log << MSG::ERROR << " Standard exception "
213 << Exception.what()
214 << " caught from sub-algorithm::CBNT_finalize () :" << endmsg ;
215 }
216 catch (...) {
217 *m_log << MSG::ERROR << " Unknown exception "
218 << " caught from sub-algorithm::CBNT_finalize () :" << endmsg ;
219 }
220
221 return sc;
222}
virtual StatusCode CBNT_finalize()

◆ initialize()

StatusCode CBNT_TBRecBase::initialize ( )
overridevirtualinherited

Definition at line 20 of file CBNT_TBRecBase.cxx.

20 {
21 m_log=new MsgStream(msgSvc(), name());
22
23 *m_log << MSG::DEBUG << "Initializing CBNT_TBRecBase base class" << endmsg;
24
25 const CaloCell_ID* idHelper = nullptr;
26 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
27 m_emId=idHelper->em_idHelper();
28 m_fcalId=idHelper->fcal_idHelper();
29 m_hecId=idHelper->hec_idHelper();
30
31
32 if (!m_emId) {
33 (*m_log) << MSG::ERROR << "Could not access lar EM ID helper" << endmsg;
34 return StatusCode::FAILURE;
35 }
36 if (!m_fcalId) {
37 (*m_log) << MSG::ERROR << "Could not access lar FCAL ID helper" << endmsg;
38 return StatusCode::FAILURE;
39 }
40 if (!m_hecId) {
41 (*m_log) << MSG::ERROR << "Could not access lar HEC ID helper" << endmsg;
42 return StatusCode::FAILURE;
43 }
44
45 StatusCode sc = detStore()->retrieve(m_onlineId, "LArOnlineID");
46 if (sc.isFailure()) {
47 (*m_log) << MSG::ERROR << "Could not get LArOnlineID helper !" << endmsg;
48 return StatusCode::FAILURE;
49 }
50 else {
51 (*m_log) << MSG::DEBUG << " Found the LArOnlineID helper. " << endmsg;
52 }
53
54
55 m_initialized=true;
56 return StatusCode::SUCCESS;
57}
const LArOnlineID * m_onlineId
const LArFCAL_ID * m_fcalId
const LArHEC_ID * m_hecId
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.

◆ pre_execute()

StatusCode CBNT_TBRecBase::pre_execute ( )
virtualinherited

Definition at line 59 of file CBNT_TBRecBase.cxx.

59 {
60
62
63 if(!m_initialized) {
64
65 if (m_ntpath.size()==0 || m_ntTitle.size()==0) {
66 *m_log << MSG::ERROR << "Need to set variable 'm_ntpath' and 'm_ntTitle' in constructor of deriving class!" << endmsg;
67 return StatusCode::FAILURE;
68 }
69
70 size_t i=m_ntpath.rfind('/');
71 if (i==std::string::npos) {
72 *m_log << MSG::ERROR << "Expected at least on '/' in path " << m_ntpath << endmsg;
73 return StatusCode::FAILURE;
74 }
75 std::string basepath(m_ntpath.begin(),m_ntpath.begin()+i);
76 //std::cout << "Basepath" << basepath << std::endl;
77
78 // retrieve pointer to THistSvc
79 ServiceHandle<ITHistSvc> tHistSvc("THistSvc", name());
80 ATH_CHECK( tHistSvc.retrieve() );
81
82 // get TTree
83 sc = tHistSvc->getTree(m_ntpath,m_nt);
84 if (sc.isFailure()) {
85 *m_log << MSG::ERROR << "Unable to retrieve TTree : " << m_ntpath << endmsg;
86 return sc;
87 }
88 /*
89 NTupleFilePtr file1(ntupleSvc(),basepath);
90 if (!file1){
91 (*m_log) << MSG::ERROR << "Could not get NTupleFilePtr with path " << basepath << " failed" << endmsg;
92 return StatusCode::FAILURE;
93 }
94 NTuplePtr nt(ntupleSvc(),m_ntpath);
95 if (!nt) {
96 nt=ntupleSvc()->book(m_ntpath,CLID_ColumnWiseTuple,m_ntTitle);
97 }
98 if (!nt){
99 (*m_log) << MSG::ERROR << "Booking of NTuple at "<< m_ntpath << " and name " << m_ntTitle << " failed" << endmsg;
100 return StatusCode::FAILURE;
101 }
102 m_nt=nt;
103 */
104 //std::cout << "Ntuple ptr:" << m_nt << std::endl;
105
106 // subalgorithm initialisation
107 try {
108 sc = this->CBNT_initialize();
109 }
110 catch( const std::exception& Exception ) {
111 *m_log << MSG::ERROR << " Standard exception "
112 << Exception.what()
113 << " caught from sub-algorithm::CBNT_initialize () :" << endmsg ;
114 }
115 catch (...) {
116 *m_log << MSG::ERROR << " Unknown exception "
117 << " caught from sub-algorithm::CBNT_initialize () :" << endmsg ;
118 }
119
120 if (sc.isFailure())
121 {
122 *m_log << MSG::ERROR << "CBNT_initialize() failed" << endmsg;
123 return sc;
124 }
125
126 m_initialized=true;
127 }
128
129 // clear data members
130 try {
131 sc = this->CBNT_clear();
132 }
133 catch( const std::exception& Exception ) {
134 *m_log << MSG::ERROR << " Standard exception "
135 << Exception.what()
136 << " caught from sub-algorithm::CBNT_clear () :" << endmsg ;
137 }
138 catch (...) {
139 *m_log << MSG::ERROR << " Unknown exception "
140 << " caught from sub-algorithm::CBNT_clear () :" << endmsg ;
141 }
142
143 if (sc.isFailure()) {
144 *m_log << MSG::ERROR << "CBNT_clear() failed" << endmsg;
145 return sc;
146 }
147
148 return StatusCode::SUCCESS ;
149}
std::string m_ntTitle
virtual StatusCode CBNT_clear()
std::string m_ntpath
virtual StatusCode CBNT_initialize()

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

◆ setupLookupTables()

StatusCode CBNT_Timing::setupLookupTables ( )
private

internal helpers

Definition at line 328 of file CBNT_Timing.cxx.

328 {
329
330 // fill slot and febName lookup table for EM barrel online
331 m_slotToFebNameLookup[1]="Presampler";
332 m_slotToFebNameLookup[2]="Front 0";
333 m_slotToFebNameLookup[3]="Front 1";
334 m_slotToFebNameLookup[4]="Front 2";
335 m_slotToFebNameLookup[5]="Front 3";
336 m_slotToFebNameLookup[6]="Front 4";
337 m_slotToFebNameLookup[7]="Front 5";
338 m_slotToFebNameLookup[8]="Front 6";
339 m_slotToFebNameLookup[9]="Back 0";
340 m_slotToFebNameLookup[10]="Back 1";
341 m_slotToFebNameLookup[11]="Middle 0";
342 m_slotToFebNameLookup[12]="Middle 1";
343 m_slotToFebNameLookup[13]="Middle 2";
344 m_slotToFebNameLookup[14]="Middle 3";
345
346 // fill calo names lookup tables
351
356
357 // fill sampling names lookup table
358 m_samplingToNameLookup[CaloSampling::PreSamplerB] = "PreSamplerB"; // electromagnetic barrel
359 m_samplingToNameLookup[CaloSampling::EMB1] = "EMB1";
360 m_samplingToNameLookup[CaloSampling::EMB2] = "EMB2";
361 m_samplingToNameLookup[CaloSampling::EMB3] = "EMB3";
362 m_samplingToNameLookup[CaloSampling::PreSamplerE] = "PreSamplerE"; // electromagnetic endcap
363 m_samplingToNameLookup[CaloSampling::EME1] = "EME1";
364 m_samplingToNameLookup[CaloSampling::EME2] = "EME2";
365 m_samplingToNameLookup[CaloSampling::EME3] = "EME3";
366 m_samplingToNameLookup[CaloSampling::HEC0] = "HEC0"; // hadronic endcap
367 m_samplingToNameLookup[CaloSampling::HEC1] = "HEC1";
368 m_samplingToNameLookup[CaloSampling::HEC2] = "HEC2";
369 m_samplingToNameLookup[CaloSampling::HEC3] = "HEC3";
370 m_samplingToNameLookup[CaloSampling::TileBar0] = "TileBar0"; // tile barrel
371 m_samplingToNameLookup[CaloSampling::TileBar1] = "TileBar1";
372 m_samplingToNameLookup[CaloSampling::TileBar2] = "TileBar2";
373 m_samplingToNameLookup[CaloSampling::TileGap1] = "TileGap1"; // tile gap scintillators
374 m_samplingToNameLookup[CaloSampling::TileGap2] = "TileGap2";
375 m_samplingToNameLookup[CaloSampling::TileGap3] = "TileGap3";
376 m_samplingToNameLookup[CaloSampling::TileExt0] = "TileExt0"; // tile extended barrel
377 m_samplingToNameLookup[CaloSampling::TileExt1] = "TileExt1";
378 m_samplingToNameLookup[CaloSampling::TileExt2] = "TileExt2";
379 m_samplingToNameLookup[CaloSampling::FCAL0] = "FCal1"; // fcal
380 m_samplingToNameLookup[CaloSampling::FCAL1] = "FCal2";
381 m_samplingToNameLookup[CaloSampling::FCAL2] = "FCal3";
382 m_samplingToNameLookup[CaloSampling::Unknown] = "unknown";
383
384 m_samplingFromNameLookup["PreSamplerB"] = CaloSampling::PreSamplerB; // electromagnetic barrel
385 m_samplingFromNameLookup["EMB1"] = CaloSampling::EMB1;
386 m_samplingFromNameLookup["EMB2"] = CaloSampling::EMB2;
387 m_samplingFromNameLookup["EMB3"] = CaloSampling::EMB3;
388 m_samplingFromNameLookup["PreSamplerE"] = CaloSampling::PreSamplerE; // electromagnetic endcap
389 m_samplingFromNameLookup["EME1"] = CaloSampling::EME1;
390 m_samplingFromNameLookup["EME2"] = CaloSampling::EME2;
391 m_samplingFromNameLookup["EME3"] = CaloSampling::EME3;
392 m_samplingFromNameLookup["HEC0"] = CaloSampling::HEC0; // hadronic endcap
393 m_samplingFromNameLookup["HEC1"] = CaloSampling::HEC1;
394 m_samplingFromNameLookup["HEC2"] = CaloSampling::HEC2;
395 m_samplingFromNameLookup["HEC3"] = CaloSampling::HEC3;
396 m_samplingFromNameLookup["TileBar0"] = CaloSampling::TileBar0; // tile barrel
397 m_samplingFromNameLookup["TileBar1"] = CaloSampling::TileBar1;
398 m_samplingFromNameLookup["TileBar2"] = CaloSampling::TileBar2;
399 m_samplingFromNameLookup["TileGap1"] = CaloSampling::TileGap1; // tile gap scintillators
400 m_samplingFromNameLookup["TileGap2"] = CaloSampling::TileGap2;
401 m_samplingFromNameLookup["TileGap3"] = CaloSampling::TileGap3;
402 m_samplingFromNameLookup["TileExt0"] = CaloSampling::TileExt0; // tile extended barrel
403 m_samplingFromNameLookup["TileExt1"] = CaloSampling::TileExt1;
404 m_samplingFromNameLookup["TileExt2"] = CaloSampling::TileExt2;
405 m_samplingFromNameLookup["FCal1"] = CaloSampling::FCAL0; // fcal
406 m_samplingFromNameLookup["FCal2"] = CaloSampling::FCAL1;
407 m_samplingFromNameLookup["FCal3"] = CaloSampling::FCAL2;
408 m_samplingFromNameLookup["unknown"] = CaloSampling::Unknown;
409
410 // fill calo lookup table
411 m_caloLookup[CaloSampling::PreSamplerB] = CaloCell_ID::LAREM;
412 m_caloLookup[CaloSampling::EMB1] = CaloCell_ID::LAREM;
413 m_caloLookup[CaloSampling::EMB2] = CaloCell_ID::LAREM;
414 m_caloLookup[CaloSampling::EMB3] = CaloCell_ID::LAREM;
415 m_caloLookup[CaloSampling::PreSamplerE] = CaloCell_ID::LAREM;
416 m_caloLookup[CaloSampling::EME1] = CaloCell_ID::LAREM;
417 m_caloLookup[CaloSampling::EME2] = CaloCell_ID::LAREM;
418 m_caloLookup[CaloSampling::EME3] = CaloCell_ID::LAREM;
419 m_caloLookup[CaloSampling::HEC0] = CaloCell_ID::LARHEC;
420 m_caloLookup[CaloSampling::HEC1] = CaloCell_ID::LARHEC;
421 m_caloLookup[CaloSampling::HEC2] = CaloCell_ID::LARHEC;
422 m_caloLookup[CaloSampling::HEC3] = CaloCell_ID::LARHEC;
423 m_caloLookup[CaloSampling::TileBar0] = CaloCell_ID::TILE;
424 m_caloLookup[CaloSampling::TileBar1] = CaloCell_ID::TILE;
425 m_caloLookup[CaloSampling::TileBar2] = CaloCell_ID::TILE;
426 m_caloLookup[CaloSampling::TileGap1] = CaloCell_ID::TILE;
427 m_caloLookup[CaloSampling::TileGap2] = CaloCell_ID::TILE;
428 m_caloLookup[CaloSampling::TileGap3] = CaloCell_ID::TILE;
429 m_caloLookup[CaloSampling::TileExt0] = CaloCell_ID::TILE;
430 m_caloLookup[CaloSampling::TileExt1] = CaloCell_ID::TILE;
431 m_caloLookup[CaloSampling::TileExt2] = CaloCell_ID::TILE;
432 m_caloLookup[CaloSampling::FCAL0] = CaloCell_ID::LARFCAL;
433 m_caloLookup[CaloSampling::FCAL1] = CaloCell_ID::LARFCAL;
434 m_caloLookup[CaloSampling::FCAL2] = CaloCell_ID::LARFCAL;
435
436 return StatusCode::SUCCESS;
437}
std::map< std::string, CaloCell_ID::SUBCALO > m_caloFromNameLookup
Definition CBNT_Timing.h:60
std::map< int, std::string > m_slotToFebNameLookup
Definition CBNT_Timing.h:58

◆ 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_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_cablingKey

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

Definition at line 40 of file CBNT_Timing.h.

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

◆ m_caloCellName

Gaudi::Property<std::string> CBNT_Timing::m_caloCellName {this, "CellContainerName", "AllCalo", "SG key of CaloCellContainer"}
private

Definition at line 48 of file CBNT_Timing.h.

48{this, "CellContainerName", "AllCalo", "SG key of CaloCellContainer"};

◆ m_caloFromNameLookup

std::map<std::string, CaloCell_ID::SUBCALO> CBNT_Timing::m_caloFromNameLookup
private

Definition at line 60 of file CBNT_Timing.h.

◆ m_caloLookup

std::map<CaloSampling::CaloSample, CaloCell_ID::SUBCALO> CBNT_Timing::m_caloLookup
private

Definition at line 63 of file CBNT_Timing.h.

◆ m_calosAndSamplings

std::map< CaloCell_ID::SUBCALO, std::vector<CaloSampling::CaloSample> > CBNT_Timing::m_calosAndSamplings
private

Definition at line 53 of file CBNT_Timing.h.

◆ m_caloToNameLookup

std::map<CaloCell_ID::SUBCALO, std::string> CBNT_Timing::m_caloToNameLookup
private

Definition at line 59 of file CBNT_Timing.h.

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

const LArEM_ID* CBNT_TBRecBase::m_emId {nullptr}
protectedinherited

Definition at line 65 of file CBNT_TBRecBase.h.

65{nullptr};

◆ m_energy

float CBNT_Timing::m_energy {0}
private

Definition at line 80 of file CBNT_Timing.h.

80{0}, m_time{0}, m_tdc_phase{0}; // time = calculated cell time (cubic), clock = phase (TBRec)

◆ m_energy_cell

std::vector<float>* CBNT_Timing::m_energy_cell {nullptr}
private

Definition at line 68 of file CBNT_Timing.h.

68{nullptr}, *m_time_cell{nullptr};

◆ m_energy_cut

Gaudi::Property<double> CBNT_Timing::m_energy_cut {this, "EnergyCut", 2.*CLHEP::GeV, "Cell energy cut"}
private

Definition at line 43 of file CBNT_Timing.h.

43{this, "EnergyCut", 2.*CLHEP::GeV, "Cell energy cut"};

◆ m_eta_cell

std::vector<long> * CBNT_Timing::m_eta_cell {nullptr}
private

Definition at line 67 of file CBNT_Timing.h.

67{nullptr}, *m_eta_cell{nullptr}, *m_phi_cell{nullptr}, *m_febId_cell{nullptr};

◆ 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* CBNT_TBRecBase::m_fcalId {nullptr}
protectedinherited

Definition at line 67 of file CBNT_TBRecBase.h.

67{nullptr};

◆ m_febId_cell

std::vector<long> * CBNT_Timing::m_febId_cell {nullptr}
private

Definition at line 67 of file CBNT_Timing.h.

67{nullptr}, *m_eta_cell{nullptr}, *m_phi_cell{nullptr}, *m_febId_cell{nullptr};

◆ m_febId_feb

std::vector<long>* CBNT_Timing::m_febId_feb {nullptr}
private

Definition at line 74 of file CBNT_Timing.h.

74{nullptr};

◆ m_febIDs

std::vector<HWIdentifier> CBNT_Timing::m_febIDs
private

Definition at line 54 of file CBNT_Timing.h.

◆ m_feedthrough_feb

std::vector<long>* CBNT_Timing::m_feedthrough_feb {nullptr}
private

Definition at line 77 of file CBNT_Timing.h.

77{nullptr};

◆ m_first_event

bool CBNT_Timing::m_first_event {true}
private

Definition at line 44 of file CBNT_Timing.h.

44{true};

◆ m_hecId

const LArHEC_ID* CBNT_TBRecBase::m_hecId {nullptr}
protectedinherited

Definition at line 66 of file CBNT_TBRecBase.h.

66{nullptr};

◆ m_initialized

bool CBNT_TBRecBase::m_initialized {false}
privateinherited

Definition at line 40 of file CBNT_TBRecBase.h.

40{false};

◆ m_layer_cell

std::vector<long>* CBNT_Timing::m_layer_cell {nullptr}
private

Definition at line 67 of file CBNT_Timing.h.

67{nullptr}, *m_eta_cell{nullptr}, *m_phi_cell{nullptr}, *m_febId_cell{nullptr};

◆ m_layer_layer

std::vector<long>* CBNT_Timing::m_layer_layer {nullptr}
private

Definition at line 71 of file CBNT_Timing.h.

71{nullptr};

◆ m_log

MsgStream* CBNT_TBRecBase::m_log {nullptr}
protectedinherited

Definition at line 63 of file CBNT_TBRecBase.h.

63{nullptr};

◆ m_nt

TTree* CBNT_TBRecBase::m_nt {nullptr}
protectedinherited

Definition at line 61 of file CBNT_TBRecBase.h.

61{nullptr};

◆ m_ntpath

std::string CBNT_TBRecBase::m_ntpath
protectedinherited

Definition at line 58 of file CBNT_TBRecBase.h.

◆ m_ntTitle

std::string CBNT_TBRecBase::m_ntTitle
protectedinherited

Definition at line 58 of file CBNT_TBRecBase.h.

◆ m_onlineHelper

const LArOnlineID* CBNT_Timing::m_onlineHelper {nullptr}
private

Definition at line 41 of file CBNT_Timing.h.

41{nullptr};

◆ m_onlineId

const LArOnlineID* CBNT_TBRecBase::m_onlineId {nullptr}
protectedinherited

Definition at line 68 of file CBNT_TBRecBase.h.

68{nullptr};

◆ m_phi_cell

std::vector<long> * CBNT_Timing::m_phi_cell {nullptr}
private

Definition at line 67 of file CBNT_Timing.h.

67{nullptr}, *m_eta_cell{nullptr}, *m_phi_cell{nullptr}, *m_febId_cell{nullptr};

◆ m_sampling_names

Gaudi::Property<std::vector<std::string> > CBNT_Timing::m_sampling_names {this, "IncludedSamplings", {}, "Names of included calorimeter samplings"}
private

Definition at line 47 of file CBNT_Timing.h.

47{this, "IncludedSamplings", {}, "Names of included calorimeter samplings"};

◆ m_samplingFromNameLookup

std::map<std::string, CaloSampling::CaloSample> CBNT_Timing::m_samplingFromNameLookup
private

Definition at line 62 of file CBNT_Timing.h.

◆ m_samplingIndices

std::vector<CaloSampling::CaloSample> CBNT_Timing::m_samplingIndices
private

stores

Definition at line 52 of file CBNT_Timing.h.

◆ m_samplingToNameLookup

std::map<CaloSampling::CaloSample, std::string> CBNT_Timing::m_samplingToNameLookup
private

Definition at line 61 of file CBNT_Timing.h.

◆ m_slot_feb

std::vector<long>* CBNT_Timing::m_slot_feb {nullptr}
private

Definition at line 76 of file CBNT_Timing.h.

76{nullptr};

◆ m_slotToFebNameLookup

std::map<int, std::string> CBNT_Timing::m_slotToFebNameLookup
private

Definition at line 58 of file CBNT_Timing.h.

◆ m_tbphase

Gaudi::Property<std::string> CBNT_Timing::m_tbphase {this, "TBPhase", "TBPhase", "SG key of TBPhase"}
private

Definition at line 46 of file CBNT_Timing.h.

46{this, "TBPhase", "TBPhase", "SG key of TBPhase"};

◆ m_tdc_phase

float CBNT_Timing::m_tdc_phase {0}
private

Definition at line 80 of file CBNT_Timing.h.

80{0}, m_time{0}, m_tdc_phase{0}; // time = calculated cell time (cubic), clock = phase (TBRec)

◆ m_time

float CBNT_Timing::m_time {0}
private

Definition at line 80 of file CBNT_Timing.h.

80{0}, m_time{0}, m_tdc_phase{0}; // time = calculated cell time (cubic), clock = phase (TBRec)

◆ m_time_cell

std::vector<float> * CBNT_Timing::m_time_cell {nullptr}
private

Definition at line 68 of file CBNT_Timing.h.

68{nullptr}, *m_time_cell{nullptr};

◆ m_time_feb

std::vector<float>* CBNT_Timing::m_time_feb {nullptr}
private

Definition at line 75 of file CBNT_Timing.h.

75{nullptr};

◆ m_time_layer

std::vector<float>* CBNT_Timing::m_time_layer {nullptr}
private

Definition at line 70 of file CBNT_Timing.h.

70{nullptr};

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

◆ NOENERGY

const int CBNT_Timing::NOENERGY = -999
staticprivate

Definition at line 38 of file CBNT_Timing.h.

◆ NOTIME

const int CBNT_Timing::NOTIME = -999
staticprivate

Definition at line 37 of file CBNT_Timing.h.


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