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

#include <LArCalibDigitsAccumulatorFreeGain.h>

Inheritance diagram for LArCalibDigitsAccumulatorFreeGain:
Collaboration diagram for LArCalibDigitsAccumulatorFreeGain:

Classes

class  LArAccumulated
 Class of intermediate accumulations. More...

Public Member Functions

 LArCalibDigitsAccumulatorFreeGain (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected 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< LArCalibLineMappingm_calibMapKey {this,"CalibMapKey","LArCalibLineMap","SG Key of calib line mapping object"}
const LArOnlineIDm_onlineHelper
int m_delay
 Store delay.
bool m_isPulsed
 Set wether a cell is pulsed or not.
std::string m_calibAccuDigitContainerName
 LArAccumulatedCalibDigitContainer name.
std::vector< std::string > m_keylist
 list of key for input digit container (=gain)
unsigned int m_nStepTrigger
 Number of intermediate accumulations (JO property)
double m_delayScale
 Set delay scale.
bool m_keepPulsed
 Tells you wether you keep only pulsed cells or all cells.
std::vector< LArAccumulatedm_AccumulatedHG
 Stores number of triggers per intermediate step.
std::vector< LArAccumulatedm_AccumulatedMG
std::vector< LArAccumulatedm_AccumulatedLG
unsigned int m_event_counter
 Event counter.
DataObjIDColl m_extendedExtraObjects
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 30 of file LArCalibDigitsAccumulatorFreeGain.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArCalibDigitsAccumulatorFreeGain()

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

Definition at line 13 of file LArCalibDigitsAccumulatorFreeGain.cxx.

13 :
14 AthAlgorithm(name, pSvcLocator),
15 m_onlineHelper(nullptr),
16 m_delay(0),
17 m_isPulsed(false),
18 m_calibAccuDigitContainerName("LArAccumulatedCalibDigits"),
20 m_delayScale(1*ns),
21 m_keepPulsed(false)
22{
23 declareProperty("LArAccuCalibDigitContainerName",m_calibAccuDigitContainerName);
24 declareProperty("KeyList",m_keylist);
25 declareProperty("StepOfTriggers",m_nStepTrigger);
26 declareProperty("DelayScale",m_delayScale);
27 declareProperty("KeepOnlyPulsed",m_keepPulsed);
28
29 m_delay=-1;
31}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_isPulsed
Set wether a cell is pulsed or not.
std::string m_calibAccuDigitContainerName
LArAccumulatedCalibDigitContainer name.
std::vector< std::string > m_keylist
list of key for input digit container (=gain)
bool m_keepPulsed
Tells you wether you keep only pulsed cells or all cells.
unsigned int m_nStepTrigger
Number of intermediate accumulations (JO property)

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode LArCalibDigitsAccumulatorFreeGain::execute ( )

Definition at line 56 of file LArCalibDigitsAccumulatorFreeGain.cxx.

57{
58
60
61 if ( m_event_counter < 100 || m_event_counter%100==0 )
62 ATH_MSG_INFO( "Processing event " << m_event_counter );
64
65 SG::ReadCondHandle<LArCalibLineMapping> clHdl{m_calibMapKey};
66 const LArCalibLineMapping *clcabling {*clHdl};
67 if(!clcabling) {
68 ATH_MSG_WARNING( "Do not have calib line mapping !!!" );
69 return StatusCode::FAILURE;
70 }
71
72 // pointer to input container
73 const LArCalibDigitContainer* calibDigitContainer=nullptr;
74
75 // retrieve calibration settings
76 const LArCalibParams* calibParams;
77 sc=detStore()->retrieve(calibParams,"LArCalibParams");
78 if (sc.isFailure())
79 {ATH_MSG_ERROR( "Cannot load LArCalibParams from DetStore." );
80 return StatusCode::FAILURE;
81 }
82
83 unsigned int sizeSteps = (m_nStepTrigger>1 ? (m_nStepTrigger+1):1);
84
85 // retrieve input calibDigits
86
87 //Loop over all containers that are to be processed (e.g. different gains)
88 for (const std::string& key : m_keylist) {
89
90 sc=evtStore()->retrieve(calibDigitContainer,key);
91 if(sc.isFailure()) {
92 ATH_MSG_ERROR( "Can't retrieve LArCalibDigitContainer with key " << key << "from StoreGate." );
93 return StatusCode::SUCCESS;
94 }else{
95 ATH_MSG_DEBUG( "Retrieved LArCalibDigitContainer with key " << key << " from StoreGate." );
96 }
97
98 // Loop over CalibDigitContainer
99
100 if(calibDigitContainer->empty()) {
101 ATH_MSG_DEBUG( "LArCalibDigitContainer with key=" << key << " is empty " );
102 }else{
103 ATH_MSG_DEBUG( "LArCalibDigitContainer with key=" << key << " has size = " << calibDigitContainer->size() );
104 }
105
106 // counter of triggers
107 std::vector<unsigned int> ntrigger, nTriggerPerStep, nStepTrigger, iStepTrigger;
108 // effective number of triggers: per channel
109 ntrigger.resize(calibDigitContainer->size(),0);
110 // asked number of triggers (from calib settings): per FEB
111 nTriggerPerStep.resize(m_onlineHelper->febHashMax(),0);
112 nStepTrigger.resize(m_onlineHelper->febHashMax(),0);
113 iStepTrigger.resize(m_onlineHelper->febHashMax(),0);
114
115 // output container
116 LArAccumulatedCalibDigitContainer* larAccuCalibDigitContainerHG = new LArAccumulatedCalibDigitContainer();
117
118 LArAccumulatedCalibDigitContainer* larAccuCalibDigitContainerMG = new LArAccumulatedCalibDigitContainer();
119
120 LArAccumulatedCalibDigitContainer* larAccuCalibDigitContainerLG = new LArAccumulatedCalibDigitContainer();
121
122 //Loop over all cells
123 for (const LArCalibDigit* digit : *calibDigitContainer) {
124
125 if(m_keepPulsed && !digit->isPulsed()) continue;
126
127 // identificators
128 HWIdentifier chid=digit->hardwareID();
129 const HWIdentifier febid=m_onlineHelper->feb_Id(chid);
130 const IdentifierHash febhash = m_onlineHelper->feb_Hash(febid);
131 const IdentifierHash hashid = m_onlineHelper->channel_Hash(chid);
132
133 // BELOW: DIRTY HACK BECAUSE THERE SEEMS TO BE A BUG IN THE CABLINGSVC CONCERNING THE CALIBLINES.
134
135 // get calibration settings
136 const std::vector<HWIdentifier>& calibLineID=clcabling->calibSlotLine(chid);
137 HWIdentifier calibModuleID;
138 if(!calibLineID.empty()){
139 calibModuleID=m_onlineHelper->calib_module_Id(calibLineID[0]);
140 nTriggerPerStep[febhash] = calibParams->NTrigger(calibModuleID);
141 ATH_MSG_DEBUG( "Ntrigger per step = " << nTriggerPerStep[febhash] );
142 if(nTriggerPerStep[febhash] > 1000) nTriggerPerStep[febhash]=100; // very dirty !!!
143 } else {
144 nTriggerPerStep[febhash] = 100; // very dirty !!
145 }
146
147 // cell is pulsed ?
148 m_isPulsed = digit->isPulsed();
149
150 //First cell to be processed, set delay
151 if (m_delay==-1) {
152 m_delay=digit->delay();
153 } else {
154 // next cells: should be the same delay
155 if (m_delay!=digit->delay()) {
156 ATH_MSG_DEBUG( "Delay is changing to " << digit->delay() << " from " << m_delay << ": book a new LArAccumulatedCalibDigitContainer" );
157 m_delay=digit->delay();
158 }
159 }
160
162 if (gain<0 || gain>CaloGain::LARNGAIN) {
163 ATH_MSG_ERROR( "Found not-matching gain number ("<< (int)gain <<")" );
164 delete larAccuCalibDigitContainerHG;
165 delete larAccuCalibDigitContainerMG;
166 delete larAccuCalibDigitContainerLG;
167 return StatusCode::FAILURE;
168 }
169
170 /***************************** High Gain ***************************/
171 // object to be filled for each cell
172 LArAccumulated& cellAccumulatedHG = m_AccumulatedHG[hashid];
173 if (gain==CaloGain::LARHIGHGAIN) {
174 // trigger counter for each cell
175 cellAccumulatedHG.m_ntrigger++;
176 ATH_MSG_DEBUG( "HG chid = " << chid << ", trigger = " << cellAccumulatedHG.m_ntrigger << ", DAC = " << digit->DAC() );
177 // at first trigger, initialize vectors
178 unsigned int sizeSamples = digit->samples().size();
179 ATH_MSG_DEBUG( "sizeSteps = " << sizeSteps << ", # of samples = " << sizeSamples );
180 if(cellAccumulatedHG.m_ntrigger==1){
181 cellAccumulatedHG.m_sum.clear();
182 cellAccumulatedHG.m_sum2.clear();
183 cellAccumulatedHG.m_sum.resize(sizeSamples,0);
184 cellAccumulatedHG.m_sum2.resize(sizeSamples,0);
185 }
186 for(unsigned int j=0;j<sizeSamples;j++) {
187 cellAccumulatedHG.m_sum[j] += digit->samples()[j];
188 cellAccumulatedHG.m_sum2[j] += digit->samples()[j]*digit->samples()[j];
189 }
190 ATH_MSG_DEBUG( "Sum = " << cellAccumulatedHG.m_sum[2] );
191 ATH_MSG_DEBUG( "Sum2 = " << cellAccumulatedHG.m_sum2[2] );
192 } // end High Gain
193
194 /***************************** Medium Gain ***************************/
195 // object to be filled for each cell
196 LArAccumulated& cellAccumulatedMG = m_AccumulatedMG[hashid];
197 if (gain==CaloGain::LARMEDIUMGAIN) {
198 // trigger counter for each cell
199 cellAccumulatedMG.m_ntrigger++;
200 ATH_MSG_DEBUG( "MG chid = " << chid << ", trigger = " << cellAccumulatedMG.m_ntrigger << ", DAC = " << digit->DAC() );
201 // at first trigger, initialize vectors
202 unsigned int sizeSamples = digit->samples().size();
203 ATH_MSG_DEBUG( "sizeSteps = " << sizeSteps << ", # of samples = " << sizeSamples );
204 if(cellAccumulatedMG.m_ntrigger==1){
205 cellAccumulatedMG.m_sum.clear();
206 cellAccumulatedMG.m_sum2.clear();
207 cellAccumulatedMG.m_sum.resize(sizeSamples,0);
208 cellAccumulatedMG.m_sum2.resize(sizeSamples,0);
209 }
210 for(unsigned int j=0;j<sizeSamples;j++){
211 cellAccumulatedMG.m_sum[j] += digit->samples()[j];
212 cellAccumulatedMG.m_sum2[j] += digit->samples()[j]*digit->samples()[j];
213 }
214 ATH_MSG_DEBUG( "Sum = " << cellAccumulatedMG.m_sum[2] );
215 ATH_MSG_DEBUG( "Sum2 = " << cellAccumulatedMG.m_sum2[2] );
216 } // end High Gain
217
218 /***************************** Low Gain ***************************/
219 // object to be filled for each cell
220 LArAccumulated& cellAccumulatedLG = m_AccumulatedLG[hashid];
221 if (gain==CaloGain::LARLOWGAIN) {
222 if (chid==959628800) std::cout << "---> in loop LG - DAC = " << digit->DAC() << std::endl;
223 cellAccumulatedLG.m_ntrigger++;
224 unsigned int sizeSamples = digit->samples().size();
225 if(cellAccumulatedLG.m_ntrigger==1){
226 cellAccumulatedLG.m_sum.clear();
227 cellAccumulatedLG.m_sum2.clear();
228 cellAccumulatedLG.m_sum.resize(sizeSamples,0);
229 cellAccumulatedLG.m_sum2.resize(sizeSamples,0);
230 }
231 for(unsigned int j=0;j<sizeSamples;j++){
232 cellAccumulatedLG.m_sum[j] += digit->samples()[j];
233 cellAccumulatedLG.m_sum2[j] += digit->samples()[j]*digit->samples()[j];
234 }
235 ATH_MSG_DEBUG( "Sum = " << cellAccumulatedLG.m_sum[2] );
236 ATH_MSG_DEBUG( "Sum2 = " << cellAccumulatedLG.m_sum2[2] );
237 } // end High Gain
238
239
240 // when reached total number of triggers for this step, fill LArAccumulatedCalibDigit and reset number of triggers
241 if( (cellAccumulatedHG.m_ntrigger+cellAccumulatedMG.m_ntrigger+cellAccumulatedLG.m_ntrigger)==nTriggerPerStep[febhash]){
242 ATH_MSG_DEBUG( "filling LArAccumulatedCalibDigit " );
243 ATH_MSG_DEBUG( "chid = " << chid << ", gain = " << gain << ", DAC = " << digit->DAC() << ", isPulsed = " << m_isPulsed << ", delay = " << m_delay << ", trigPerStep = " << nTriggerPerStep[febhash] << ", istep = " << iStepTrigger[febhash] );
244 iStepTrigger[febhash]++;
245 unsigned int sizeSamples = digit->samples().size();
246
247 if (cellAccumulatedHG.m_ntrigger>0) {
248 LArAccumulatedCalibDigit* accuCalibDigitHG;
249 std::vector < uint64_t > sampleSumHG;
250 std::vector < uint64_t > sample2SumHG;
251 sampleSumHG.resize(sizeSamples,0);
252 sample2SumHG.resize(sizeSamples,0);
253 accuCalibDigitHG = new LArAccumulatedCalibDigit(chid, gain, sampleSumHG, sample2SumHG, 0, (uint16_t)digit->DAC(), (uint16_t)m_delay, m_isPulsed, 0, 0);
254 accuCalibDigitHG->setAddSubStep(cellAccumulatedHG.m_sum,cellAccumulatedHG.m_sum2,cellAccumulatedHG.m_ntrigger);
255 larAccuCalibDigitContainerHG->push_back(accuCalibDigitHG);
256 }
257
258 if (cellAccumulatedMG.m_ntrigger>0) {
259 LArAccumulatedCalibDigit* accuCalibDigitMG;
260 std::vector < uint64_t > sampleSumMG;
261 std::vector < uint64_t > sample2SumMG;
262 sampleSumMG.resize(sizeSamples,0);
263 sample2SumMG.resize(sizeSamples,0);
264 accuCalibDigitMG = new LArAccumulatedCalibDigit(chid, gain, sampleSumMG, sample2SumMG, 0, (uint16_t)digit->DAC(), (uint16_t)m_delay, m_isPulsed, 0, 0);
265 accuCalibDigitMG->setAddSubStep(cellAccumulatedMG.m_sum,cellAccumulatedMG.m_sum2,cellAccumulatedMG.m_ntrigger);
266 larAccuCalibDigitContainerMG->push_back(accuCalibDigitMG);
267 }
268
269 if (cellAccumulatedLG.m_ntrigger>0) {
270 LArAccumulatedCalibDigit* accuCalibDigitLG;
271 std::vector < uint64_t > sampleSumLG;
272 std::vector < uint64_t > sample2SumLG;
273 sampleSumLG.resize(sizeSamples,0);
274 sample2SumLG.resize(sizeSamples,0);
275 accuCalibDigitLG = new LArAccumulatedCalibDigit(chid, gain, sampleSumLG, sample2SumLG, 0, (uint16_t)digit->DAC(), (uint16_t)m_delay, m_isPulsed, 0, 0);
276 accuCalibDigitLG->setAddSubStep(cellAccumulatedLG.m_sum,cellAccumulatedLG.m_sum2,cellAccumulatedLG.m_ntrigger);
277 larAccuCalibDigitContainerLG->push_back(accuCalibDigitLG);
278 }
279
280 cellAccumulatedHG.m_ntrigger = 0;
281 cellAccumulatedMG.m_ntrigger = 0;
282 cellAccumulatedLG.m_ntrigger = 0;
283 }
284
285
286
287 }// loop over cells in container
288
289
290 larAccuCalibDigitContainerHG->setDelayScale(m_delayScale);
291 larAccuCalibDigitContainerMG->setDelayScale(m_delayScale);
292 larAccuCalibDigitContainerLG->setDelayScale(m_delayScale);
293
294 sc = evtStore()->record(larAccuCalibDigitContainerHG,"HIGH");
295 if (sc!=StatusCode::SUCCESS)
296 ATH_MSG_WARNING( "Unable to record LArAccumulatedCalibDigitContainer with key HIGH from DetectorStore. " );
297 else
298 ATH_MSG_DEBUG( "Recorded succesfully LArAccumulatedCalibDigitContainer with key HIGH" );
299 sc = evtStore()->setConst(larAccuCalibDigitContainerHG);
300 if (sc.isFailure()) {
301 ATH_MSG_ERROR( " Cannot lock LArAccumulatedCalibDigitContainerHG " );
302 delete larAccuCalibDigitContainerMG;
303 delete larAccuCalibDigitContainerLG;
304 return(StatusCode::FAILURE);
305 }
306
307 sc = evtStore()->record(larAccuCalibDigitContainerMG,"MEDIUM");
308 if (sc!=StatusCode::SUCCESS)
309 ATH_MSG_WARNING( "Unable to record LArAccumulatedCalibDigitContainer with key MEDIUM from DetectorStore. " );
310 else
311 ATH_MSG_DEBUG( "Recorded succesfully LArAccumulatedCalibDigitContainer with key MEDIUM" );
312 sc = evtStore()->setConst(larAccuCalibDigitContainerMG);
313 if (sc.isFailure()) {
314 ATH_MSG_ERROR( " Cannot lock LArAccumulatedCalibDigitContainerMG " );
315 delete larAccuCalibDigitContainerLG;
316 return(StatusCode::FAILURE);
317 }
318
319 sc = evtStore()->record(larAccuCalibDigitContainerLG,"LOW");
320 if (sc!=StatusCode::SUCCESS)
321 ATH_MSG_WARNING( "Unable to record LArAccumulatedCalibDigitContainer with key LOW from DetectorStore. " );
322 else
323 ATH_MSG_DEBUG( "Recorded succesfully LArAccumulatedCalibDigitContainer with key LOW" );
324 sc = evtStore()->setConst(larAccuCalibDigitContainerLG);
325 if (sc.isFailure()) {
326 ATH_MSG_ERROR( " Cannot lock LArAccumulatedCalibDigitContainerLG " );
327 return(StatusCode::FAILURE);
328 }
329 } // loop over key container
330 return StatusCode::SUCCESS;
331}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
const ServiceHandle< StoreGateSvc > & detStore() const
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
bool empty() const noexcept
Returns true if the collection is empty.
void setDelayScale(const double scale)
set the delay Scale
bool setAddSubStep(const std::vector< uint64_t > &sampleSum, const std::vector< uint64_t > &sample2Sum, const uint32_t nTriggerPerStep)
Sum up with another substep.
std::vector< LArAccumulated > m_AccumulatedHG
Stores number of triggers per intermediate step.
SG::ReadCondHandleKey< LArCalibLineMapping > m_calibMapKey
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
unsigned NTrigger(const HWIdentifier calibModuleID) const
@ LARMEDIUMGAIN
Definition CaloGain.h:18
@ LARLOWGAIN
Definition CaloGain.h:18
@ LARNGAIN
Definition CaloGain.h:19
@ LARHIGHGAIN
Definition CaloGain.h:18
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode LArCalibDigitsAccumulatorFreeGain::finalize ( )
inline

Definition at line 37 of file LArCalibDigitsAccumulatorFreeGain.h.

37{return StatusCode::SUCCESS;}

◆ initialize()

StatusCode LArCalibDigitsAccumulatorFreeGain::initialize ( )

Definition at line 34 of file LArCalibDigitsAccumulatorFreeGain.cxx.

34 {
35
37
38 // retrieve online ID helper
39 sc = detStore()->retrieve(m_onlineHelper, "LArOnlineID");
40 if (sc.isFailure()) {
41 ATH_MSG_ERROR( "Could not get LArOnlineID helper !" );
42 return StatusCode::FAILURE;
43 }
44
45 ATH_CHECK( m_calibMapKey.initialize() );
46
47 m_AccumulatedHG.resize(m_onlineHelper->channelHashMax());
48 m_AccumulatedMG.resize(m_onlineHelper->channelHashMax());
49 m_AccumulatedLG.resize(m_onlineHelper->channelHashMax());
50
51 return StatusCode::SUCCESS;
52}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_AccumulatedHG

std::vector<LArAccumulated> LArCalibDigitsAccumulatorFreeGain::m_AccumulatedHG
private

Stores number of triggers per intermediate step.

Vector (index=hash ID) of accumulation quantities

Definition at line 100 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_AccumulatedLG

std::vector<LArAccumulated> LArCalibDigitsAccumulatorFreeGain::m_AccumulatedLG
private

Definition at line 102 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_AccumulatedMG

std::vector<LArAccumulated> LArCalibDigitsAccumulatorFreeGain::m_AccumulatedMG
private

Definition at line 101 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_calibAccuDigitContainerName

std::string LArCalibDigitsAccumulatorFreeGain::m_calibAccuDigitContainerName
private

◆ m_calibMapKey

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

Definition at line 54 of file LArCalibDigitsAccumulatorFreeGain.h.

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

◆ m_delay

int LArCalibDigitsAccumulatorFreeGain::m_delay
private

Store delay.

Definition at line 61 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_delayScale

double LArCalibDigitsAccumulatorFreeGain::m_delayScale
private

Set delay scale.

Definition at line 85 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_event_counter

unsigned int LArCalibDigitsAccumulatorFreeGain::m_event_counter
private

Event counter.

Definition at line 107 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_isPulsed

bool LArCalibDigitsAccumulatorFreeGain::m_isPulsed
private

Set wether a cell is pulsed or not.

Definition at line 65 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_keepPulsed

bool LArCalibDigitsAccumulatorFreeGain::m_keepPulsed
private

Tells you wether you keep only pulsed cells or all cells.

Definition at line 90 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_keylist

std::vector<std::string> LArCalibDigitsAccumulatorFreeGain::m_keylist
private

list of key for input digit container (=gain)

Definition at line 75 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_nStepTrigger

unsigned int LArCalibDigitsAccumulatorFreeGain::m_nStepTrigger
private

Number of intermediate accumulations (JO property)

Definition at line 80 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_onlineHelper

const LArOnlineID* LArCalibDigitsAccumulatorFreeGain::m_onlineHelper
private

Definition at line 55 of file LArCalibDigitsAccumulatorFreeGain.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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