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

#include <LArHVCorrToSCHVCorr.h>

Inheritance diagram for LArHVCorrToSCHVCorr:
Collaboration diagram for LArHVCorrToSCHVCorr:

Public Member Functions

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

float getWeight (const LArHEC_ID *hecID, const Identifier &id, std::map< int, std::vector< float > > &wmap)
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_cablingKeySC {this,"SCCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
SG::ReadCondHandleKey< ILArHVScaleCorrm_contKey {this,"ContainerKey","LArHVScaleCorr","SG Key of regular cells HV scale corr object"}
SG::WriteCondHandleKey< LArHVCorrm_outKey {this,"OutputKey","LARSCHVScaleCorr","SG Key of produced SC HV scale corr object"}
StringProperty m_folderName {this, "OutputFolder", "/LAR/ElecCalibFlatSC/HVScaleCorr", "Output folder for CondAttrListCollection"}
StringProperty m_weightsName {this, "PhysicsWeights", "TrigT1CaloCalibUtils/HVcorrPhysicsWeights.txt", "File with layer weights"}
BooleanProperty m_isHI {this, "IsHeavyIons", false, "are we computing for HI ?"}
FloatProperty m_patchHI {this, "PatchInHeavyIons", 1.2, " value to patch "}
ToolHandle< ICaloSuperCellIDToolm_scidTool {this, "CaloSuperCellIDTool", "CaloSuperCellIDTool"}
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 21 of file LArHVCorrToSCHVCorr.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

◆ LArHVCorrToSCHVCorr()

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

Constructor with parameters:

Definition at line 21 of file LArHVCorrToSCHVCorr.cxx.

22 :
23 ::AthCondAlgorithm( name, pSvcLocator )
24{
25}

◆ ~LArHVCorrToSCHVCorr()

virtual LArHVCorrToSCHVCorr::~LArHVCorrToSCHVCorr ( )
virtualdefault

Destructor:

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.

64{
65 return 0;
66}

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

virtual StatusCode LArHVCorrToSCHVCorr::execute ( const EventContext & ) const
inlineoverridevirtual

Definition at line 34 of file LArHVCorrToSCHVCorr.h.

34{return StatusCode::SUCCESS;};

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

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
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

◆ getWeight()

float LArHVCorrToSCHVCorr::getWeight ( const LArHEC_ID * hecID,
const Identifier & id,
std::map< int, std::vector< float > > & wmap )
private

Definition at line 189 of file LArHVCorrToSCHVCorr.cxx.

189 {
190 int side = hecID->pos_neg(id);
191 int reg = hecID->region(id);
192 int eta = hecID->eta(id);
193 int ttbin=0;
194 switch(side){
195 case -2: if(reg==0) ttbin=-16-eta; else ttbin=-27-2*eta; if(ttbin==-33) ttbin=-32; break;
196 case 2: if(reg==0) ttbin=15+eta; else ttbin=25+2*eta;
197 }
198 if(ttbin!=0 && wmap.find(ttbin) != wmap.end()){
199 ATH_MSG_DEBUG("Found weight "<<wmap[ttbin][hecID->sampling(id)] <<" for "<<side<<" "<<reg<<" "<<eta);
200 return wmap[ttbin][hecID->sampling(id)];
201 } else {
202 ATH_MSG_DEBUG("Returning 1 for "<<side<<" "<<reg<<" "<<eta);
203 return 1.;
204 }
205}
Scalar eta() const
pseudorapidity method
#define ATH_MSG_DEBUG(x)
int region(const Identifier id) const
return region [0,1]
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)

◆ initialize()

StatusCode LArHVCorrToSCHVCorr::initialize ( )
overridevirtual

Definition at line 27 of file LArHVCorrToSCHVCorr.cxx.

28{
29
30 ATH_CHECK(m_scidTool.retrieve());
31 ATH_CHECK(m_cablingKeySC.initialize());
32 ATH_CHECK(m_cablingKey.initialize());
33 ATH_CHECK(m_contKey.initialize());
34 ATH_CHECK(m_outKey.initialize(!m_outKey.empty()));
35
36 return StatusCode::SUCCESS;
37}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
SG::ReadCondHandleKey< ILArHVScaleCorr > m_contKey
SG::WriteCondHandleKey< LArHVCorr > m_outKey
ToolHandle< ICaloSuperCellIDTool > m_scidTool
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey

◆ 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

◆ stop()

StatusCode LArHVCorrToSCHVCorr::stop ( )
overridevirtual

Definition at line 40 of file LArHVCorrToSCHVCorr.cxx.

41{
42
43 //Retrieve HVCorr for regular cells
44 const EventContext& ctx = Gaudi::Hive::currentContext();
45 SG::ReadCondHandle<ILArHVScaleCorr> hvHdl(m_contKey, ctx);
46 if(!hvHdl.isValid()) {
47 ATH_MSG_ERROR( "Do not have HVScaleCorr from key " << m_contKey.key() );
48 return StatusCode::FAILURE;
49 }
50
51 //Retrieve SuperCell online id
52 const LArOnline_SuperCellID* onlSCID = nullptr;
53 CHECK(detStore()->retrieve(onlSCID));
54
55 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, ctx};
56 const LArOnOffIdMapping* cabling{*cablingHdl};
57 if(!cabling) {
58 ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_cablingKey.key() );
59 return StatusCode::FAILURE;
60 }
61
62 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdlSC{m_cablingKeySC, ctx};
63 const LArOnOffIdMapping* cablingSC{*cablingHdlSC};
64 if(!cablingSC) {
65 ATH_MSG_ERROR( "Do not have cabling mapping from key " << m_cablingKeySC.key() );
66 return StatusCode::FAILURE;
67 }
68
69 const CaloCell_SuperCell_ID* calosccellID=nullptr;
70 ATH_CHECK( detStore()->retrieve (calosccellID, "CaloCell_SuperCell_ID") );
71 const unsigned hashMax=calosccellID->calo_cell_hash_max();
72 ATH_MSG_INFO("SuperCell hash max: " << hashMax);
73
74 // get the HEC layer weights
75 std::string file = PathResolver::find_file (m_weightsName.value(), "JOBOPTSEARCHPATH");
76 ATH_MSG_INFO( "Reading file " << file << " configured: " << m_weightsName.value() );
77 std::ifstream fin(file.c_str());
78 if (!fin.is_open()) {
79 ATH_MSG_ERROR( "Could not open input file " << file );
80 return StatusCode::FAILURE;
81 }
82 std::string line;
83 int ttbin;
84 float em0,em1,em2,em3,em4;
85 float had0,had1,had2,had3;
86 std::map<int,std::vector<float> > wmap;
87 while (std::getline(fin, line)){
88 int nread = sscanf(line.c_str(), "%d %f %f %f %f %f %f %f %f %f",
89 &ttbin,&em0,&em1,&em2,&em3,&em4,&had0,&had1,&had2,&had3);
90 if(nread != 10) continue;
91 wmap[ttbin]=std::vector<float>{had0,had1,had2,had3};
92 }
93 // need also online ID helper
94 const LArHEC_ID* hecID = nullptr;
95 ATH_CHECK(detStore()->retrieve(hecID,"LArHEC_ID"));
96
97 //Set up AttributeListCollection
98 coral::AttributeListSpecification* spec = new coral::AttributeListSpecification();
99 spec->extend("HVScaleCorr", "blob");
100 spec->extend<unsigned>("version");
101
102 coral::AttributeList attrList(*spec);
103 attrList["version"].setValue(0U);
104 coral::Blob& hvBlob=attrList["HVScaleCorr"].data<coral::Blob>();
105
106 spec->release();
107 // cppcheck-suppress memleak
108 spec = nullptr;
109
110 // Important, blob is ordered by LAr online hash, but LArHVCorr by cell offline hash !!!!
111 hvBlob.resize(onlSCID->channelHashMax()*sizeof(float));
112
113 float *pHV=static_cast<float*>(hvBlob.startingAddress());
114 std::vector<float> vScale;
115 //Initialize blobs to ERRORCODE
116 for (unsigned i=0;i<onlSCID->channelHashMax();++i) {
118 }
119 if(!m_outKey.empty()) vScale.resize(hashMax,(float)1.0);
120
121 unsigned nFilledIds=0;
122 unsigned nTotalIds=0;
123 for (unsigned i=0; i < hashMax; ++i) {
124 if(calosccellID->sub_calo(IdentifierHash(i)) > 2) continue; // not a LAr channel
125 const Identifier scId=calosccellID->cell_id(IdentifierHash(i));
126 nTotalIds += 1;
127 const std::vector<Identifier> &cellIds=m_scidTool->superCellToOfflineID(scId);
128 if (cellIds.empty()) {
129 ATH_MSG_ERROR("Got empty vector of cell ids for super cell id 0x"
130 << std::hex << scId.get_compact()<<std::dec);
131 return StatusCode::FAILURE;
132 }
133 float hvcorr=0.;
134 float weight=1.;
135 float wsum=0.;
136 for(const Identifier cellId : cellIds) {
137 if(hecID->is_lar_hec(cellId)) { // find a weight
138 weight = getWeight(hecID,cellId,wmap);
139 }
140 hvcorr += weight * hvHdl->HVScaleCorr(cabling->createSignalChannelID(cellId));
141 wsum += weight;
142 }
143 if(wsum>0.) hvcorr /= wsum;
144 nFilledIds += 1;
145 if (m_isHI) {
146 // Hack for excessive corr. in EMBC
147 // this part is eventually needed for HI running
148 //if(hvcorr >= 1.6 && calosccellID->is_em_barrel(scId) ) {
149 if(hvcorr >= 1.6 ) {
150 ATH_MSG_INFO("Set manually HVCorr to "<<m_patchHI<<" for SC "<< scId.get_identifier32().get_compact()<<" "<<calosccellID->cell_name(scId));
151 ATH_MSG_INFO( calosccellID->is_em_barrel(scId) << " " << calosccellID->pos_neg(scId));
152 hvcorr=m_patchHI;
153 }
154 }
155
156 // Important, blob is ordered by LAr online hash, but LArHVCorr by cell offline hash !!!!
157 pHV[onlSCID->channel_Hash(cablingSC->createSignalChannelID(scId))]=hvcorr;
158
159 if(!m_outKey.empty()) vScale[i]=hvcorr;
160
161 }//end loop over super-cell hash
162
163 //Add to collection
164 CondAttrListCollection* coll=new CondAttrListCollection(true);
165 CHECK(detStore()->record(coll,m_folderName));
166 coll->add(0,attrList);
167
168 ATH_MSG_INFO("Total number of SuperCells:" << nTotalIds << ", filled:" << nFilledIds);
169
170 if(!m_outKey.empty()) {
171 SG::WriteCondHandle<LArHVCorr> writeHandle{m_outKey, ctx};
172 const EventIDRange fullRange=IOVInfiniteRange::infiniteMixed();
173 writeHandle.addDependency (fullRange);
174 writeHandle.addDependency(hvHdl);
175 writeHandle.addDependency(cablingHdl);
176 writeHandle.addDependency(cablingHdlSC);
177
178 auto scHvCorr = std::make_unique<LArHVCorr>(std::move(vScale), cablingSC, calosccellID);
179 if (writeHandle.record(std::move(scHvCorr)).isFailure()) {
180 ATH_MSG_ERROR("Could not record LArHVCorr object with " << m_outKey.key()
181 << " with EventRange " << writeHandle.getRange() << " into Conditions Store");
182 return StatusCode::FAILURE;
183 }
184 ATH_MSG_INFO("Recorded new " << writeHandle.key() << " with range " << writeHandle.getRange() << " into Conditions Store");
185 }
186 return StatusCode::SUCCESS;
187}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define CHECK(...)
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
bool is_lar_hec(Identifier id) const
std::string cell_name(const Identifier id) const
Returns the cell-location in a human readable form.
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
size_type calo_cell_hash_max() const
cell 'global' hash table max size
int pos_neg(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
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,...
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
static EventIDRange infiniteMixed()
Produces an mixed EventIDRange that is infinite in Time and RunLumi.
value_type get_compact() const
Get the compact id.
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
float getWeight(const LArHEC_ID *hecID, const Identifier &id, std::map< int, std::vector< float > > &wmap)
StringProperty m_folderName
StringProperty m_weightsName
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
size_type channelHashMax() const
Define channel hash tables max size.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
const std::string & key() const
void addDependency(const EventIDRange &range)
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
TFile * file

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

77{
78 return BaseAlg::sysExecute (ctx);
79}

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

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

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> LArHVCorrToSCHVCorr::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
private

Definition at line 40 of file LArHVCorrToSCHVCorr.h.

40{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};

◆ m_cablingKeySC

SG::ReadCondHandleKey<LArOnOffIdMapping> LArHVCorrToSCHVCorr::m_cablingKeySC {this,"SCCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"}
private

Definition at line 39 of file LArHVCorrToSCHVCorr.h.

39{this,"SCCablingKey","LArOnOffIdMapSC","SG Key of SC LArOnOffIdMapping object"};

◆ m_contKey

SG::ReadCondHandleKey<ILArHVScaleCorr> LArHVCorrToSCHVCorr::m_contKey {this,"ContainerKey","LArHVScaleCorr","SG Key of regular cells HV scale corr object"}
private

Definition at line 41 of file LArHVCorrToSCHVCorr.h.

41{this,"ContainerKey","LArHVScaleCorr","SG Key of regular cells HV scale corr object"};

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

StringProperty LArHVCorrToSCHVCorr::m_folderName {this, "OutputFolder", "/LAR/ElecCalibFlatSC/HVScaleCorr", "Output folder for CondAttrListCollection"}
private

Definition at line 45 of file LArHVCorrToSCHVCorr.h.

45{this, "OutputFolder", "/LAR/ElecCalibFlatSC/HVScaleCorr", "Output folder for CondAttrListCollection"};

◆ m_isHI

BooleanProperty LArHVCorrToSCHVCorr::m_isHI {this, "IsHeavyIons", false, "are we computing for HI ?"}
private

Definition at line 49 of file LArHVCorrToSCHVCorr.h.

49{this, "IsHeavyIons", false, "are we computing for HI ?"};

◆ m_outKey

SG::WriteCondHandleKey<LArHVCorr> LArHVCorrToSCHVCorr::m_outKey {this,"OutputKey","LARSCHVScaleCorr","SG Key of produced SC HV scale corr object"}
private

Definition at line 43 of file LArHVCorrToSCHVCorr.h.

43{this,"OutputKey","LARSCHVScaleCorr","SG Key of produced SC HV scale corr object"};

◆ m_patchHI

FloatProperty LArHVCorrToSCHVCorr::m_patchHI {this, "PatchInHeavyIons", 1.2, " value to patch "}
private

Definition at line 50 of file LArHVCorrToSCHVCorr.h.

50{this, "PatchInHeavyIons", 1.2, " value to patch "};

◆ m_scidTool

ToolHandle<ICaloSuperCellIDTool> LArHVCorrToSCHVCorr::m_scidTool {this, "CaloSuperCellIDTool", "CaloSuperCellIDTool"}
private

Definition at line 52 of file LArHVCorrToSCHVCorr.h.

52{this, "CaloSuperCellIDTool", "CaloSuperCellIDTool"};

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

◆ m_weightsName

StringProperty LArHVCorrToSCHVCorr::m_weightsName {this, "PhysicsWeights", "TrigT1CaloCalibUtils/HVcorrPhysicsWeights.txt", "File with layer weights"}
private

Definition at line 47 of file LArHVCorrToSCHVCorr.h.

47{this, "PhysicsWeights", "TrigT1CaloCalibUtils/HVcorrPhysicsWeights.txt", "File with layer weights"};

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