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

#include <LArADC2MeVCondAlg.h>

Inheritance diagram for LArADC2MeVCondAlg:

Public Member Functions

 ~LArADC2MeVCondAlg ()
StatusCode initialize () override
StatusCode execute (const EventContext &ctx) const override
StatusCode finalize () 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< LArOnOffIdMappingm_cablingKey {this,"LArOnOffIdMappingKey","LArOnOffIdMap","SG key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< ILAruA2MeVm_lAruA2MeVKey {this,"LAruA2MeVKey","LAruA2MeV","SG key of uA2MeV object"}
SG::ReadCondHandleKey< ILArDAC2uAm_lArDAC2uAKey {this,"LArDAC2uAKey","LArDAC2uA","SG key of DAC2uA object"}
SG::ReadCondHandleKey< ILArRampm_lArRampKey {this,"LArRampKey","LArRamp","SG key of Ramp object"}
SG::ReadCondHandleKey< ILArMphysOverMcalm_lArMphysOverMcalKey
SG::ReadCondHandleKey< ILArHVScaleCorrm_lArHVScaleCorrKey
SG::WriteCondHandleKey< LArADC2MeVm_ADC2MeVKey {this,"LArADC2MeVKey","LArADC2MeV","SG key of the resulting LArADC2MeV object"}
SG::ReadCondHandleKey< LArFebConfigm_febConfigKey {this,"FebConfigKey","LArFebConfig","SG key for FEB config object"}
Gaudi::Property< bool > m_useFEBGainThresholds {this,"UseFEBGainTresholds",true}
Gaudi::Property< bool > m_isSuperCell {this,"isSuperCell",false,"switch to true to use the SuperCell Identfier helper"}
Gaudi::Property< bool > m_completeDetector {this,"CompleteDetector",true,"If True, this algo will fail if input data is missing"}
Gaudi::Property< unsigned > m_nGains {this,"NGains",3,"Expected number of gains"}
const LArOnlineID_Basem_larOnlineID =nullptr
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 27 of file LArADC2MeVCondAlg.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

◆ ~LArADC2MeVCondAlg()

LArADC2MeVCondAlg::~LArADC2MeVCondAlg ( )

Definition at line 11 of file LArADC2MeVCondAlg.cxx.

11{}

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

Definition at line 59 of file LArADC2MeVCondAlg.cxx.

59 {
60
61 //Set up write handle
62 SG::WriteCondHandle<LArADC2MeV> writeHandle{m_ADC2MeVKey,ctx};
63
64 if (writeHandle.isValid()) {
65 ATH_MSG_DEBUG("Found valid write handle");
66 return StatusCode::SUCCESS;
67 }
68
69 //Cabling (should have an ~infinte IOV)
70 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey,ctx};
71 const LArOnOffIdMapping* cabling{*cablingHdl};
72 writeHandle.addDependency(cablingHdl);
73
74 //Get pointers to input data and determine validity range
75 SG::ReadCondHandle<ILAruA2MeV> uA2MeVHdl{m_lAruA2MeVKey,ctx};
76 const ILAruA2MeV* laruA2MeV{*uA2MeVHdl};
77 writeHandle.addDependency(uA2MeVHdl);
78
79 SG::ReadCondHandle<ILArDAC2uA> DAC2uAHdl{m_lArDAC2uAKey,ctx};
80 const ILArDAC2uA* larDAC2uA{*DAC2uAHdl};
81 writeHandle.addDependency(DAC2uAHdl);
82
83 SG::ReadCondHandle<ILArRamp> rampHdl{m_lArRampKey,ctx};
84 const ILArRamp* larRamp{*rampHdl};
85 writeHandle.addDependency(rampHdl);
86
87 // retrieve LArFebConfig if needed
88 const LArFebConfig *febConfig=nullptr;
90 SG::ReadCondHandle<LArFebConfig> configHdl{m_febConfigKey,ctx};
91 febConfig = *configHdl;
92 if (febConfig==nullptr) {
93 ATH_MSG_ERROR( "Unable to retrieve LArFebConfig with key " << m_febConfigKey.key());
94 return StatusCode::FAILURE;
95 }
96 writeHandle.addDependency(configHdl);
97 }
98 //The following two are optional (not used for MC and/or SuperCells)
99 const ILArMphysOverMcal* larmPhysOverMCal=nullptr;
100 if (!m_lArMphysOverMcalKey.key().empty()) {
101 SG::ReadCondHandle<ILArMphysOverMcal> mphysOverMcalHdl{m_lArMphysOverMcalKey,ctx};
102 larmPhysOverMCal=*mphysOverMcalHdl;
103 writeHandle.addDependency(mphysOverMcalHdl);
104 }//end if have MphysOverMcal
105
106 const ILArHVScaleCorr* larHVScaleCorr=nullptr;
107 if (!m_lArHVScaleCorrKey.key().empty()) {
108 SG::ReadCondHandle<ILArHVScaleCorr> HVScaleCorrHdl{m_lArHVScaleCorrKey,ctx};
109 larHVScaleCorr=*HVScaleCorrHdl;
110 writeHandle.addDependency(HVScaleCorrHdl);
111 }//end if have HVScaleCorr
112
113
114 ATH_MSG_INFO("IOV of ADC2MeV object is " << writeHandle.getRange());
115
116 //Sanity & debugging conters:
117 unsigned nNouA2MeV=0;
118 unsigned nNoDAC2uA=0;
119 unsigned nNoMphysOverMcal=0;
120 unsigned nNoRamp=0;
121 unsigned nNoHVScaleCorr=0;
122
123 //'Guess' the degree of the ramp polynom by searching the first filled ramp
124 //The value should be all the same for all cells & gains and in reality always 2
125 unsigned rampPolyDeg=0;
126 std::vector<HWIdentifier>::const_iterator it = m_larOnlineID->channel_begin();
127 std::vector<HWIdentifier>::const_iterator it_e= m_larOnlineID->channel_end();
128 while (rampPolyDeg==0 && it!=it_e) {
129 size_t gain=0;
130 while ( rampPolyDeg==0 && gain < m_nGains) {
131 rampPolyDeg=larRamp->ADC2DAC(*it,gain).size();
132 ++gain;
133 }
134 ++it;
135 }
136
137 ATH_MSG_INFO("Working with a ramp polynom of degree " << rampPolyDeg);
138 //Create output object
139 std::unique_ptr<LArADC2MeV> lArADC2MeVObj=std::make_unique<LArADC2MeV>(m_larOnlineID,cabling,m_nGains,rampPolyDeg);
140
141 std::vector<float> ADC2MeV; //output data, overwritten in each loop iteration (avoid re-allocation)
142
143 for (const HWIdentifier chid : m_larOnlineID->channel_range()) {
144 const IdentifierHash hid=m_larOnlineID->channel_Hash(chid);
145
146 //Check if connected:
147 if (cabling->isOnlineConnectedFromHash(hid)) {
148 //uA2MeV and DAC2uA are gain-less and always needed:
149 const float& uA2MeV=laruA2MeV->UA2MEV(chid);
150 if (uA2MeV == (float)ILAruA2MeV::ERRORCODE) {
151 ++nNouA2MeV;
152 continue;
153 }
154
155 const float& DAC2uA=larDAC2uA->DAC2UA(chid);
156 if (DAC2uA == (float)ILArDAC2uA::ERRORCODE) {
157 ATH_MSG_ERROR( "No DAC2uA value for for channel " << m_larOnlineID->channel_name(chid) );
158 ++nNoDAC2uA;
159 continue;
160 }
161
162 //First intermediate result
163 float factor=uA2MeV*DAC2uA;
164
165 if (larHVScaleCorr) { //Have HVScaleCorr (remember, it's optional)
166 const float& HVScaleCorr = larHVScaleCorr->HVScaleCorr(chid);
167 if (HVScaleCorr == (float)ILAruA2MeV::ERRORCODE) {
168 //That's a bit unusual but not a disaster, go ahead w/o HV Scale correction
169 ATH_MSG_DEBUG("No HVScaleCorr value for for channel " << m_larOnlineID->channel_name(chid));
170 ++nNoHVScaleCorr;
171 }
172 else {
173 factor*=HVScaleCorr;
174 }
175 }//end if have HVScaleCorr
176
177
178 //The following factors are gain-dependent:
179 std::vector<float> factorGain(m_nGains,factor);
180
181 if (larmPhysOverMCal) {//Have mPhysOverMcal obj (remember, it's optional)
182 for (size_t igain=0;igain<m_nGains;++igain) {
183 const float& mPhysOverMCal=larmPhysOverMCal->MphysOverMcal(chid,igain);
184 if ( mPhysOverMCal==(float)ILArMphysOverMcal::ERRORCODE) {
185 //That's ok, not all channels actually have an MphysOverMcal value
186 ++nNoMphysOverMcal;
187 }
188 else {
189 factorGain[igain]/=mPhysOverMCal;
190 }
191 }//end loop over gains
192 }//end if have MPhysOverMcal
193
194
195 for(unsigned int igain=0;igain<m_nGains;igain++) {
196
197 // ADC2DAC is a vector (polynomial fit of ramps)
198 const ILArRamp::RampRef_t adc2dac = larRamp->ADC2DAC(chid,igain);
199 if (adc2dac.size()<2) {
200 // Some channels can be missing in some configurations,
201 //for example during the electronic calibration processing
202 ATH_MSG_VERBOSE("No Ramp found for channel " << m_larOnlineID->channel_name(chid) << ", gain " << igain);
203 if (igain == 2 && m_larOnlineID->isEMBPS(chid)) {
204 ATH_MSG_VERBOSE("Ignore missing ramp for barrel presampler channel in low gain");
205 }
206 else {
207 ++nNoRamp;
208 }
209 continue;
210 }
211
212 ATH_MSG_VERBOSE(chid.get_identifier32().get_compact()
213 << " gain (" << igain<< ") "
214 << " uA2MeV (" << uA2MeV << ") "
215 << " DAC2uA (" << DAC2uA << ") "
216 << " factorGain (" << factorGain[igain] << ") "
217 << " adc2dac (" << adc2dac[0]<<" " << adc2dac[1]<< ") "
218 );
219
220 ADC2MeV.resize(adc2dac.size());
221
222 //Determine if the intercept is to be used:
223 if (igain==0 || (igain==1 && febConfig && febConfig->lowerGainThreshold(chid)<5)) {
224 //Don't use ramp intercept in high gain and in medium gain if the no high gain is used
225 //(eg lowerGainThreshold is ~zero)
226 ADC2MeV[0]=0;
227 }
228 else {
229 ADC2MeV[0]=factorGain[igain]*adc2dac[0];
230 }
231
232 //Fill remaining polynom terms (usualy only one left)
233 for (size_t i=1;i<adc2dac.size();++i) {
234 ADC2MeV[i]=factorGain[igain]*adc2dac[i];
235 }
236 //Now we are done with this channel and gain. Add it to the output container
237 bool stat=lArADC2MeVObj->set(hid,igain,ADC2MeV);
238 if (!stat) { //fails only if hash or gain are out-of-range
239 ATH_MSG_ERROR( "LArADC2MeV::set fails for gain " << igain << ", hash " << hid );
240 }
241 assert(stat);
242
243 }//end loop over gains
244 }//end if connected
245 }//end loop over readout channels
246
247
248 ATH_CHECK(writeHandle.record(std::move(lArADC2MeVObj)));
249
250 if (nNouA2MeV) ATH_MSG_ERROR("No uA2MeV values for " << nNouA2MeV << " channels");
251 if (nNoDAC2uA) ATH_MSG_ERROR("No DAC2uA values for " << nNoDAC2uA << " channels");
252 if (nNoRamp) {
253 if (m_completeDetector) {
254 ATH_MSG_ERROR("No Ramp values for " << nNoRamp << " channels * gains " );
255 }
256 else {
257 ATH_MSG_WARNING("No Ramp values for " << nNoRamp << " channels * gains " );
258 }
259 }
260 if (nNoMphysOverMcal) ATH_MSG_INFO("No MphysOverMcal values for " << nNoMphysOverMcal << " channels * gains");
261 if (nNoHVScaleCorr) ATH_MSG_WARNING("No HVScaleCorr values for " << nNoHVScaleCorr << " channels");
262
263 if (nNouA2MeV || nNoDAC2uA || (nNoRamp && m_completeDetector))
264 return StatusCode::FAILURE;
265 else
266 return StatusCode::SUCCESS;
267}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
virtual const float & DAC2UA(const HWIdentifier &id) const =0
access to DAC2UA conversion factor index by Identifier, and gain setting
virtual const float & HVScaleCorr(const HWIdentifier &id) const =0
virtual const float & MphysOverMcal(const HWIdentifier &id, int gain) const =0
virtual RampRef_t ADC2DAC(const HWIdentifier &id, int gain) const =0
LArVectorProxy RampRef_t
This class defines the interface for accessing Ramp @stereotype Interface.
Definition ILArRamp.h:31
virtual const float & UA2MEV(const HWIdentifier &id) const =0
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< LArFebConfig > m_febConfigKey
Gaudi::Property< unsigned > m_nGains
SG::ReadCondHandleKey< ILArHVScaleCorr > m_lArHVScaleCorrKey
SG::ReadCondHandleKey< ILArMphysOverMcal > m_lArMphysOverMcalKey
SG::ReadCondHandleKey< ILArDAC2uA > m_lArDAC2uAKey
SG::WriteCondHandleKey< LArADC2MeV > m_ADC2MeVKey
Gaudi::Property< bool > m_completeDetector
SG::ReadCondHandleKey< ILArRamp > m_lArRampKey
const LArOnlineID_Base * m_larOnlineID
SG::ReadCondHandleKey< ILAruA2MeV > m_lAruA2MeVKey
Gaudi::Property< bool > m_useFEBGainThresholds
short lowerGainThreshold(const HWIdentifier &id) const
void addDependency(const EventIDRange &range)
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED

◆ 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

◆ finalize()

StatusCode LArADC2MeVCondAlg::finalize ( )
inlineoverride

Definition at line 35 of file LArADC2MeVCondAlg.h.

35{return StatusCode::SUCCESS;}

◆ initialize()

StatusCode LArADC2MeVCondAlg::initialize ( )
override

Definition at line 14 of file LArADC2MeVCondAlg.cxx.

14 {
15
16 //Identifier helper:
17 if (m_isSuperCell) {
18 m_nGains=1;
19 const LArOnline_SuperCellID* scidhelper;
20 ATH_CHECK(detStore()->retrieve(scidhelper,"LArOnline_SuperCellID"));
21 m_larOnlineID=scidhelper; //cast to base-class
22 }
23 else {//regular cells
24 const LArOnlineID* idhelper;
25 ATH_CHECK(detStore()->retrieve(idhelper,"LArOnlineID"));
26 m_larOnlineID=idhelper; //cast to base-class
27 }
28
29 if (!m_larOnlineID) {
30 ATH_MSG_ERROR("Failed to obtain LArOnlineID");
31 return StatusCode::FAILURE;
32 }
33
34 // Read handle for cabling
35 ATH_CHECK(m_cablingKey.initialize());
36
37 // Read handles for input conditions
38 ATH_CHECK(m_lAruA2MeVKey.initialize());
39 ATH_CHECK(m_lArDAC2uAKey.initialize());
40 ATH_CHECK(m_lArRampKey.initialize());
41
42 //The following two are optional (not used for MC and/or SuperCells)
43 if (!m_lArMphysOverMcalKey.key().empty()) {
44 ATH_CHECK(m_lArMphysOverMcalKey.initialize());
45 }
46 if (!m_lArHVScaleCorrKey.key().empty()) {
47 ATH_CHECK(m_lArHVScaleCorrKey.initialize());
48 }
49
50 //Write handle
51 ATH_CHECK( m_ADC2MeVKey.initialize() );
52
54
55 return StatusCode::SUCCESS;
56}
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< bool > m_isSuperCell

◆ 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}
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_ADC2MeVKey

SG::WriteCondHandleKey<LArADC2MeV> LArADC2MeVCondAlg::m_ADC2MeVKey {this,"LArADC2MeVKey","LArADC2MeV","SG key of the resulting LArADC2MeV object"}
private

Definition at line 49 of file LArADC2MeVCondAlg.h.

49{this,"LArADC2MeVKey","LArADC2MeV","SG key of the resulting LArADC2MeV object"};

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArADC2MeVCondAlg::m_cablingKey {this,"LArOnOffIdMappingKey","LArOnOffIdMap","SG key of LArOnOffIdMapping object"}
private

Definition at line 38 of file LArADC2MeVCondAlg.h.

38{this,"LArOnOffIdMappingKey","LArOnOffIdMap","SG key of LArOnOffIdMapping object"};

◆ m_completeDetector

Gaudi::Property<bool> LArADC2MeVCondAlg::m_completeDetector {this,"CompleteDetector",true,"If True, this algo will fail if input data is missing"}
private

Definition at line 55 of file LArADC2MeVCondAlg.h.

55{this,"CompleteDetector",true,"If True, this algo will fail if input data is missing"};

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

SG::ReadCondHandleKey<LArFebConfig> LArADC2MeVCondAlg::m_febConfigKey {this,"FebConfigKey","LArFebConfig","SG key for FEB config object"}
private

Definition at line 51 of file LArADC2MeVCondAlg.h.

51{this,"FebConfigKey","LArFebConfig","SG key for FEB config object"};

◆ m_isSuperCell

Gaudi::Property<bool> LArADC2MeVCondAlg::m_isSuperCell {this,"isSuperCell",false,"switch to true to use the SuperCell Identfier helper"}
private

Definition at line 54 of file LArADC2MeVCondAlg.h.

54{this,"isSuperCell",false,"switch to true to use the SuperCell Identfier helper"};

◆ m_lArDAC2uAKey

SG::ReadCondHandleKey<ILArDAC2uA> LArADC2MeVCondAlg::m_lArDAC2uAKey {this,"LArDAC2uAKey","LArDAC2uA","SG key of DAC2uA object"}
private

Definition at line 40 of file LArADC2MeVCondAlg.h.

40{this,"LArDAC2uAKey","LArDAC2uA","SG key of DAC2uA object"}; //Always used

◆ m_lArHVScaleCorrKey

SG::ReadCondHandleKey<ILArHVScaleCorr> LArADC2MeVCondAlg::m_lArHVScaleCorrKey
private
Initial value:
{this,"LArHVScaleCorrKey","LArHVScaleCorr",
"SG key of HVScaleCorr object (or empty string if no HVScaleCorr)"}

Definition at line 46 of file LArADC2MeVCondAlg.h.

46 {this,"LArHVScaleCorrKey","LArHVScaleCorr",
47 "SG key of HVScaleCorr object (or empty string if no HVScaleCorr)"}; //Not (yet) used for supercells and simulation

◆ m_lArMphysOverMcalKey

SG::ReadCondHandleKey<ILArMphysOverMcal> LArADC2MeVCondAlg::m_lArMphysOverMcalKey
private
Initial value:
{this,"LArMphysOverMcalKey","LArMphysOverMcal",
"SG key of MpysOverMcal object (or empty string if no MphysOverMcal)"}

Definition at line 44 of file LArADC2MeVCondAlg.h.

44 {this,"LArMphysOverMcalKey","LArMphysOverMcal",
45 "SG key of MpysOverMcal object (or empty string if no MphysOverMcal)"}; //Not used for supercells

◆ m_larOnlineID

const LArOnlineID_Base* LArADC2MeVCondAlg::m_larOnlineID =nullptr
private

Definition at line 59 of file LArADC2MeVCondAlg.h.

◆ m_lArRampKey

SG::ReadCondHandleKey<ILArRamp> LArADC2MeVCondAlg::m_lArRampKey {this,"LArRampKey","LArRamp","SG key of Ramp object"}
private

Definition at line 41 of file LArADC2MeVCondAlg.h.

41{this,"LArRampKey","LArRamp","SG key of Ramp object"}; //Always used

◆ m_lAruA2MeVKey

SG::ReadCondHandleKey<ILAruA2MeV> LArADC2MeVCondAlg::m_lAruA2MeVKey {this,"LAruA2MeVKey","LAruA2MeV","SG key of uA2MeV object"}
private

Definition at line 39 of file LArADC2MeVCondAlg.h.

39{this,"LAruA2MeVKey","LAruA2MeV","SG key of uA2MeV object"}; //Always used

◆ m_nGains

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

Definition at line 57 of file LArADC2MeVCondAlg.h.

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

◆ m_useFEBGainThresholds

Gaudi::Property<bool> LArADC2MeVCondAlg::m_useFEBGainThresholds {this,"UseFEBGainTresholds",true}
private

Definition at line 53 of file LArADC2MeVCondAlg.h.

53{this,"UseFEBGainTresholds",true};

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