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

This algorithm allows to read wave forms from ntuples and builds a LArPhysWaveContainer containing the corresponding PhysWave. More...

#include <LArShapeFromStdNtuple.h>

Inheritance diagram for LArShapeFromStdNtuple:
Collaboration diagram for LArShapeFromStdNtuple:

Public Member Functions

virtual ~LArShapeFromStdNtuple ()
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &) const override
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

UnsignedIntegerProperty m_skipPoints { this, "SkipPoints", 0 }
 the first m_skipPoints points of the waveform in the ntuple are skipped
UnsignedIntegerProperty m_prefixPoints { this, "PrefixPoints", 0 }
 make a Shape with the first m_prefixPoints as zeros
StringArrayProperty m_root_file_names { this, "FileNames", {} }
 list of input ntuple file names
StringProperty m_ntuple_name { this, "NtupleName", "SHAPE" }
 ntuple name
StringProperty m_store_key { this, "StoreKey", "FromStdNtuple" }
 key of the LArShape collection in Storegate
StringProperty m_groupingType { this, "GroupingType", "ExtendedSubDetector" }
 Grouping type.
BooleanProperty m_isComplete { this, "isComplete", false }
 Shape type.
bool m_done = false
SG::ReadCondHandleKey< LArMCSymm_mcSymKey {this, "MCSymKey", "LArMCSym", "SG Key of LArMCSym 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 wave forms from ntuples and builds a LArPhysWaveContainer containing the corresponding PhysWave.

Version for standard Ntuple, produced by LArCalibTools algos....

Definition at line 22 of file LArShapeFromStdNtuple.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

◆ ~LArShapeFromStdNtuple()

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

Definition at line 31 of file LArShapeFromStdNtuple.h.

31{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 LArShapeFromStdNtuple::initialize ( )
overridevirtual

Definition at line 28 of file LArShapeFromStdNtuple.cxx.

29{
30 ATH_CHECK ( m_mcSymKey.initialize() );
31 return StatusCode::SUCCESS ;
32}
#define ATH_CHECK
Evaluate an expression and check for errors.
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 LArShapeFromStdNtuple::stop ( )
overridevirtual

Definition at line 35 of file LArShapeFromStdNtuple.cxx.

36{
37 if(m_done) return StatusCode::SUCCESS;
38
39 ATH_MSG_INFO ( "... in stop()" );
40
41 const EventContext& ctx = Gaudi::Hive::currentContext();
42 SG::ReadCondHandle<LArMCSym> mcsym (m_mcSymKey, ctx);
43
44 // get LArOnlineID helper
45 const LArOnlineID* onlineHelper = nullptr;
46 ATH_CHECK( detStore()->retrieve(onlineHelper, "LArOnlineID") );
47
48 TChain* outfit = new TChain(m_ntuple_name.value().c_str());
49 for (const std::string& s : m_root_file_names) {
50 outfit->Add(s.c_str());
51 }
52
53
54 Int_t phase=0;
55 Int_t det=0;
56 Float_t phaseTime=0;
57 Float_t timeOffset=0;
58 Int_t channelId=0;
59 Int_t FT=0, slot=0, channel=0;
60
61 Float_t Shape[2000]; // The function
62 Float_t ShapeDer[2000]; // The function
63 Int_t gain = 0; // LARHIGHGAIN = 0, LARMEDIUMGAIN = 1, LARLOWGAIN = 2,
64 Int_t nsamples=0;
65
66 outfit->SetBranchAddress("channelId", &channelId);
67 outfit->SetBranchAddress("FT", &FT);
68 outfit->SetBranchAddress("slot", &slot);
69 outfit->SetBranchAddress("channel", &channel);
70 outfit->SetBranchAddress("detector", &det);
71 if(m_isComplete) {
72 outfit->SetBranchAddress("PhaseTime", &phaseTime);
73 outfit->SetBranchAddress("Phase", &phase);
74 outfit->SetBranchAddress("timeOffset", &timeOffset);
75 }
76 outfit->SetBranchAddress("nSamples", &nsamples);
77 outfit->SetBranchAddress("Gain", &gain);
78 outfit->SetBranchAddress("Shape", Shape);
79 outfit->SetBranchAddress("ShapeDer", ShapeDer);
80
81 Float_t timeBinWidth=-1, prevTime=-1, timeOff=-1;
82 Int_t prevPhase=-1;
83
84 // Create new LArShapeContainer
85 std::unique_ptr<LArShapeComplete> larShapeComplete;
86 std::unique_ptr<LArShape32MC> larShapeMC;
87
88 if(m_isComplete) {
89 larShapeComplete = std::make_unique<LArShapeComplete>();
90 ATH_CHECK( larShapeComplete->setGroupingType(m_groupingType, msg()) );
91 ATH_CHECK( larShapeComplete->initialize() );
92 } else {
93 larShapeMC = std::make_unique<LArShape32MC>();
94 ATH_CHECK( larShapeMC->setGroupingType(m_groupingType, msg()) );
95 ATH_CHECK( larShapeMC->initialize() );
96 }
97
98 std::vector<float> shapemc;
99 std::vector<float> shape_dermc;
100 typedef std::vector<std::vector<float> > wave2d;
101 std::map<std::pair<unsigned int,int>, wave2d> shape;
102 std::map<std::pair<unsigned int,int>, wave2d> shape_der;
103 unsigned int hwid;
104 // loop over entries in the Tuple, one entry = one channel
105 Long64_t nentries = outfit->GetEntries();
106 for ( Long64_t iev = 0; iev < nentries; ++iev )
107 {
108 outfit->GetEvent(iev);
109 ATH_MSG_INFO ( " Chan " << std::hex << channelId << " det. "<< det << std::dec );
110
111 hwid = channelId;
112 //if (det != 4) hwid = (channelId<<4);
113 HWIdentifier id(hwid);
114
115 /*
116 if(FT != onlineHelper->feedthrough(id) || slot != onlineHelper->slot(id) || channel != onlineHelper->channel(id)) {
117 ATH_MSG_ERROR ( "Inconsistency in decoding HWID !!!!" );
118 ATH_MSG_INFO ( "Trying to fix..." );
119 hwid = (channelId<<4);
120 id=HWIdentifier(hwid);
121 */
122 if(FT != onlineHelper->feedthrough(id) || slot != onlineHelper->slot(id) || channel != onlineHelper->channel(id)) {
123 ATH_MSG_ERROR ( "Inconsistency in decoding HWID !!!!" );
124 ATH_MSG_ERROR ( FT << " - " << onlineHelper->feedthrough(id) );
125 ATH_MSG_ERROR ( slot << " - " << onlineHelper->slot(id) );
126 ATH_MSG_ERROR ( channel << " - " << onlineHelper->channel(id) );
127 //if(det == 4) {
128 // ATH_MSG_ERROR ( "Ignoring for sFcal" );
129 //} else {
130 // ATH_MSG_ERROR ( "Not creating Shape !!!!" );
131 // continue;
132 // }
133 continue;
134 /* }
135 ATH_MSG_INFO ( "Fixed....." );
136 */
137 }
138
139 // Catch potential array index out of range error.
140 if ( nsamples >= 2000 ) {
141 ATH_MSG_ERROR ( " Too many points specified vs the expected content of the ntuple ! " );
142 ATH_MSG_ERROR ( "Not creating Shape !!!!" );
143 continue;
144 } else {
145 ATH_MSG_DEBUG ( "Working with " << nsamples << " samples" );
146 }
147 if(timeBinWidth < 0) {
148 if(prevTime < 0) {
149 prevTime=phaseTime;
150 prevPhase=phase;
151 } else {
152 if(abs(phase-prevPhase) == 1) {
153 timeBinWidth=std::fabs(phaseTime - prevTime);
154 }
155 }
156 }
157
158 if(timeOff < 0) timeOff=timeOffset;
159
160 if(m_isComplete) {
161 if(shape[std::make_pair(hwid,gain)].empty()) shape[std::make_pair(hwid,gain)].reserve(50);
162 if(shape_der[std::make_pair(hwid,gain)].empty()) shape_der[std::make_pair(hwid,gain)].reserve(50);
163 shape[std::make_pair(hwid,gain)][phase].reserve(nsamples);
164 shape_der[std::make_pair(hwid,gain)][phase].reserve(nsamples);
165 for(int i=0;i<nsamples; ++i) {shape[std::make_pair(hwid,gain)][phase][i]=0.;
166 shape_der[std::make_pair(hwid,gain)][phase][i]=0.;}
167 } else {
168 shapemc.resize(nsamples);
169 shape_dermc.resize(nsamples);
170 for(int i=0;i<nsamples; ++i) {shapemc[i]=0.; shape_dermc[i]=0.;}
171 }
172 unsigned int skipped = 0;
173 unsigned int limit = nsamples;
175 for ( unsigned int i = 0; i < limit; i++ ) {
176 if ( skipped >= m_skipPoints ) {
177 if(m_isComplete) { // accumulate into map
178 shape[std::make_pair(hwid,gain)][phase][i-m_skipPoints+m_prefixPoints]=Shape[i];
179 shape_der[std::make_pair(hwid,gain)][phase][i-m_skipPoints+m_prefixPoints]=ShapeDer[i];
180
181 } else {
182 shapemc[i-m_skipPoints+m_prefixPoints]=Shape[i];
183 shape_dermc[i-m_skipPoints+m_prefixPoints]=ShapeDer[i];
184 }
185 } else skipped++;
186 }
187
188 if(!m_isComplete) {
189 if (id != mcsym->ZPhiSymOnl(id) ) {
190 ATH_MSG_INFO( "Symmetrized, not stored" );
191 } else {
192
193 ATH_MSG_INFO( "Storing shape with length: " << shapemc.size() );
194
195 //LArShapeP1 t(shapemc,shape_dermc);
196
197 //larShapeMC->setPdata(id, LArShapeP1(shapemc,shape_dermc),gain);
198 larShapeMC->set(id, gain, shapemc, shape_dermc);
199 ATH_MSG_INFO( larShapeMC->Shape(id,gain).size() << " " << larShapeMC->ShapeDer(id,gain).size() );
200 ATH_MSG_INFO( "Shape[2] =" << larShapeMC->Shape(id,gain)[2] << "shapemc[2] =" << shapemc[2] );
201 }
202 }
203
204 }
205 // for complete, could fill only now
206 if(m_isComplete){
207 std::map<std::pair<unsigned int,int>, wave2d>::iterator ibeg = shape.begin();
208 std::map<std::pair<unsigned int,int>, wave2d>::iterator iend = shape.end();
209 for(;ibeg != iend; ++ibeg) {
210 larShapeComplete->set(HWIdentifier((ibeg->first).first),(ibeg->first).second,
211 ibeg->second, shape_der[std::make_pair((ibeg->first).first, (ibeg->first).second)],
212 timeOff,timeBinWidth);
213 }
214 }
215
216 if(m_isComplete) {
217 ATH_CHECK( detStore()->record(std::move(larShapeComplete),m_store_key) );
218 } else {
219 ATH_CHECK( detStore()->record(std::move(larShapeMC),m_store_key) );
220 }
221 return StatusCode::SUCCESS;
222}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
static const Attributes_t empty
const ServiceHandle< StoreGateSvc > & detStore() const
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 channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
StringProperty m_ntuple_name
ntuple name
UnsignedIntegerProperty m_skipPoints
the first m_skipPoints points of the waveform in the ntuple are skipped
UnsignedIntegerProperty m_prefixPoints
make a Shape with the first m_prefixPoints as zeros
StringArrayProperty m_root_file_names
list of input ntuple file names
StringProperty m_store_key
key of the LArShape collection in Storegate
BooleanProperty m_isComplete
Shape type.
StringProperty m_groupingType
Grouping type.

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

bool LArShapeFromStdNtuple::m_done = false
private

Definition at line 50 of file LArShapeFromStdNtuple.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 LArShapeFromStdNtuple::m_groupingType { this, "GroupingType", "ExtendedSubDetector" }
private

Grouping type.

Definition at line 46 of file LArShapeFromStdNtuple.h.

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

◆ m_isComplete

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

Shape type.

Definition at line 48 of file LArShapeFromStdNtuple.h.

48{ this, "isComplete", false };

◆ m_mcSymKey

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

Definition at line 52 of file LArShapeFromStdNtuple.h.

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

◆ m_ntuple_name

StringProperty LArShapeFromStdNtuple::m_ntuple_name { this, "NtupleName", "SHAPE" }
private

ntuple name

Definition at line 42 of file LArShapeFromStdNtuple.h.

42{ this, "NtupleName", "SHAPE" };

◆ m_prefixPoints

UnsignedIntegerProperty LArShapeFromStdNtuple::m_prefixPoints { this, "PrefixPoints", 0 }
private

make a Shape with the first m_prefixPoints as zeros

Definition at line 38 of file LArShapeFromStdNtuple.h.

38{ this, "PrefixPoints", 0 };

◆ m_root_file_names

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

list of input ntuple file names

Definition at line 40 of file LArShapeFromStdNtuple.h.

40{ this, "FileNames", {} };

◆ m_skipPoints

UnsignedIntegerProperty LArShapeFromStdNtuple::m_skipPoints { this, "SkipPoints", 0 }
private

the first m_skipPoints points of the waveform in the ntuple are skipped

Definition at line 36 of file LArShapeFromStdNtuple.h.

36{ this, "SkipPoints", 0 };

◆ m_store_key

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

key of the LArShape collection in Storegate

Definition at line 44 of file LArShapeFromStdNtuple.h.

44{ 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: