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

#include <LArAutoCorrTotalCondAlg.h>

Inheritance diagram for LArAutoCorrTotalCondAlg:

Public Member Functions

virtual ~LArAutoCorrTotalCondAlg () override
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual bool isReEntrant () const override
 Avoid scheduling algorithm multiple times.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

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

SG::ReadCondHandleKey< LArADC2MeVm_LArADC2MeVObjKey {this,"LArADC2MeVObjKey","LArADC2MeV","SG key of the resulting LArADC2MeV object"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_LArOnOffIdMappingObjKey {this,"LArOnOffIdMappingObjKey","LArOnOffIdMap","SG key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< ILArShapem_LArShapeObjKey {this,"LArShapeObjKey", "LArShapeSym","Key to read LArShape object"}
SG::ReadCondHandleKey< ILArAutoCorrm_LArAutoCorrObjKey {this,"LArAutoCorrObjKey", "LArAutoCorrSym","Key to read LArAutoCorr object"}
SG::ReadCondHandleKey< ILArNoisem_LArNoiseObjKey {this,"LArNoiseObjKey", "LArNoiseSym", "Key to read LArNoise object"}
SG::ReadCondHandleKey< ILArPedestalm_LArPedestalObjKey {this,"LArPedestalObjKey", "LArPedestal","Key to read LArPedestal object"}
SG::ReadCondHandleKey< ILArfSamplm_LArfSamplObjKey {this,"LArfSamplObjKey", "LArfSamplSym","Key to read LArfSampl object"}
SG::ReadCondHandleKey< ILArMinBiasm_LArMinBiasObjKey {this,"LArMinBiasObjKey","LArMinBiasSym","Key to read LArMinBias object"}
SG::WriteCondHandleKey< LArAutoCorrTotalm_LArAutoCorrTotalObjKey {this,"LArAutoCorrTotalObjKey","LArAutoCorrTotal","Key to write LArAutoCorrTotal object"}
Gaudi::Property< bool > m_NoPile {this,"NoPileUp",false}
Gaudi::Property< bool > m_isMC {this,"isMC",true}
Gaudi::Property< bool > m_isSuperCell {this,"isSuperCell",false}
Gaudi::Property< int > m_Nsamples {this,"Nsamples",5, "Max number of samples to use"}
Gaudi::Property< unsigned int > m_firstSample {this,"firstSample",0,"First sample to use for in-time event on the full pulse shape"}
Gaudi::Property< int > m_deltaBunch {this,"deltaBunch",1,"Delta between filled bunches in 25 ns units"}
Gaudi::Property< unsigned > m_nGains {this,"NGains",3,"Expected number of gains"}
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 26 of file LArAutoCorrTotalCondAlg.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

◆ ~LArAutoCorrTotalCondAlg()

LArAutoCorrTotalCondAlg::~LArAutoCorrTotalCondAlg ( )
overridevirtual

Definition at line 16 of file LArAutoCorrTotalCondAlg.cxx.

16{}

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

62{
63 return 0;
64}

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

Definition at line 43 of file LArAutoCorrTotalCondAlg.cxx.

43 {
44
45 // WriteHandle setup
46 SG::WriteCondHandle<LArAutoCorrTotal> writeHandle(m_LArAutoCorrTotalObjKey, ctx);
47 // So the following should not be called usually?!
48 if (writeHandle.isValid()) {
50 "CondHandle "
51 << writeHandle.fullKey() << " is already valid.");
52 return StatusCode::SUCCESS;
53 }
54
55 // Identifier helper
56 const LArOnlineID_Base *larOnlineID = nullptr;
57 if (m_isSuperCell) {
58 const LArOnline_SuperCellID *scidhelper;
59 ATH_CHECK(detStore()->retrieve(scidhelper, "LArOnline_SuperCellID"));
60 larOnlineID = scidhelper; // cast to base-class
61 } else { // regular cells
62 const LArOnlineID *idhelper;
63 ATH_CHECK(detStore()->retrieve(idhelper, "LArOnlineID"));
64 larOnlineID = idhelper; // cast to base-class
65 }
66 // Mapping helper
67 const LArOnOffIdMapping *larOnOffIdMapping = nullptr;
68 SG::ReadCondHandle<LArOnOffIdMapping> larOnOffIdMappingHdl{
70 };
71 larOnOffIdMapping = *larOnOffIdMappingHdl;
72 if (larOnOffIdMapping == nullptr) {
73 ATH_MSG_ERROR("Failed to retrieve LArOnOffIdMapping object");
74 }
75
76 // Get pointers to inputs
77 SG::ReadCondHandle<ILArShape> ShapeHdl{ m_LArShapeObjKey, ctx };
78 // FIXME: should check if handle is properly created and/or check if handle is
79 // properly retrieved
80 // operator star of a ReadCondHandle returns a const pointer to type T
81 const ILArShape *larShape{ *ShapeHdl };
82 writeHandle.addDependency(ShapeHdl);
83
84 SG::ReadCondHandle<ILArAutoCorr> AutoCorrHdl{ m_LArAutoCorrObjKey, ctx };
85 const ILArAutoCorr *larAutoCorr{ *AutoCorrHdl };
86 writeHandle.addDependency(AutoCorrHdl);
87
88 SG::ReadCondHandle<LArADC2MeV> ADC2MeVHdl{ m_LArADC2MeVObjKey, ctx };
89 const LArADC2MeV *larADC2MeV = nullptr;
90 larADC2MeV = *ADC2MeVHdl;
91 if (larADC2MeV == nullptr) {
92 ATH_MSG_ERROR("Failed to retrieve LArADC2MeV object");
93 return StatusCode::FAILURE;
94 }
95 writeHandle.addDependency(ADC2MeVHdl);
96
97 // Consider the determinstic objects
98 // checking isMC and NoPile again seems very clumsy. How to check if key has
99 // already been initialized?
100 const ILArNoise *larNoise = nullptr;
101 const ILArPedestal *larPedestal = nullptr;
102 const ILArfSampl *larfSampl = nullptr;
103 const ILArMinBias *larMinBias = nullptr;
104
105 if (!m_NoPile) {
106 if (m_isMC) {
107 SG::ReadCondHandle<ILArNoise> NoiseHdl{ m_LArNoiseObjKey, ctx };
108 larNoise = *NoiseHdl;
109 writeHandle.addDependency(NoiseHdl);
110 } else {
111 SG::ReadCondHandle<ILArPedestal> PedestalHdl{ m_LArPedestalObjKey, ctx };
112 larPedestal = *PedestalHdl;
113 writeHandle.addDependency(PedestalHdl);
114 }
115
116 SG::ReadCondHandle<ILArfSampl> fSamplHdl{ m_LArfSamplObjKey, ctx };
117 larfSampl = *fSamplHdl;
118 writeHandle.addDependency(fSamplHdl);
119
120 SG::ReadCondHandle<ILArMinBias> MinBiasHdl{ m_LArMinBiasObjKey, ctx };
121 larMinBias = *MinBiasHdl;
122 writeHandle.addDependency(MinBiasHdl);
123 }
124
125 ATH_MSG_INFO("IOV found from intersection for AutoCorrTotal object: "
126 << writeHandle.getRange());
127
128 // make output object
129 // dimensions: number of gains x number of channel IDs x elements of
130 // AutoCorrTotal
131 std::unique_ptr<LArAutoCorrTotal> larAutoCorrTotal =
132 std::make_unique<LArAutoCorrTotal>(larOnlineID, larOnOffIdMapping, m_nGains);
133
134 int count = 0;
135 int count2 = 0;
136 int count3 =0;
137
138 for (const HWIdentifier chid : larOnlineID->channel_range()) {
139 count++;
140 const IdentifierHash hid = larOnlineID->channel_Hash(chid);
141 // const unsigned int id32 = chid.get_identifier32().get_compact();
142
143 if (larOnOffIdMapping->isOnlineConnected(chid)) {
144 count2++;
145
146 for (size_t igain = 0; igain < m_nGains; igain++) {
147 const ILArShape::ShapeRef_t Shape = larShape->Shape(chid, igain);
148 const int nsamples_shape = static_cast<int>(Shape.size());
149
151 larAutoCorr->autoCorr(chid, igain);
152
153 if (AC.size() == 0) {
154 ATH_MSG_INFO("No ElecCalib AC for channel " << larOnlineID->channel_name(chid) << ", gain "<<igain << ". Skip.");
155 continue;
156 }
157
158 count3++;
159 int nsamples_AC_OFC = AC.size() + 1;
160
161 if (nsamples_AC_OFC > m_Nsamples) {
162 nsamples_AC_OFC = m_Nsamples;
163 }
164
165 // fix HEC first sample +1 if the firstSample is 0 and nsamples 4
166 unsigned int ihecshift = 0;
167 if (larOnlineID->isHECchannel(chid) && nsamples_AC_OFC == 4 &&
168 m_firstSample == 0) {
169 ihecshift = 1;
170 // ATH_MSG_DEBUG( "Using firstSample +1 for HEC ChID 0x" << MSG::hex
171 // << id << MSG::dec );
172 }
173
174 //:::::::::::::::::::::::::::::::
175 // NB:
176 // nsamples_shape = number of samples of the Shape function (e.g 32)
177 // nsamples_AC_OFC = size of AC matrix & OFC vector (e.g 5 in Atlas)
178 //:::::::::::::::::::::::::::::::
179 float fSigma2 = 0.;
180 if (!m_NoPile) {
181 float SigmaNoise;
182 if (m_isMC)
183 SigmaNoise = larNoise->noise(chid, igain);
184 else {
185 float RMSpedestal = larPedestal->pedestalRMS(chid, igain);
186 if (RMSpedestal > (1.0 + LArElecCalib::ERRORCODE))
187 SigmaNoise = RMSpedestal;
188 else
189 SigmaNoise = 0.; //(we will have the ERROR message below)
190 }
191 float fSampl = larfSampl->FSAMPL(chid);
192 float MinBiasRMS = larMinBias->minBiasRMS(chid);
193 if (fSampl != 0)
194 MinBiasRMS /= fSampl;
195 const auto polynom_adc2mev =
196 larADC2MeV->ADC2MEV(hid, igain);
197 float Adc2MeV = 0.;
198 if (polynom_adc2mev.size() > 0) {
199 Adc2MeV = (polynom_adc2mev)[1];
200 }
201 if (SigmaNoise != 0 && Adc2MeV != 0)
202 fSigma2 = pow(MinBiasRMS / (SigmaNoise * Adc2MeV), 2);
203
204 if (fSampl == 0 || SigmaNoise == 0 || Adc2MeV == 0) {
205 if (m_isMC) {
206 ATH_MSG_ERROR(larOnlineID->show_to_string(
207 larOnOffIdMapping->cnvToIdentifier(chid))
208 << "fSampl (" << fSampl << "), SigmaNoise ("
209 << SigmaNoise << ") or Adc2MeV (" << Adc2MeV
210 << ") null "
211 << "=> AutoCorrTotal = only AutoCorr elect. part ");
212 }
213 fSigma2 = 0.;
214 }
215 ATH_MSG_DEBUG(chid.get_identifier32().get_compact()
216 << ") fSampl (" << fSampl << ") "
217 << ") SigmaNoise (" << SigmaNoise << ") "
218 << ") Adc2MeV (" << Adc2MeV << ") "
219
220 );
221
222 // warning: MinBiasRMS is in MeV (at the scale of the hits)
223 // SigmaNoise is in ADC counts
224 // so MinBiasRMS/fScale and SigmaNoise*Adc2MeV are the same scale
225 // (MeV at the scale of the cells)
226 } // end if m_NoPile
227
228 // get in vTerms all the possible non trivial N(N-1)/2 terms of the
229 // autocorrelation matrix
230 int nsize_tot = (nsamples_AC_OFC - 1) * (nsamples_AC_OFC) / 2;
231
232 ATH_MSG_DEBUG(chid.get_identifier32().get_compact()
233 << ") fSigma2 (" << fSigma2 << ") "
234 << ") nsamples_AC_OFC ( " << nsamples_AC_OFC);
235 std::vector<float> vTerms;
236
237 vTerms.resize(2 * nsize_tot + nsamples_AC_OFC, 0.);
238 //:::::::::::::::::::::::::::::::
239
240 for (int j1 = 0; j1 < nsamples_AC_OFC - 1; j1++) {
241 for (int j2 = j1 + 1; j2 < nsamples_AC_OFC; j2++) {
242 int l = abs(j2 - j1) - 1;
243 int index =
244 j1 * nsamples_AC_OFC - j1 * (j1 + 1) / 2 + j2 - (j1 + 1);
245 vTerms[index] = AC[l];
246 }
247 }
248
249 ATH_MSG_DEBUG(chid.get_identifier32().get_compact()
250 << ") vTerms[1] (" << vTerms[1] << ") ");
251 // 2nd terms :
252 for (int j1 = 0; j1 < nsamples_AC_OFC - 1; ++j1) {
253 for (int j2 = j1 + 1; j2 < nsamples_AC_OFC; j2++) {
254 int index =
255 j1 * nsamples_AC_OFC - j1 * (j1 + 1) / 2 + j2 - (j1 + 1);
256 float Rij = 0;
257 for (int k = 0; k < nsamples_shape; ++k) {
258 if ((j2 - j1 + k) >= 0 && (j2 - j1 + k) < nsamples_shape) {
259 int ibunch = 0;
260 if ((j1 + m_firstSample + ihecshift - k) % m_deltaBunch == 0)
261 ibunch = 1;
262 Rij += Shape[k] * Shape[j2 - j1 + k] * ibunch;
263 }
264 }
265 vTerms[nsize_tot + index] = fSigma2 * Rij;
266 }
267 }
268 ATH_MSG_DEBUG(chid.get_identifier32().get_compact()
269 << ") vTerms[mid] (" << vTerms[vTerms.size()/2] << ") ");
270
271 // 3rd term : RMS of pileup per samples (multiplied by fSigma2)
272 for (int j1 = 0; j1 < nsamples_AC_OFC; j1++) {
273 float Rms2i = 0;
274 for (int k = 0; k < nsamples_shape; ++k) {
275 int ibunch = 0;
276 if ((j1 + m_firstSample + ihecshift - k) % m_deltaBunch == 0)
277 ibunch = 1;
278 Rms2i += pow(Shape[k], 2) * ibunch;
279 }
280 vTerms[2 * nsize_tot + j1] = fSigma2 * Rms2i;
281 }
282 ATH_MSG_DEBUG(chid.get_identifier32().get_compact()
283 << ") vTerms[last] (" << vTerms[vTerms.size()-1] << ") ");
284
285
286 // storage
287 larAutoCorrTotal->set(hid, igain, vTerms);
288
289 } //(loop on gains)
290
291 } else // unconnected
292 for (unsigned int igain = 0; igain < m_nGains; igain++) {
293 unsigned nsize_tot = (m_Nsamples - 1) * (m_Nsamples) + m_Nsamples;
294 std::vector<float> empty(nsize_tot, 0.);
295 larAutoCorrTotal->set(hid, igain, empty);
296 }
297 }
298
299 ATH_MSG_INFO("LArAutoCorrTotal Ncell " << count);
300 ATH_MSG_INFO("LArAutoCorrTotal Ncell * Ngain " << count3);
301 ATH_MSG_INFO("LArAutoCorrTotal Nconnected " << count2);
302
303 ATH_MSG_INFO("LArAutoCorrTotal record with key" << m_LArAutoCorrTotalObjKey);
304
305 ATH_CHECK(writeHandle.record(std::move(larAutoCorrTotal)));
306
307
308 return StatusCode::SUCCESS;
309}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
static const Attributes_t empty
const ServiceHandle< StoreGateSvc > & detStore() const
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
LArVectorProxy AutoCorrRef_t
virtual AutoCorrRef_t autoCorr(const HWIdentifier &CellID, int gain) const =0
virtual const float & minBiasRMS(const HWIdentifier &id) const =0
access to RMS of E in minimum bias events index by Identifier
virtual const float & noise(const HWIdentifier &id, int gain) const =0
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Definition ILArShape.h:26
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
virtual const float & FSAMPL(const HWIdentifier &id) const =0
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
Definition LArADC2MeV.h:32
SG::WriteCondHandleKey< LArAutoCorrTotal > m_LArAutoCorrTotalObjKey
Gaudi::Property< unsigned > m_nGains
SG::ReadCondHandleKey< LArOnOffIdMapping > m_LArOnOffIdMappingObjKey
SG::ReadCondHandleKey< ILArShape > m_LArShapeObjKey
SG::ReadCondHandleKey< ILArPedestal > m_LArPedestalObjKey
SG::ReadCondHandleKey< ILArMinBias > m_LArMinBiasObjKey
SG::ReadCondHandleKey< ILArAutoCorr > m_LArAutoCorrObjKey
Gaudi::Property< bool > m_isMC
Gaudi::Property< int > m_deltaBunch
SG::ReadCondHandleKey< LArADC2MeV > m_LArADC2MeVObjKey
SG::ReadCondHandleKey< ILArNoise > m_LArNoiseObjKey
SG::ReadCondHandleKey< ILArfSampl > m_LArfSamplObjKey
Gaudi::Property< unsigned int > m_firstSample
Gaudi::Property< bool > m_isSuperCell
Gaudi::Property< bool > m_NoPile
Gaudi::Property< int > m_Nsamples
Identifier cnvToIdentifier(const HWIdentifier &sid) const
create an Identifier from a HWIdentifier (inline)
bool isOnlineConnected(const HWIdentifier &sid) const
Test whether a HWIdentifier is connected of not (inline) .
id_range channel_range() const
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
virtual bool isHECchannel(const HWIdentifier id) const =0
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:148
str index
Definition DeMoScan.py:362
l
Printing final latex table to .tex output file.
constexpr int pow(int x)
Definition conifer.h:27

◆ 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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

88{
89 // If we didn't find any symlinks to add, just return the collection
90 // from the base class. Otherwise, return the extended collection.
91 if (!m_extendedExtraObjects.empty()) {
93 }
95}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode LArAutoCorrTotalCondAlg::initialize ( )
overridevirtual

Definition at line 18 of file LArAutoCorrTotalCondAlg.cxx.

18 {
19 ATH_MSG_DEBUG("initialize " << name());
20
21 // ReadCondHandle initialization
22 ATH_CHECK(m_LArShapeObjKey.initialize());
23 ATH_CHECK(m_LArAutoCorrObjKey.initialize());
25 ATH_CHECK( m_LArADC2MeVObjKey.initialize());
26
28
33
34 // Supercells have only one gain
35 if (m_isSuperCell) {
36 m_nGains = 1;
37 }
38
39 ATH_MSG_DEBUG("settings: m_NoPile " << m_NoPile);
40 return StatusCode::SUCCESS;
41}

◆ 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()

◆ isReEntrant()

virtual bool AthCondAlgorithm::isReEntrant ( ) const
inlineoverridevirtualinherited

Avoid scheduling algorithm multiple times.

With multiple concurrent events, conditions objects often expire simultaneously for all slots. To avoid that the scheduler runs the CondAlg in each slot, we declare it as "non-reentrant". This ensures that the conditions objects are only created once.

In case a particular CondAlg should behave differently, it can override this method again and return true.

See also
ATEAM-836

Definition at line 39 of file AthCondAlgorithm.h.

39{ 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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

75{
76 return BaseAlg::sysExecute (ctx);
77}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

105 {
107
108 if (sc.isFailure()) {
109 return sc;
110 }
111
112 ServiceHandle<ICondSvc> cs("CondSvc",name());
113 for (auto h : outputHandles()) {
114 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
115 // do this inside the loop so we don't create the CondSvc until needed
116 if ( cs.retrieve().isFailure() ) {
117 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
118 return StatusCode::SUCCESS;
119 }
120 if (cs->regHandle(this,*h).isFailure()) {
122 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
123 << " with CondSvc");
124 }
125 }
126 }
127 return sc;
128}
#define ATH_MSG_WARNING(x)
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_deltaBunch

Gaudi::Property<int> LArAutoCorrTotalCondAlg::m_deltaBunch {this,"deltaBunch",1,"Delta between filled bunches in 25 ns units"}
private

Definition at line 56 of file LArAutoCorrTotalCondAlg.h.

56{this,"deltaBunch",1,"Delta between filled bunches in 25 ns units"};

◆ 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_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 AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_firstSample

Gaudi::Property<unsigned int> LArAutoCorrTotalCondAlg::m_firstSample {this,"firstSample",0,"First sample to use for in-time event on the full pulse shape"}
private

Definition at line 55 of file LArAutoCorrTotalCondAlg.h.

55{this,"firstSample",0,"First sample to use for in-time event on the full pulse shape"};

◆ m_isMC

Gaudi::Property<bool> LArAutoCorrTotalCondAlg::m_isMC {this,"isMC",true}
private

Definition at line 52 of file LArAutoCorrTotalCondAlg.h.

52{this,"isMC",true};

◆ m_isSuperCell

Gaudi::Property<bool> LArAutoCorrTotalCondAlg::m_isSuperCell {this,"isSuperCell",false}
private

Definition at line 53 of file LArAutoCorrTotalCondAlg.h.

53{this,"isSuperCell",false};

◆ m_LArADC2MeVObjKey

SG::ReadCondHandleKey<LArADC2MeV> LArAutoCorrTotalCondAlg::m_LArADC2MeVObjKey {this,"LArADC2MeVObjKey","LArADC2MeV","SG key of the resulting LArADC2MeV object"}
private

Definition at line 38 of file LArAutoCorrTotalCondAlg.h.

38{this,"LArADC2MeVObjKey","LArADC2MeV","SG key of the resulting LArADC2MeV object"};

◆ m_LArAutoCorrObjKey

SG::ReadCondHandleKey<ILArAutoCorr> LArAutoCorrTotalCondAlg::m_LArAutoCorrObjKey {this,"LArAutoCorrObjKey", "LArAutoCorrSym","Key to read LArAutoCorr object"}
private

Definition at line 43 of file LArAutoCorrTotalCondAlg.h.

43{this,"LArAutoCorrObjKey", "LArAutoCorrSym","Key to read LArAutoCorr object"};

◆ m_LArAutoCorrTotalObjKey

SG::WriteCondHandleKey<LArAutoCorrTotal> LArAutoCorrTotalCondAlg::m_LArAutoCorrTotalObjKey {this,"LArAutoCorrTotalObjKey","LArAutoCorrTotal","Key to write LArAutoCorrTotal object"}
private

Definition at line 49 of file LArAutoCorrTotalCondAlg.h.

49{this,"LArAutoCorrTotalObjKey","LArAutoCorrTotal","Key to write LArAutoCorrTotal object"};

◆ m_LArfSamplObjKey

SG::ReadCondHandleKey<ILArfSampl> LArAutoCorrTotalCondAlg::m_LArfSamplObjKey {this,"LArfSamplObjKey", "LArfSamplSym","Key to read LArfSampl object"}
private

Definition at line 46 of file LArAutoCorrTotalCondAlg.h.

46{this,"LArfSamplObjKey", "LArfSamplSym","Key to read LArfSampl object"};

◆ m_LArMinBiasObjKey

SG::ReadCondHandleKey<ILArMinBias> LArAutoCorrTotalCondAlg::m_LArMinBiasObjKey {this,"LArMinBiasObjKey","LArMinBiasSym","Key to read LArMinBias object"}
private

Definition at line 47 of file LArAutoCorrTotalCondAlg.h.

47{this,"LArMinBiasObjKey","LArMinBiasSym","Key to read LArMinBias object"};

◆ m_LArNoiseObjKey

SG::ReadCondHandleKey<ILArNoise> LArAutoCorrTotalCondAlg::m_LArNoiseObjKey {this,"LArNoiseObjKey", "LArNoiseSym", "Key to read LArNoise object"}
private

Definition at line 44 of file LArAutoCorrTotalCondAlg.h.

44{this,"LArNoiseObjKey", "LArNoiseSym", "Key to read LArNoise object"};

◆ m_LArOnOffIdMappingObjKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArAutoCorrTotalCondAlg::m_LArOnOffIdMappingObjKey {this,"LArOnOffIdMappingObjKey","LArOnOffIdMap","SG key of LArOnOffIdMapping object"}
private

Definition at line 40 of file LArAutoCorrTotalCondAlg.h.

40{this,"LArOnOffIdMappingObjKey","LArOnOffIdMap","SG key of LArOnOffIdMapping object"};

◆ m_LArPedestalObjKey

SG::ReadCondHandleKey<ILArPedestal> LArAutoCorrTotalCondAlg::m_LArPedestalObjKey {this,"LArPedestalObjKey", "LArPedestal","Key to read LArPedestal object"}
private

Definition at line 45 of file LArAutoCorrTotalCondAlg.h.

45{this,"LArPedestalObjKey", "LArPedestal","Key to read LArPedestal object"};

◆ m_LArShapeObjKey

SG::ReadCondHandleKey<ILArShape> LArAutoCorrTotalCondAlg::m_LArShapeObjKey {this,"LArShapeObjKey", "LArShapeSym","Key to read LArShape object"}
private

Definition at line 42 of file LArAutoCorrTotalCondAlg.h.

42{this,"LArShapeObjKey", "LArShapeSym","Key to read LArShape object"};

◆ m_nGains

Gaudi::Property<unsigned> LArAutoCorrTotalCondAlg::m_nGains {this,"NGains",3,"Expected number of gains"}
private

Definition at line 58 of file LArAutoCorrTotalCondAlg.h.

58{this,"NGains",3,"Expected number of gains"};

◆ m_NoPile

Gaudi::Property<bool> LArAutoCorrTotalCondAlg::m_NoPile {this,"NoPileUp",false}
private

Definition at line 51 of file LArAutoCorrTotalCondAlg.h.

51{this,"NoPileUp",false};

◆ m_Nsamples

Gaudi::Property<int> LArAutoCorrTotalCondAlg::m_Nsamples {this,"Nsamples",5, "Max number of samples to use"}
private

Definition at line 54 of file LArAutoCorrTotalCondAlg.h.

54{this,"Nsamples",5, "Max number of samples to use"};

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