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

#include <CaloCellCalcEnergyCorr.h>

Inheritance diagram for CaloCellCalcEnergyCorr:

Classes

struct  HVData

Public Member Functions

 CaloCellCalcEnergyCorr (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters:
virtual ~CaloCellCalcEnergyCorr ()
 Destructor:
virtual StatusCode initialize () override
virtual StatusCode execute () override
virtual StatusCode finalize () override
virtual StatusCode stop () override
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

std::vector< int > GetHVLines (const HVData &hvdata, const Identifier &id, const CaloDetDescrManager *caloMgr)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::string m_folder
std::vector< int > m_calosample
std::vector< float > m_value
std::vector< int > m_hvlines
std::vector< float > m_hvvalue
SG::ReadCondHandleKey< LArHVIdMappingm_hvCablingKey {this, "LArHVIdMapping", "LArHVIdMap", "SG key for HV ID mapping"}
SG::ReadCondHandleKeyArray< CondAttrListCollectionm_DCSFolderKeys
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" }
const LArEM_IDm_larem_id
const LArHEC_IDm_larhec_id
const LArFCAL_IDm_larfcal_id
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 23 of file CaloCellCalcEnergyCorr.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

◆ CaloCellCalcEnergyCorr()

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

Constructor with parameters:

Definition at line 70 of file CaloCellCalcEnergyCorr.cxx.

71 :
72 AthAlgorithm( name, pSvcLocator ),
73 m_larem_id(nullptr),
74 m_larhec_id(nullptr),
75 m_larfcal_id(nullptr)
76{
77 declareProperty("Folder",m_folder="/LAR/CellCorrOfl/EnergyCorr");
78 std::vector<int> ivec; ivec.push_back(-1);
79 declareProperty("CaloSamples",m_calosample=ivec);
80 std::vector<float> fvec; fvec.push_back(1.0);
81 declareProperty("SampleValues",m_value=fvec);
82 std::vector<int> iivec; iivec.push_back(-1);
83 declareProperty("HVLines",m_hvlines=iivec);
84 std::vector<float> ffvec; ffvec.push_back(1.0);
85 declareProperty("HVvalues",m_hvvalue=ffvec);
86}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< int > m_calosample
std::vector< float > m_value
std::vector< float > m_hvvalue
const LArFCAL_ID * m_larfcal_id
vec_fb< typename boost::int_t< sizeof(T) *8 >::exact, N > ivec
Definition vec_fb.h:53

◆ ~CaloCellCalcEnergyCorr()

CaloCellCalcEnergyCorr::~CaloCellCalcEnergyCorr ( )
virtualdefault

Destructor:

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 CaloCellCalcEnergyCorr::execute ( )
overridevirtual

Definition at line 125 of file CaloCellCalcEnergyCorr.cxx.

126{
127 return StatusCode::SUCCESS;
128}

◆ 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 CaloCellCalcEnergyCorr::finalize ( )
overridevirtual

Definition at line 120 of file CaloCellCalcEnergyCorr.cxx.

121{
122 return StatusCode::SUCCESS;
123}

◆ GetHVLines()

std::vector< int > CaloCellCalcEnergyCorr::GetHVLines ( const HVData & hvdata,
const Identifier & id,
const CaloDetDescrManager * caloMgr )
private

Definition at line 238 of file CaloCellCalcEnergyCorr.cxx.

240 {
241 std::set<int> hv;
242
243 // LAr EMB
244 if (m_larem_id->is_lar_em(id) && m_larem_id->sampling(id)>0) {
245 if (abs(m_larem_id->barrel_ec(id))==1) {
246 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(caloMgr->get_element(id));
247 if (!embElement) std::abort();
248 const EMBCellConstLink cell = embElement->getEMBCell();
249 unsigned int nelec = cell->getNumElectrodes();
250 for (unsigned int i=0;i<nelec;i++) {
251 const EMBHVElectrode& electrode = cell->getElectrode(i);
252 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata.m_hvdata_EMB.hvLineNo (electrode, igap));
253 }
254 } else { // LAr EMEC
255 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(caloMgr->get_element(id));
256 if (!emecElement) std::abort();
257 const EMECCellConstLink cell = emecElement->getEMECCell();
258 unsigned int nelec = cell->getNumElectrodes();
259 for (unsigned int i=0;i<nelec;i++) {
260 const EMECHVElectrode& electrode = cell->getElectrode(i);
261 const EMECHVManager::EMECHVData& hvdata_EMEC =
263 hvdata.m_hvdata_EMEC_IN :
264 hvdata.m_hvdata_EMEC_OUT ;
265 for (unsigned int igap=0;igap<2;igap++) {
266 hv.insert(hvdata_EMEC.hvLineNo (electrode, igap));
267 }
268 }
269 }
270 } else if (m_larhec_id->is_lar_hec(id)) { // LAr HEC
271 const HECDetectorElement* hecElement = dynamic_cast<const HECDetectorElement*>(caloMgr->get_element(id));
272 if (!hecElement) std::abort();
273 const HECCellConstLink cell = hecElement->getHECCell();
274 unsigned int nsubgaps = cell->getNumSubgaps();
275 for (unsigned int igap=0;igap<nsubgaps;igap++) {
276 const HECHVSubgap& subgap = cell->getSubgap(igap);
277 hv.insert(hvdata.m_hvdata_HEC.hvLineNo (subgap));
278 }
279 } else if (m_larfcal_id->is_lar_fcal(id)) { // LAr FCAL
280 const FCALDetectorElement* fcalElement = dynamic_cast<const FCALDetectorElement*>(caloMgr->get_element(id));
281 if (!fcalElement) std::abort();
282 const FCALTile* tile = fcalElement->getFCALTile();
283 unsigned int nlines = tile->getNumHVLines();
284 for (unsigned int i=0;i<nlines;i++) {
285 const FCALHVLine* line = tile->getHVLine(i);
286 if(line) hv.insert(hvdata.m_hvdata_FCAL.hvLineNo (*line));
287 }
288 } else if (m_larem_id->is_lar_em(id) && m_larem_id->sampling(id)==0) { // Presamplers
289 if (abs(m_larem_id->barrel_ec(id))==1) {
290 const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(caloMgr->get_element(id));
291 if (!embElement) std::abort();
292 const EMBCellConstLink cell = embElement->getEMBCell();
293 const EMBPresamplerHVModule& hvmodule = cell->getPresamplerHVModule();
294 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata.m_hvdata_EMBPS.hvLineNo (hvmodule, igap));
295 } else {
296 const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(caloMgr->get_element(id));
297 if (!emecElement) std::abort();
298 const EMECCellConstLink cell = emecElement->getEMECCell();
299 const EMECPresamplerHVModule& hvmodule = cell->getPresamplerHVModule ();
300 for (unsigned int igap=0;igap<2;igap++) hv.insert(hvdata.m_hvdata_EMECPS.hvLineNo (hvmodule, igap));
301 }
302 }
303
304 std::vector<int> hvlines;
305 for (std::set<int>::iterator i=hv.begin();i!=hv.end();++i) hvlines.push_back(*i);
306 return hvlines;
307}
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
EMBCellConstLink getEMBCell() const
EMB Cell description from LArReadoutGeometry.
EMECCellConstLink getEMECCell() const
EMEC Cell description from LArReadoutGeometry.
const EMECHVModule & getModule() const
int hvLineNo(const EMECHVElectrode &electrode, const int &iGap) const
EMECHVModule::IOType getWheelIndex() const
const FCALTile * getFCALTile() const
FCAL Tile description from LArReadoutGeometry.
HECCellConstLink getHECCell() const
HEC Cell description from LArReadoutGeometry.

◆ initialize()

StatusCode CaloCellCalcEnergyCorr::initialize ( )
overridevirtual

Definition at line 93 of file CaloCellCalcEnergyCorr.cxx.

94{
95 if(m_calosample.size() != m_value.size() ) {
96 ATH_MSG_ERROR( "CaloSamples and SampleValues vectors not equal length !!! " );
97 return StatusCode::FAILURE;
98 }
99 if(m_hvlines.size() != m_hvvalue.size() ) {
100 ATH_MSG_ERROR( "HVLines and HVvalues vectors not equal length !!! " );
101 return StatusCode::FAILURE;
102 }
103
104// retrieve LArEM id helpers
105
106 const CaloIdManager* mgr = nullptr;
107 ATH_CHECK( detStore()->retrieve( mgr ) );
108
109 m_larem_id = mgr->getEM_ID();
110 m_larhec_id = mgr->getHEC_ID();
111 m_larfcal_id = mgr->getFCAL_ID();
112
113 ATH_CHECK( m_hvCablingKey.initialize() );
114 ATH_CHECK( m_DCSFolderKeys.initialize() );
115 ATH_CHECK( m_caloMgrKey.initialize() );
116
117 return StatusCode::SUCCESS;
118}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
const ServiceHandle< StoreGateSvc > & detStore() const
SG::ReadCondHandleKey< LArHVIdMapping > m_hvCablingKey
SG::ReadCondHandleKeyArray< CondAttrListCollection > m_DCSFolderKeys
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ 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 CaloCellCalcEnergyCorr::stop ( )
overridevirtual

Definition at line 130 of file CaloCellCalcEnergyCorr.cxx.

131{
132
133 const CaloCell_ID* calocell_id;
134 CHECK(detStore()->retrieve(calocell_id,"CaloCell_ID"));
135
136
137 IdentifierHash hashMin,hashMax;
138 if(m_calosample.size()==1 && m_calosample[0] < 0 ) {
139 calocell_id->calo_cell_hash_range(CaloCell_ID::TILE, hashMin,hashMax);
140 } else {
141 int maxsubcalo=-1;
142 for (int i=CaloCell_ID::PreSamplerB; i<=CaloCell_ID::EME3; ++i) {
143 if (std::find(m_calosample.begin(), m_calosample.end(), i) != m_calosample.end()) maxsubcalo = CaloCell_ID::LAREM;
144 }
145 for (int i=CaloCell_ID::HEC0; i<=CaloCell_ID::HEC3; ++i) {
146 if (std::find(m_calosample.begin(), m_calosample.end(), i) != m_calosample.end()) maxsubcalo = CaloCell_ID::LARHEC;
147 }
148 for (int i=CaloCell_ID::FCAL0; i<=CaloCell_ID::FCAL2; ++i) {
149 if (std::find(m_calosample.begin(), m_calosample.end(), i) != m_calosample.end()) maxsubcalo = CaloCell_ID::LARFCAL;
150 }
151 for (int i=CaloCell_ID::TileBar0; i<=CaloCell_ID::TileExt2; ++i) {
152 if (std::find(m_calosample.begin(), m_calosample.end(), i) != m_calosample.end()) maxsubcalo = CaloCell_ID::TILE;
153 }
154 if(maxsubcalo < 0 ) {
155 ATH_MSG_ERROR( "Wrong CaloSamples vector " << m_calosample );
156 return StatusCode::FAILURE;
157 } else {
158 calocell_id->calo_cell_hash_range(maxsubcalo, hashMin,hashMax);
159 }
160 }
161
162 ATH_MSG_INFO( "Working on hash range 0 to " << hashMax );
163
164 coral::AttributeListSpecification* spec = new coral::AttributeListSpecification();
165 spec->extend("CaloCondBlob16M","blob");// , cool::StorageType::Blob16M);
166 AthenaAttributeList* attrList=new AthenaAttributeList(*spec);
167 coral::Blob& blob=(*attrList)["CaloCondBlob16M"].data<coral::Blob>();
168 CaloCondBlobFlt* flt= CaloCondBlobFlt::getInstance(blob);
169 spec->release(); // deletes spec
170 // cppcheck-suppress memleak
171 spec = nullptr;
172
173 //Blob Defintion Vector
174 std::vector<std::vector<float> > defVec;
175 defVec.emplace_back(1,1);
176 flt->init(defVec,hashMax,1);
177
178 CHECK(detStore()->record(attrList,m_folder));
179
180 const LArHVManager* manager = nullptr;
181 CHECK( detStore()->retrieve (manager) );
182
183 const EventContext& ctx = Gaudi::Hive::currentContext();
184 SG::ReadCondHandle<LArHVIdMapping> hvCabling (m_hvCablingKey, ctx);
185 std::vector<const CondAttrListCollection*> attrvec;
186 for (const auto& fldkey: m_DCSFolderKeys ) {
187 SG::ReadCondHandle<CondAttrListCollection> dcsHdl(fldkey, ctx);
188 attrvec.push_back (*dcsHdl);
189 }
190
191 HVData hvdata (*manager, **hvCabling, attrvec);
192
193 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey};
194 ATH_CHECK(caloMgrHandle.isValid());
195 const CaloDetDescrManager* caloMgr = *caloMgrHandle;
196
197 std::vector<float> setVec(1,1);
198 unsigned nSet=0;
199 unsigned nSetHV=0;
200 for(unsigned h=0;h<hashMax;++h) {
201 float value=1.0;
202 std::vector<int>::const_iterator pos;
203 if ((pos = std::find(m_calosample.begin(), m_calosample.end(), calocell_id->calo_sample(h))) != m_calosample.end()) {
204 // find a position in m_calosample vector, and use this value from m_values vector
205 const std::vector<float>::size_type idx = pos - m_calosample.begin();
207 ++nSet;
208 // check if we have also HVLine for this cell
209 if(!m_hvlines.empty() && m_hvlines[0]>0) {
210 Identifier offId=calocell_id->cell_id(h);
211 std::vector<int> hvlineId = GetHVLines(hvdata, offId, caloMgr);
212 int nfound=0;
213 float hvval=-1;
214 std::vector<int>::const_iterator poshv;
215 for(unsigned i=0; i<hvlineId.size(); ++i) {
216 if ((poshv=std::find(m_hvlines.begin(), m_hvlines.end(), hvlineId[i])) != m_hvlines.end()) {
217 if (hvval<0) hvval = m_hvvalue[poshv - m_hvlines.begin()];
218 if (m_hvvalue[poshv - m_hvlines.begin()] == hvval ) ++nfound;
219 }
220 }
221 if(nfound == (int)hvlineId.size()) { // All lines of this channel has the same corr., apply
222 value *= hvval;
223 ++nSetHV;
224 }
225 }
226 }
227 setVec[0]=value;
228 flt->setData(h,0,setVec);
229 }//end loop over hash
230
231 ATH_MSG_INFO( "Found " << nSet << " channels which have a sample correction. " );
232 ATH_MSG_INFO( "Found " << nSetHV << " channels which have a HV correction. " );
233
234 return StatusCode::SUCCESS;
235}
#define ATH_MSG_INFO(x)
#define CHECK(...)
Evaluate an expression and check for errors.
std::vector< int > GetHVLines(const HVData &hvdata, const Identifier &id, const CaloDetDescrManager *caloMgr)
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
static CaloCondBlobFlt * getInstance(coral::Blob &blob)
Returns a pointer to a non-const CaloCondBlobFlt.

◆ 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_WARNING(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_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> CaloCellCalcEnergyCorr::m_caloMgrKey {this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" }
private

Definition at line 60 of file CaloCellCalcEnergyCorr.h.

61{this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };

◆ m_calosample

std::vector<int> CaloCellCalcEnergyCorr::m_calosample
private

Definition at line 50 of file CaloCellCalcEnergyCorr.h.

◆ m_DCSFolderKeys

SG::ReadCondHandleKeyArray<CondAttrListCollection> CaloCellCalcEnergyCorr::m_DCSFolderKeys
private
Initial value:
{ this, "DCSFolderNames", {"/LAR/DCS/HV/BARREl/I16", "/LAR/DCS/HV/BARREL/I8"},
"DCS folders with HV values"}

Definition at line 57 of file CaloCellCalcEnergyCorr.h.

58 { this, "DCSFolderNames", {"/LAR/DCS/HV/BARREl/I16", "/LAR/DCS/HV/BARREL/I8"},
59 "DCS folders with HV values"};

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

std::string CaloCellCalcEnergyCorr::m_folder
private

Definition at line 49 of file CaloCellCalcEnergyCorr.h.

◆ m_hvCablingKey

SG::ReadCondHandleKey<LArHVIdMapping> CaloCellCalcEnergyCorr::m_hvCablingKey {this, "LArHVIdMapping", "LArHVIdMap", "SG key for HV ID mapping"}
private

Definition at line 55 of file CaloCellCalcEnergyCorr.h.

56{this, "LArHVIdMapping", "LArHVIdMap", "SG key for HV ID mapping"};

◆ m_hvlines

std::vector<int> CaloCellCalcEnergyCorr::m_hvlines
private

Definition at line 52 of file CaloCellCalcEnergyCorr.h.

◆ m_hvvalue

std::vector<float> CaloCellCalcEnergyCorr::m_hvvalue
private

Definition at line 53 of file CaloCellCalcEnergyCorr.h.

◆ m_larem_id

const LArEM_ID* CaloCellCalcEnergyCorr::m_larem_id
private

Definition at line 64 of file CaloCellCalcEnergyCorr.h.

◆ m_larfcal_id

const LArFCAL_ID* CaloCellCalcEnergyCorr::m_larfcal_id
private

Definition at line 66 of file CaloCellCalcEnergyCorr.h.

◆ m_larhec_id

const LArHEC_ID* CaloCellCalcEnergyCorr::m_larhec_id
private

Definition at line 65 of file CaloCellCalcEnergyCorr.h.

◆ m_value

std::vector<float> CaloCellCalcEnergyCorr::m_value
private

Definition at line 51 of file CaloCellCalcEnergyCorr.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: