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

This algorithm allows to read autocorrs from ntuples and builds a Version for standard Ntuple, produced by LArCalibTools algos.... More...

#include <LArAutoCorrFromStdNtuple.h>

Inheritance diagram for LArAutoCorrFromStdNtuple:
Collaboration diagram for LArAutoCorrFromStdNtuple:

Public Member Functions

virtual ~LArAutoCorrFromStdNtuple ()
virtual StatusCode initialize () override
 implements IAlgorithm::initialize()
virtual StatusCode execute (const EventContext &) const override
 implements IAlgorithm::execute() : Does nothing
virtual StatusCode stop () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
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
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

IntegerProperty m_nsamples { this, "Nsamples", 7 }
StringArrayProperty m_root_file_names { this, "FileNames", {} }
 list of input ntuple file names
StringProperty m_ntuple_name { this, "NtupleName", "AUTOCORR" }
 ntuple name
StringProperty m_store_key { this, "StoreKey", "FromStdNtuple" }
 key of the LArAutoCorr collection in Storegate
StringProperty m_groupingType { this, "GroupingType", "ExtendedSubDetector" }
 Grouping type.
BooleanProperty m_isComplete { this, "isComplete", false }
 type
BooleanProperty m_sFcal { this, "doSFcal", false }
 drop FCAL and change to sFCal
SG::ReadCondHandleKey< LArMCSymm_mcSymKey {this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object"}
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
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

This algorithm allows to read autocorrs from ntuples and builds a Version for standard Ntuple, produced by LArCalibTools algos....

With hardcoded numbers for sFcal

Definition at line 24 of file LArAutoCorrFromStdNtuple.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

◆ ~LArAutoCorrFromStdNtuple()

LArAutoCorrFromStdNtuple::~LArAutoCorrFromStdNtuple ( )
virtualdefault

Member Function Documentation

◆ 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 LArAutoCorrFromStdNtuple::execute ( const EventContext & ) const
inlineoverridevirtual

implements IAlgorithm::execute() : Does nothing

Definition at line 36 of file LArAutoCorrFromStdNtuple.h.

36{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 & AthCommonAlgorithm< 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 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode LArAutoCorrFromStdNtuple::initialize ( )
overridevirtual

implements IAlgorithm::initialize()

Definition at line 64 of file LArAutoCorrFromStdNtuple.cxx.

65{
66 ATH_CHECK ( m_mcSymKey.initialize() );
67 ATH_CHECK ( m_cablingKey.initialize() );
68
69 return StatusCode::SUCCESS ;
70}
#define ATH_CHECK
Evaluate an expression and check for errors.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< LArMCSym > m_mcSymKey

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

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ 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 AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ stop()

StatusCode LArAutoCorrFromStdNtuple::stop ( )
overridevirtual

Definition at line 73 of file LArAutoCorrFromStdNtuple.cxx.

74{
75
76 ATH_MSG_INFO ( "... in stop()" );
77
78 const EventContext& ctx = Gaudi::Hive::currentContext();
79 SG::ReadCondHandle<LArMCSym> mcsym (m_mcSymKey, ctx);
80
81 // get LArOnlineID helper
82 const LArOnlineID* onlineHelper = nullptr;
83 ATH_CHECK( detStore()->retrieve(onlineHelper, "LArOnlineID") );
84 // and helper for FCAL
85 const CaloCell_ID* idHelper = nullptr;
86 ATH_CHECK( detStore()->retrieve (idHelper, "CaloCell_ID") );
87 const LArFCAL_ID* fcal_id = idHelper->fcal_idHelper();
88
89 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, ctx};
90 const LArOnOffIdMapping* cabling{*cablingHdl};
91 if(!cabling) {
92 ATH_MSG_ERROR( "Do not have mapping from cabling key " << m_cablingKey.key() );
93 return StatusCode::FAILURE;
94 }
95
96 TChain* outfit = new TChain(m_ntuple_name.value().c_str());
97 for (const std::string& s : m_root_file_names) {
98 outfit->Add(s.c_str());
99 }
100
101
102 Int_t det;
103 Int_t channelId;
104 Int_t FT, slot, channel;
105
106 Float_t covr[100]; // The function
107 Int_t gain = 0; // LARHIGHGAIN = 0, LARMEDIUMGAIN = 1, LARLOWGAIN = 2,
108
109 outfit->SetBranchAddress("channelId", &channelId);
110 outfit->SetBranchAddress("FT", &FT);
111 outfit->SetBranchAddress("slot", &slot);
112 outfit->SetBranchAddress("channel", &channel);
113 outfit->SetBranchAddress("detector", &det);
114 outfit->SetBranchAddress("gain", &gain);
115 outfit->SetBranchAddress("covr", covr);
116
117 // Create new LArAutocorrContainer
118 std::unique_ptr<LArAutoCorrComplete> larAutoCorrComplete;
119 std::unique_ptr<LArAutoCorrMC> larAutoCorrMC;
120
121 if(m_isComplete) {
122 larAutoCorrComplete = std::make_unique<LArAutoCorrComplete>();
123 ATH_CHECK( larAutoCorrComplete->setGroupingType(m_groupingType, msg()) );
124 ATH_CHECK( larAutoCorrComplete->initialize() );
125 } else {
126 larAutoCorrMC = std::make_unique<LArAutoCorrMC>();
127 ATH_CHECK( larAutoCorrMC->setGroupingType(m_groupingType, msg()) );
128 ATH_CHECK( larAutoCorrMC->initialize() );
129 }
130
131 typedef std::vector<float> AutoCorrVec;
132 std::map<std::pair<unsigned int,int>, AutoCorrVec> AutoCorr;
133 unsigned int hwid;
135 if(nsamples>100) nsamples=100;
136 ATH_MSG_INFO( "Using " << nsamples << " samples" );
137 // loop over entries in the Tuple, one entry = one channel
138 // first create a map from existing entries, will fill container later
139 Long64_t nentries = outfit->GetEntries();
140 for ( Long64_t iev = 0; iev < nentries; ++iev )
141 {
142 outfit->GetEvent(iev);
143 ATH_MSG_DEBUG ( " Chan " << std::hex << channelId << " det. "<< det << std::dec );
144
145 hwid = channelId;
146 HWIdentifier id(hwid);
147
148 if(FT != onlineHelper->feedthrough(id) || slot != onlineHelper->slot(id) || channel != onlineHelper->channel(id)) {
149 ATH_MSG_ERROR ( "Inconsistency in decoding HWID !!!!" );
150 ATH_MSG_ERROR ( FT << " - " << onlineHelper->feedthrough(id) );
151 ATH_MSG_ERROR ( slot << " - " << onlineHelper->slot(id) );
152 ATH_MSG_ERROR ( channel << " - " << onlineHelper->channel(id) );
153 continue;
154 }
155
156 if(!m_isComplete) {
157 if (id != mcsym->ZPhiSymOnl(id) ) {
158 ATH_MSG_DEBUG( "Symmetrized, not stored" );
159 continue;
160 }
161 }
162
163 AutoCorrVec av(nsamples);
164 for (int i = 0; i < nsamples; ++i ) {
165 av[i]=covr[i];
166 }
167
168 AutoCorr[{hwid,gain}]= std::move(av);
169
170 ATH_MSG_DEBUG ( "after reading size " << AutoCorr[std::make_pair(hwid,gain)].size() );
171
172 }
173
174 ATH_MSG_INFO ( "Ntuple read out, going to store. Have " << AutoCorr.size() << " numbers" );
175
176 // could fill only now
177 std::map<std::pair<unsigned int,int>, AutoCorrVec>::iterator ibeg = AutoCorr.begin();
178 std::map<std::pair<unsigned int,int>, AutoCorrVec>::iterator iend = AutoCorr.end();
179 unsigned int count=0;
180 for(;ibeg != iend; ++ibeg) {
181 ATH_MSG_DEBUG ( " Chan " << std::hex << (ibeg->first).first << std::dec );
182 if(m_sFcal) {
183 HWIdentifier id((ibeg->first).first);
184 // doesn't work:
185 //if(onlineHelper->isFCALchannel(id) && onlineHelper->feedthrough(id) == 6) {
186 if(onlineHelper->barrel_ec(id)==1 && onlineHelper->feedthrough(id) == 6) {
187 ATH_MSG_INFO ( "Not storing FCAL channel " << onlineHelper->channel_name(id) );
188 continue;
189 }
190 }
191
192 ATH_MSG_DEBUG( "Storing length " << (ibeg->second).size() );
193 if(!m_isComplete) {
194 larAutoCorrMC->set(HWIdentifier((ibeg->first).first),(ibeg->first).second, ibeg->second);
195 } else {
196 larAutoCorrComplete->set(HWIdentifier((ibeg->first).first),(ibeg->first).second, ibeg->second);
197 }
198 ++count;
199 }
200
201 ATH_MSG_INFO ( "Storing old values done...." << count << " values copied..." );
202
203 count = 0;
204 if(m_sFcal) { // now add sFcal
205 int limit = nsamples;
206 if(limit > 31) limit = 31;
207 AutoCorrVec myvec(limit);
208 ATH_MSG_INFO( "Using limit " << limit );
209 for (const HWIdentifier chid: onlineHelper->channel_range()) {
210 if(!m_isComplete) {
211 if (chid != mcsym->ZPhiSymOnl(chid) ) {
212 ATH_MSG_DEBUG( "Symmetrized, not stored" );
213 continue;
214 }
215 }
216 //if(onlineHelper->isFCALchannel(chid)) {
217 if(onlineHelper->barrel_ec(chid)==1 && onlineHelper->feedthrough(chid) >= 25 && onlineHelper->feedthrough(chid) < 28 ) {
218 ATH_MSG_DEBUG ( "Adding sFCAL channel " << onlineHelper->channel_name(chid) );
219 const int mod=fcal_id->module(cabling->cnvToIdentifier(chid));
220 if(mod<0 || mod > 3) {
221 ATH_MSG_ERROR ( "Wrong FCAL module: " << mod << " ignored !!" );
222 continue;
223 }
224 for(int mygain=0; mygain<3; ++mygain) {
225 for(int i=0;i<limit;++i) myvec[i]=sFcalcovr[i][mod-1];
226 if(m_isComplete) {
227 larAutoCorrComplete->set(chid,mygain,myvec);
228 } else {
229 larAutoCorrMC->set(chid,mygain,myvec);
230 }
231 }
232 ATH_MSG_DEBUG ( "sFcal storing size " << myvec.size() );
233 ++count;
234 }
235 }
236 ATH_MSG_INFO ( "Adding " << count << " sFcal values ..." );
237
238 }
239
240 if(m_isComplete) {
241 ATH_CHECK( detStore()->record(std::move(larAutoCorrComplete),m_store_key) );
242 } else {
243 ATH_MSG_INFO ( "Stored container " << larAutoCorrMC->nGains() << "gains, " << larAutoCorrMC->totalNumberOfConditions() << " conditions, key: " << m_store_key );
244 ATH_CHECK( detStore()->record(std::move(larAutoCorrMC),m_store_key) );
245 }
246
247 return StatusCode::SUCCESS;
248}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
const float sFcalcovr[31][3]
size_t size() const
Number of registered mappings.
const ServiceHandle< StoreGateSvc > & detStore() const
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
Definition CaloCell_ID.h:75
StringProperty m_groupingType
Grouping type.
StringProperty m_ntuple_name
ntuple name
StringArrayProperty m_root_file_names
list of input ntuple file names
StringProperty m_store_key
key of the LArAutoCorr collection in Storegate
BooleanProperty m_sFcal
drop FCAL and change to sFCal
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
id_range channel_range() const
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:148

◆ sysExecute()

StatusCode AthCommonAlgorithm< 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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< 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 AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
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> LArAutoCorrFromStdNtuple::m_cablingKey {this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"}
private

Definition at line 57 of file LArAutoCorrFromStdNtuple.h.

57{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping 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 AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_groupingType

StringProperty LArAutoCorrFromStdNtuple::m_groupingType { this, "GroupingType", "ExtendedSubDetector" }
private

Grouping type.

Definition at line 49 of file LArAutoCorrFromStdNtuple.h.

49{ this, "GroupingType", "ExtendedSubDetector" };

◆ m_isComplete

BooleanProperty LArAutoCorrFromStdNtuple::m_isComplete { this, "isComplete", false }
private

type

Definition at line 51 of file LArAutoCorrFromStdNtuple.h.

51{ this, "isComplete", false };

◆ m_mcSymKey

SG::ReadCondHandleKey<LArMCSym> LArAutoCorrFromStdNtuple::m_mcSymKey {this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object"}
private

Definition at line 55 of file LArAutoCorrFromStdNtuple.h.

56{this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym object"};

◆ m_nsamples

IntegerProperty LArAutoCorrFromStdNtuple::m_nsamples { this, "Nsamples", 7 }
private

Definition at line 41 of file LArAutoCorrFromStdNtuple.h.

41{ this, "Nsamples", 7 };

◆ m_ntuple_name

StringProperty LArAutoCorrFromStdNtuple::m_ntuple_name { this, "NtupleName", "AUTOCORR" }
private

ntuple name

Definition at line 45 of file LArAutoCorrFromStdNtuple.h.

45{ this, "NtupleName", "AUTOCORR" };

◆ m_root_file_names

StringArrayProperty LArAutoCorrFromStdNtuple::m_root_file_names { this, "FileNames", {} }
private

list of input ntuple file names

Definition at line 43 of file LArAutoCorrFromStdNtuple.h.

43{ this, "FileNames", {} };

◆ m_sFcal

BooleanProperty LArAutoCorrFromStdNtuple::m_sFcal { this, "doSFcal", false }
private

drop FCAL and change to sFCal

Definition at line 53 of file LArAutoCorrFromStdNtuple.h.

53{ this, "doSFcal", false };

◆ m_store_key

StringProperty LArAutoCorrFromStdNtuple::m_store_key { this, "StoreKey", "FromStdNtuple" }
private

key of the LArAutoCorr collection in Storegate

Definition at line 47 of file LArAutoCorrFromStdNtuple.h.

47{ this, "StoreKey", "FromStdNtuple" };

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