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

#include <LArDuplicateConstants.h>

Inheritance diagram for LArDuplicateConstants:
Collaboration diagram for LArDuplicateConstants:

Public Member Functions

 LArDuplicateConstants (const std::string &name, ISvcLocator *pSvcLocator)
 ~LArDuplicateConstants ()
StatusCode initialize ()
StatusCode execute ()
StatusCode stop ()
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

const LArOnlineIDm_onlineHelper
unsigned int m_gainIN
unsigned int m_gainOUT
std::string m_keyPed
std::string m_keyRamp
std::string m_keyMPMC
std::string m_keyOFC
std::string m_keyShape
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 27 of file LArDuplicateConstants.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

◆ LArDuplicateConstants()

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

Definition at line 21 of file LArDuplicateConstants.cxx.

22 : AthAlgorithm(name,pSvcLocator),
23 m_onlineHelper(nullptr)
24{
25 declareProperty("SourceGain" , m_gainIN = 1);
26 declareProperty("TargetGain" , m_gainOUT = 2);
27 declareProperty("KeyPedestal" , m_keyPed = "" ); //"LArPedestal");
28 declareProperty("KeyRamp" , m_keyRamp = "" ); //"LArRamp");
29 declareProperty("KeyMphysMcali" , m_keyMPMC = "" ); //"LArMphysOverMcal");
30 declareProperty("KeyOFC" , m_keyOFC = "" ); //"LArOFC");
31 declareProperty("KeyShape" , m_keyShape = "" ); //"LArShape");
32}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const LArOnlineID * m_onlineHelper

◆ ~LArDuplicateConstants()

LArDuplicateConstants::~LArDuplicateConstants ( )
default

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 LArDuplicateConstants::execute ( )
inline

Definition at line 34 of file LArDuplicateConstants.h.

34{return StatusCode::SUCCESS;}

◆ 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 LArDuplicateConstants::finalize ( )
inline

Definition at line 36 of file LArDuplicateConstants.h.

36{return StatusCode::SUCCESS;}

◆ initialize()

StatusCode LArDuplicateConstants::initialize ( )

Definition at line 39 of file LArDuplicateConstants.cxx.

40{
41 ATH_MSG_INFO ( "Initialing " << name() );
42 ATH_MSG_INFO ( "INPUT gain = " << m_gainIN );
43 ATH_MSG_INFO ( "OUTPUT gain = " << m_gainOUT );
44 return StatusCode::SUCCESS;
45}
#define ATH_MSG_INFO(x)

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

◆ stop()

StatusCode LArDuplicateConstants::stop ( )

Definition at line 48 of file LArDuplicateConstants.cxx.

49{
50 ATH_MSG_INFO ( "Entering LArDuplicateConstants" );
51
52 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
53
54 // PEDESTAL
55
56 if (!m_keyPed.empty()) {
57
58 const LArPedestalComplete* PedestalIN;
59 LArPedestalComplete* PedestalOUT;
60 ATH_CHECK( detStore()->retrieve(PedestalIN,m_keyPed) );
61 PedestalOUT=const_cast<LArPedestalComplete*>(PedestalIN); // cast to non-const the same container
62
63 unsigned int n_tot_ped = 0;
64 unsigned int n_dup_ped = 0;
65
66 PedestalIt ped_it = PedestalIN->begin(m_gainIN);
67 PedestalIt ped_it_e = PedestalIN->end(m_gainIN);
68 if ( ped_it == ped_it_e ) {
69 ATH_MSG_WARNING ( "LArPedestalComplete (key = " << m_keyPed << ") has no pedestals with gain = " << m_gainIN );
70 }
71 for ( ; ped_it!=ped_it_e; ped_it++) {
72 const HWIdentifier chid = ped_it.channelId();
73 if (m_onlineHelper->isEMBPS(chid)) { // duplicate constants for EMB PS only
74 n_tot_ped++;
75 const LArPedestalP1& ped_t = PedestalOUT->get(chid,m_gainOUT);
76 if (ped_t.isEmpty()) {
77 n_dup_ped++;
78 const LArPedestalP1& ped = PedestalIN->get(chid,m_gainIN);
79 PedestalOUT->setPdata(chid,ped,m_gainOUT);
80 ATH_MSG_VERBOSE ( "Pedestal for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
81 << " duplicated from gain " << m_gainIN << " to gain " << m_gainOUT );
82 } else {
83 ATH_MSG_VERBOSE ( "Pedestal for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
84 << " in gain " << m_gainOUT << " exists! Not duplicating..." );
85 }
86 }
87 }
88 ATH_MSG_INFO ( "LArPedestalComplete (key = " << m_keyPed << ") content duplicated from gain "
89 << m_gainIN << " to gain " << m_gainOUT
90 << " (" << n_dup_ped << "/" << n_tot_ped << " PS channels)" );
91 }
92
93 // RAMP
94
95 if (!m_keyRamp.empty()) {
96
97 const LArRampComplete* RampIN = nullptr;
98 LArRampComplete* RampOUT = nullptr;
100 RampOUT=const_cast<LArRampComplete*>(RampIN); // cast to non-const the same container
101
102 bool undoCorr=false;
103
104 if (!RampOUT->correctionsApplied()) {
105 ATH_CHECK( RampOUT->applyCorrections() );
106 undoCorr=true;
107 ATH_MSG_INFO ( "Applied corrections for Ramp" );
108 }
109 unsigned deltaGain = (m_gainOUT-m_gainIN); // Ex: 2-1 = 1
110 float scaleRamp = pow(10.,deltaGain); // Ex: 10^1 = 10
111 ATH_MSG_INFO ( "Ramp scale factor = " << scaleRamp );
112
113 unsigned int n_tot_ramp = 0;
114 unsigned int n_dup_ramp = 0;
115 unsigned nCorrChans=0;
116
117 RampIt ramp_it = RampIN->begin(m_gainIN);
118 RampIt ramp_it_e = RampIN->end(m_gainIN);
119 if ( ramp_it == ramp_it_e ) {
120 ATH_MSG_WARNING ( "LArRampComplete (key = " << m_keyRamp << ") has no ramps with gain = " << m_gainIN );
121 }
122 for ( ; ramp_it!=ramp_it_e; ramp_it++) {
123 const HWIdentifier chid = ramp_it.channelId();
124 if (m_onlineHelper->isEMBPS(chid)) { // duplicate constants for EMB PS only
125 n_tot_ramp++;
126 const LArRampP1& ramp_t = RampOUT->get(chid,m_gainOUT);
127 if (ramp_t.isEmpty()) {
128 n_dup_ramp++;
129 const LArRampP1& ramp = RampIN->get(chid,m_gainIN);
130 // scale ramp according to gain difference
131 unsigned s = ramp.m_vRamp.size();
132 LArRampP1 newramp;
133 newramp.m_vRamp.clear();
134 newramp.m_vRamp.resize(s);
135 for (unsigned i=0;i<s;i++) {
136 newramp.m_vRamp[i] = ramp.m_vRamp[i] * scaleRamp;
137 }
138 RampOUT->setPdata(chid,newramp,m_gainOUT);
139 ATH_MSG_VERBOSE ( "Ramp for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
140 << " duplicated from gain " << m_gainIN << " to gain " << m_gainOUT );
141 } else {
142 ATH_MSG_VERBOSE ( "Ramp for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
143 << " in gain " << m_gainOUT << " exists! Not duplicating..." );
144 }
145 }
146 }
147 if (undoCorr) {
148 ATH_CHECK( RampOUT->undoCorrections() );
149 ATH_MSG_INFO ( "Undo corrections for Ramp" );
150 }
151 else {
152 //Now work on correction channels
155 for (;cit!=cit_e;cit++) {
156 const HWIdentifier chid(cit->first);
157 if (m_onlineHelper->isEMBPS(chid)) { // duplicate constants for EMB PS only
158 const LArRampP1& ramp=cit->second;
159 const unsigned s = ramp.m_vRamp.size();
160 LArRampP1 newramp;
161 newramp.m_vRamp.clear();
162 newramp.m_vRamp.resize(s);
163 for (unsigned i=0;i<s;i++) {
164 newramp.m_vRamp[i] = ramp.m_vRamp[i] * scaleRamp;
165 }
166 ATH_CHECK( RampOUT->insertCorrection(chid,newramp,m_gainOUT,false) );
167 ++nCorrChans;
168 }//end if isEMBPS
169 } // end loop over correction channels
170 }
171 ATH_MSG_INFO ( "LArRampComplete (key = " << m_keyRamp << ") content duplicated from gain "
172 << m_gainIN << " to gain " << m_gainOUT
173 << " (" << n_dup_ramp << "/" << n_tot_ramp << " + " << nCorrChans << " PS channels)" );
174 }
175
176 // MPHYSOVERMCALI
177
178 if (!m_keyMPMC.empty()) {
179
180 const LArMphysOverMcalComplete* MphysMcaliIN = nullptr;
181 LArMphysOverMcalComplete* MphysMcaliOUT = nullptr;
182 ATH_CHECK( detStore()->retrieve(MphysMcaliIN,m_keyMPMC) );
183 MphysMcaliOUT=const_cast<LArMphysOverMcalComplete*>(MphysMcaliIN); // cast to non-const the same container
184
185 unsigned int n_tot_mpmc = 0;
186 unsigned int n_dup_mpmc = 0;
187
188 MpMcIt mpmc_it = MphysMcaliIN->begin(m_gainIN);
189 MpMcIt mpmc_it_e = MphysMcaliIN->end(m_gainIN);
190 if ( mpmc_it == mpmc_it_e ) {
191 ATH_MSG_WARNING ( "LArMphysOverMcaliComplete (key = " << m_keyMPMC << ") has no Mphys/Mcali with gain = " << m_gainIN );
192 }
193 for ( ; mpmc_it!=mpmc_it_e; mpmc_it++) {
194 const HWIdentifier chid = mpmc_it.channelId();
195 if (m_onlineHelper->isEMBPS(chid)) { // duplicate constants for EMB PS only
196 n_tot_mpmc++;
197 const LArSingleFloatP& mpmc_t = MphysMcaliOUT->get(chid,m_gainOUT);
198 if (mpmc_t.isEmpty()) {
199 n_dup_mpmc++;
200 const LArSingleFloatP& mpmc = MphysMcaliIN->get(chid,m_gainIN);
201 MphysMcaliOUT->setPdata(chid,mpmc,m_gainOUT);
202 ATH_MSG_VERBOSE ( "MpMc for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
203 << " duplicated from gain " << m_gainIN << " to gain " << m_gainOUT );
204 } else {
205 ATH_MSG_VERBOSE ( "MpMc for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
206 << " in gain " << m_gainOUT << " exists! Not duplicating..." );
207 }
208 }
209 }
210 ATH_MSG_INFO ( "LArMphysOverMcaliComplete (key = " << m_keyMPMC << ") content duplicated from gain "
211 << m_gainIN << " to gain " << m_gainOUT
212 << " (" << n_dup_mpmc << "/" << n_tot_mpmc << " PS channels)" );
213 }
214
215 // OFC
216
217 if (!m_keyOFC.empty()) {
218
219 const LArOFCComplete* OFCIN = nullptr;
220 LArOFCComplete* OFCOUT = nullptr;
221 ATH_CHECK( detStore()->retrieve(OFCIN,m_keyOFC) );
222 OFCOUT=const_cast<LArOFCComplete*>(OFCIN); // cast to non-const the same container
223
224 unsigned int n_tot_ofc = 0;
225 unsigned int n_dup_ofc = 0;
226
227 OFCIt ofc_it = OFCIN->begin(m_gainIN);
228 OFCIt ofc_it_e = OFCIN->end(m_gainIN);
229 if ( ofc_it == ofc_it_e ) {
230 ATH_MSG_WARNING ( "LArOFCComplete (key = " << m_keyOFC << ") has no OFCs with gain = " << m_gainIN );
231 }
232 for ( ; ofc_it!=ofc_it_e; ofc_it++) {
233 const HWIdentifier chid = ofc_it.channelId();
234 if (m_onlineHelper->isEMBPS(chid)) { // duplicate constants for EMB PS only
235 n_tot_ofc++;
236
237 //const LArOFCP1& ofc_t = OFCOUT->get(chid,m_gainOUT); // gives a segmentation fault from LAr2DWaveBase::LAr2DWaveBase(LArCompactSubsetChannelProxy const&) ()
238 // LArOFCP1 ofc_t = OFCOUT->get(chid,m_gainOUT); // make a copy instead? Nope, still segfaulting.
239 // if (ofc_t.isEmpty()) { } // cannot use this :-(
240
241 // directly get one data member :-(
242 ILArOFC::OFCRef_t vOFCa_t = OFCOUT->OFC_a(chid,m_gainOUT);
243 if (!vOFCa_t.size()) { // emulate isEmpty() behavior
244
245 n_dup_ofc++;
246 const LArOFCP1& ofc = OFCIN->get(chid,m_gainIN); // why is this working here? Because it;s not empty?
247 OFCOUT->setPdata(chid,ofc,m_gainOUT);
248 ATH_MSG_VERBOSE ( "OFC for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
249 << " duplicated from gain " << m_gainIN << " to gain " << m_gainOUT );
250 } else {
251 ATH_MSG_VERBOSE ( "OFC for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
252 << " in gain " << m_gainOUT << " exists! Not duplicating..." );
253
254 }
255 }
256 }
257 ATH_MSG_INFO ( "LArOFCComplete (key = " << m_keyOFC << ") content duplicated from gain "
258 << m_gainIN << " to gain " << m_gainOUT
259 << " (" << n_dup_ofc << "/" << n_tot_ofc << " PS channels)" );
260 }
261
262 // SHAPE
263
264 if (!m_keyShape.empty()) {
265
266 const LArShapeComplete* ShapeIN = nullptr;
267 LArShapeComplete* ShapeOUT = nullptr;
268 ATH_CHECK( detStore()->retrieve(ShapeIN,m_keyShape) );
269 ShapeOUT=const_cast<LArShapeComplete*>(ShapeIN); // cast to non-const the same container
270
271 unsigned int n_tot_shape = 0;
272 unsigned int n_dup_shape = 0;
273
274 ShapeIt shape_it = ShapeIN->begin(m_gainIN);
275 ShapeIt shape_it_e = ShapeIN->end(m_gainIN);
276 if ( shape_it == shape_it_e ) {
277 ATH_MSG_WARNING ( "LArShapeComplete (key = " << m_keyShape << ") has no Shapes with gain = " << m_gainIN );
278 }
279 for ( ; shape_it!=shape_it_e; shape_it++) {
280 const HWIdentifier chid = shape_it.channelId();
281 if (m_onlineHelper->isEMBPS(chid)) { // duplicate constants for EMB PS only
282 n_tot_shape++;
283
284 //const LArShapeP2& shape_t = ShapeOUT->get(chid,m_gainOUT);
285 //if (shape_t.isEmpty()) {
286
287 ILArShape::ShapeRef_t vShape_t = ShapeOUT->Shape(chid,m_gainOUT);
288 if (!vShape_t.size()) {
289
290 n_dup_shape++;
291 const LArShapeP2& shape = ShapeIN->get(chid,m_gainIN);
292 ShapeOUT->setPdata(chid,shape,m_gainOUT);
293 ATH_MSG_VERBOSE ( "Shape for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
294 << " duplicated from gain " << m_gainIN << " to gain " << m_gainOUT );
295 } else {
296 ATH_MSG_VERBOSE ( "Shape for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
297 << " in gain " << m_gainOUT << " exists! Not duplicating..." );
298 }
299 }
300 }
301 ATH_MSG_INFO ( "LArShapeComplete (key = " << m_keyShape << ") content duplicated from gain "
302 << m_gainIN << " to gain " << m_gainOUT
303 << " (" << n_dup_shape << "/" << n_tot_shape << " PS channels)" );
304
305 }
306
307 ATH_MSG_INFO ( "Done with LArDuplicateConstants" );
308 return StatusCode::SUCCESS;
309}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
LArPedestalComplete::ConstConditionsMapIterator PedestalIt
LArMphysOverMcalComplete::ConstConditionsMapIterator MpMcIt
LArShapeComplete::ConstConditionsMapIterator ShapeIt
LArRampComplete::ConstConditionsMapIterator RampIt
LArOFCComplete::ConstConditionsMapIterator OFCIt
constexpr int pow(int base, int exp) noexcept
const ServiceHandle< StoreGateSvc > & detStore() const
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
Definition ILArOFC.h:26
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Definition ILArShape.h:26
value_type get_compact() const
Get the compact id.
StatusCode insertCorrection(HWIdentifier id, const T &cond, unsigned int gain, bool corrChannel=true)
access to corrections -
bool correctionsApplied() const
Have corrections been applied?
void setPdata(const HWIdentifier id, const T &payload, unsigned int gain=0)
put payload in persistent data
StatusCode applyCorrections()
apply correction set
StatusCode undoCorrections()
undo corrections that have been already applied
ConstCorrectionIt undoCorrBegin(unsigned int gain) const
get iterator over the Undo-Vector for a certain gain
ConstCorrectionIt undoCorrEnd(unsigned int gain) const
ConstReference get(const HWIdentifier id, unsigned int gain=0) const
get data with online identifier
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
Subset::ConstCorrectionVecIt ConstCorrectionIt
virtual OFCRef_t OFC_a(const HWIdentifier &CellID, int gain, int tbin=0) const override
access to OFCs by online ID, gain, and tbin (!=0 for testbeam)
bool isEmpty() const
std::vector< float > m_vRamp
Definition LArRampP1.h:30
bool isEmpty() const
Definition LArRampP1.h:29
virtual ShapeRef_t Shape(const HWIdentifier &CellID, int gain, int tbin=0, int mode=0) const override
bool isEmpty() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ 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}
#define ATH_MSG_ERROR(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

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

unsigned int LArDuplicateConstants::m_gainIN
private

Definition at line 41 of file LArDuplicateConstants.h.

◆ m_gainOUT

unsigned int LArDuplicateConstants::m_gainOUT
private

Definition at line 42 of file LArDuplicateConstants.h.

◆ m_keyMPMC

std::string LArDuplicateConstants::m_keyMPMC
private

Definition at line 46 of file LArDuplicateConstants.h.

◆ m_keyOFC

std::string LArDuplicateConstants::m_keyOFC
private

Definition at line 47 of file LArDuplicateConstants.h.

◆ m_keyPed

std::string LArDuplicateConstants::m_keyPed
private

Definition at line 44 of file LArDuplicateConstants.h.

◆ m_keyRamp

std::string LArDuplicateConstants::m_keyRamp
private

Definition at line 45 of file LArDuplicateConstants.h.

◆ m_keyShape

std::string LArDuplicateConstants::m_keyShape
private

Definition at line 48 of file LArDuplicateConstants.h.

◆ m_onlineHelper

const LArOnlineID* LArDuplicateConstants::m_onlineHelper
private

Definition at line 39 of file LArDuplicateConstants.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: