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

#include <SpacePointAnalysis.h>

Inheritance diagram for SpacePointAnalysis:
Collaboration diagram for SpacePointAnalysis:

Public Member Functions

 SpacePointAnalysis (const std::string &name, ISvcLocator *pSvcLocator)
 ~SpacePointAnalysis ()
virtual StatusCode initialize () override final
virtual StatusCode execute (const EventContext &ctx) override final
 Execute method.
virtual unsigned int cardinality () const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
bool filterPassed (const EventContext &ctx) const
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
const EventContext & getContext () const
 Deprecated methods (use the ones with EventContext).
bool filterPassed () const
void setFilterPassed (bool state) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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

SG::ReadHandleKey< SpacePointContainerm_inputKey {this, "InputKey", "PixelSpacePoints", "Key of input space points"}
SG::ReadHandleKey< SpacePointOverlapCollectionm_inputOverlapKey {this, "InputOverlapKey", "OverlapSpacePoints", "Key of input for overlap space points"}
const PixelIDm_pixelID {}
const SCT_IDm_stripID {}
std::vector< int > * m_barrelEndcap {}
std::vector< int > * m_layerDisk {}
std::vector< int > * m_phiModule {}
std::vector< int > * m_etaModule {}
std::vector< int > * m_sideModule {}
std::vector< int > * m_isInnermost {}
std::vector< int > * m_isNextToInnermost {}
std::vector< int > * m_isOverlap {}
std::vector< double > * m_eta {}
std::vector< double > * m_globalX {}
std::vector< double > * m_globalY {}
std::vector< double > * m_globalZ {}
std::vector< double > * m_globalCovXX {}
std::vector< double > * m_globalCovYY {}
std::vector< double > * m_globalCovZZ {}
std::vector< double > * m_globalCovXY {}
std::vector< double > * m_globalCovXZ {}
std::vector< double > * m_globalCovYX {}
std::vector< double > * m_globalCovYZ {}
std::vector< double > * m_globalCovZX {}
std::vector< double > * m_globalCovZY {}
TH2 * m_h_globalZR {}
TH1 * m_h_etaSpacePoint {}
TTree * m_tree {}
StringProperty m_ntupleFileName {this, "NtupleFileName", "/ntuples/file1", "Output filename"}
StringProperty m_ntupleDirName {this, "NtupleDirectoryName", "/SpacePointAnalysis/", "Directory name in output file"}
StringProperty m_ntupleTreeName {this, "NtupleTreeName", "SpacePointAna", "Tree name in output file"}
StringProperty m_path {this, "HistPath", "/SpacePointAnalysis/", "Full path in output file"}
ServiceHandle< ITHistSvc > m_thistSvc { this, "THistSvc", "THistSvc", "Histogramming svc" }
BooleanProperty m_usePixel {this, "UsePixel", true, "enable use of pixel ID or SCT ID"}
BooleanProperty m_useOverlap {this, "UseOverlap", true, "enable use of overlap for SCT 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 26 of file SpacePointAnalysis.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

◆ SpacePointAnalysis()

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

Definition at line 20 of file SpacePointAnalysis.cxx.

21: AthAlgorithm(name, pSvcLocator) {}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:

◆ ~SpacePointAnalysis()

SpacePointAnalysis::~SpacePointAnalysis ( )
inline

Definition at line 30 of file SpacePointAnalysis.h.

30{}

Member Function Documentation

◆ cardinality()

virtual unsigned int SpacePointAnalysis::cardinality ( ) const
inlineoverridevirtual

Definition at line 34 of file SpacePointAnalysis.h.

34{ return 1; }

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

StatusCode SpacePointAnalysis::execute ( const EventContext & ctx)
finaloverridevirtual

Execute method.

Provides access to the EventContext if needed but is non-const as opposed to AthReentrantAlgorithm.

Implements AthAlgorithm.

Definition at line 80 of file SpacePointAnalysis.cxx.

80 {
81 ATH_MSG_DEBUG(" In SpacePointAnalysis::execute()" );
82
83 m_barrelEndcap->clear();
84 m_layerDisk->clear();
85 m_phiModule->clear();
86 m_etaModule->clear();
87 m_sideModule->clear();
88 m_isInnermost->clear();
89 m_isNextToInnermost->clear();
90 m_isOverlap->clear();
91 m_eta->clear();
92 m_globalX->clear();
93 m_globalY->clear();
94 m_globalZ->clear();
95 m_globalCovXX->clear();
96 m_globalCovYY->clear();
97 m_globalCovZZ->clear();
98 m_globalCovXY->clear();
99 m_globalCovXZ->clear();
100 m_globalCovYX->clear();
101 m_globalCovYZ->clear();
102 m_globalCovZX->clear();
103 m_globalCovZY->clear();
104
105
106 SG::ReadHandle<SpacePointContainer> spContainer (m_inputKey, ctx);
107 if(spContainer.isValid()) {
108 for( const SpacePointCollection* spCollection : *spContainer) {
109 if (!spCollection) continue;
110 for( const Trk::SpacePoint* spacePoint : *spCollection) {
111 const Identifier idColl(spCollection->identify());
112 const int brlEc(m_usePixel ? m_pixelID->barrel_ec(idColl) : m_stripID->barrel_ec(idColl));
113 const int layerDisk(m_usePixel ? m_pixelID->layer_disk(idColl) : m_stripID->layer_disk(idColl));
114 const int phiMod(m_usePixel ? m_pixelID->phi_module(idColl) : m_stripID->phi_module(idColl));
115 const int etaMod(m_usePixel ? m_pixelID->eta_module(idColl) : m_stripID->eta_module(idColl));
116 const int side(m_usePixel ? 0 : m_stripID->side(idColl));
117
118 bool isInnermost = m_usePixel ? (layerDisk==0) : false;
119 bool isNextToInnermost = m_usePixel ? ((layerDisk==1) or (brlEc!=0 and layerDisk==2)) : false;
120
121 m_barrelEndcap->push_back(brlEc);
122 m_layerDisk->push_back(layerDisk);
123 m_phiModule->push_back(phiMod);
124 m_etaModule->push_back(etaMod);
125 m_sideModule->push_back(side);
126 m_isInnermost->push_back(int(isInnermost));
127 m_isNextToInnermost->push_back(int(isNextToInnermost));
128 m_isOverlap->push_back(0);
129
130 auto globalPos = spacePoint->globalPosition();
131 auto globalCov = spacePoint->globCovariance();
132
133 m_eta->push_back(globalPos.eta());
134 m_globalX->push_back(globalPos.x());
135 m_globalY->push_back(globalPos.y());
136 m_globalZ->push_back(globalPos.z());
137
138 m_globalCovXX->push_back(globalCov(0,0));
139 m_globalCovYY->push_back(globalCov(1,1));
140 m_globalCovZZ->push_back(globalCov(2,2));
141 m_globalCovXY->push_back(globalCov(0,1));
142 m_globalCovXZ->push_back(globalCov(0,2));
143 m_globalCovYX->push_back(globalCov(1,0));
144 m_globalCovYZ->push_back(globalCov(1,2));
145 m_globalCovZX->push_back(globalCov(2,0));
146 m_globalCovZY->push_back(globalCov(2,1));
147
148 m_h_globalZR->Fill(globalPos.z(), globalPos.perp());
149 m_h_etaSpacePoint->Fill(globalPos.eta());
150
151 }
152 }
153 } else {
154 ATH_MSG_FATAL("Unable to get SpacePointContainer: " << m_inputKey.key());
155 }
156
157 if (not m_usePixel and m_useOverlap) {
158 SG::ReadHandle<SpacePointOverlapCollection> spCollection{m_inputOverlapKey, ctx};
159 if (spCollection.isValid()) {
160 for( const Trk::SpacePoint* spacePoint : *spCollection) {
161 const IdentifierHash hashId(spacePoint->elementIdList().first);
162 const Identifier idColl = m_stripID->wafer_id(hashId);
163
164 const int brlEc(m_stripID->barrel_ec(idColl));
165 const int layerDisk(m_stripID->layer_disk(idColl));
166 const int phiMod(m_stripID->phi_module(idColl));
167 const int etaMod(m_stripID->eta_module(idColl));
168 const int side(m_stripID->side(idColl));
169
170 const bool isInnermost(false);
171 const bool isNextToInnermost(false);
172
173 m_barrelEndcap->push_back(brlEc);
174 m_layerDisk->push_back(layerDisk);
175 m_phiModule->push_back(phiMod);
176 m_etaModule->push_back(etaMod);
177 m_sideModule->push_back(side);
178 m_isInnermost->push_back(int(isInnermost));
179 m_isNextToInnermost->push_back(int(isNextToInnermost));
180 m_isOverlap->push_back(1);
181
182 auto globalPos = spacePoint->globalPosition();
183 auto globalCov = spacePoint->globCovariance();
184
185 m_eta->push_back(globalPos.eta());
186 m_globalX->push_back(globalPos.x());
187 m_globalY->push_back(globalPos.y());
188 m_globalZ->push_back(globalPos.z());
189
190 m_globalCovXX->push_back(globalCov(0,0));
191 m_globalCovYY->push_back(globalCov(1,1));
192 m_globalCovZZ->push_back(globalCov(2,2));
193 m_globalCovXY->push_back(globalCov(0,1));
194 m_globalCovXZ->push_back(globalCov(0,2));
195 m_globalCovYX->push_back(globalCov(1,0));
196 m_globalCovYZ->push_back(globalCov(1,2));
197 m_globalCovZX->push_back(globalCov(2,0));
198 m_globalCovZY->push_back(globalCov(2,1));
199
200 m_h_globalZR->Fill(globalPos.z(), globalPos.perp());
201 m_h_etaSpacePoint->Fill(globalPos.eta());
202
203 }
204 } else {
205 ATH_MSG_FATAL("Unable to get SpacePointContainer: " << m_inputOverlapKey.key());
206 }
207 }
208
209 if (m_tree) {
210 m_tree->Fill();
211 }
212
213 return StatusCode::SUCCESS;
214}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
std::vector< double > * m_globalY
std::vector< double > * m_globalZ
std::vector< double > * m_globalCovZY
std::vector< int > * m_layerDisk
std::vector< int > * m_isInnermost
std::vector< double > * m_globalCovXX
BooleanProperty m_useOverlap
const PixelID * m_pixelID
std::vector< double > * m_globalCovZZ
std::vector< double > * m_eta
std::vector< double > * m_globalX
std::vector< int > * m_barrelEndcap
const SCT_ID * m_stripID
std::vector< int > * m_sideModule
std::vector< int > * m_phiModule
std::vector< double > * m_globalCovYZ
std::vector< int > * m_isOverlap
SG::ReadHandleKey< SpacePointOverlapCollection > m_inputOverlapKey
std::vector< double > * m_globalCovXY
SG::ReadHandleKey< SpacePointContainer > m_inputKey
std::vector< double > * m_globalCovYX
BooleanProperty m_usePixel
std::vector< int > * m_etaModule
std::vector< double > * m_globalCovZX
std::vector< int > * m_isNextToInnermost
std::vector< double > * m_globalCovYY
std::vector< double > * m_globalCovXZ

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

◆ filterPassed() [1/2]

bool AthAlgorithm::filterPassed ( ) const
inherited

Definition at line 94 of file AthAlgorithm.cxx.

94 {
95 return filterPassed( Gaudi::Hive::currentContext() );
96}
bool filterPassed() const

◆ filterPassed() [2/2]

bool AthAlgorithm::filterPassed ( const EventContext & ctx) const
inherited

Definition at line 98 of file AthAlgorithm.cxx.

98 {
99 return execState( ctx ).filterPassed();
100}

◆ getContext()

const EventContext & AthAlgorithm::getContext ( ) const
inherited

Deprecated methods (use the ones with EventContext).

Definition at line 90 of file AthAlgorithm.cxx.

90 {
91 return Gaudi::Hive::currentContext();
92}

◆ initialize()

StatusCode SpacePointAnalysis::initialize ( )
finaloverridevirtual

Definition at line 23 of file SpacePointAnalysis.cxx.

23 {
24 ATH_MSG_DEBUG( "Initializing SpacePointAnalysis" );
25
26 ATH_CHECK( m_inputKey.initialize() );
27
29
30 if (m_usePixel)
31 ATH_CHECK(detStore()->retrieve(m_pixelID, "PixelID"));
32 else
33 ATH_CHECK(detStore()->retrieve(m_stripID, "SCT_ID"));
34
35 ATH_CHECK(m_thistSvc.retrieve());
36
37 m_tree = new TTree(TString(m_ntupleTreeName.value()), "SpacePointAna");
38 std::string fullNtupleName = m_ntupleFileName.value() + m_ntupleDirName.value() + m_ntupleTreeName.value();
39 ATH_CHECK(m_thistSvc->regTree(fullNtupleName, m_tree));
40
41 if (m_tree) {
42 m_tree->Branch("barrelEndcap", &m_barrelEndcap);
43 m_tree->Branch("layerDisk", &m_layerDisk);
44 m_tree->Branch("phiModule", &m_phiModule);
45 m_tree->Branch("etaModule", &m_etaModule);
46 m_tree->Branch("sideModule", &m_sideModule);
47 m_tree->Branch("isInnermost", &m_isInnermost);
48 m_tree->Branch("isNextToInnermost", &m_isNextToInnermost);
49 m_tree->Branch("isOverlap", &m_isOverlap);
50 m_tree->Branch("eta", &m_eta);
51 m_tree->Branch("globalX", &m_globalX);
52 m_tree->Branch("globalY", &m_globalY);
53 m_tree->Branch("globalZ", &m_globalZ);
54 m_tree->Branch("globalCovXX", &m_globalCovXX);
55 m_tree->Branch("globalCovYY", &m_globalCovYY);
56 m_tree->Branch("globalCovZZ", &m_globalCovZZ);
57 m_tree->Branch("globalCovXY", &m_globalCovXY);
58 m_tree->Branch("globalCovXZ", &m_globalCovXZ);
59 m_tree->Branch("globalCovYX", &m_globalCovYX);
60 m_tree->Branch("globalCovYZ", &m_globalCovYZ);
61 m_tree->Branch("globalCovZX", &m_globalCovZX);
62 m_tree->Branch("globalCovZY", &m_globalCovZY);
63
64 } else {
65 ATH_MSG_ERROR("No tree found!");
66 }
67
68 m_h_globalZR = new TH2F("h_globalZR","h_globalZR; z [mm]; r [mm]",1500,-3000.,3000,1500,0.,1500);
69 ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_globalZR->GetName(), m_h_globalZR));
70
71 m_h_etaSpacePoint = new TH1F("m_h_etaSpacePoint","m_h_etaSpacePoint; space point #eta",100, -5, 5);
72 ATH_CHECK(m_thistSvc->regHist(m_path.value() + m_h_etaSpacePoint->GetName(), m_h_etaSpacePoint));
73
75 ATH_MSG_INFO("No overlap collection when enabled for pixel space points! Check your configuration if needed.");
76
77 return StatusCode::SUCCESS;
78}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
const ServiceHandle< StoreGateSvc > & detStore() const
StringProperty m_ntupleTreeName
StringProperty m_ntupleFileName
StringProperty m_ntupleDirName
ServiceHandle< ITHistSvc > m_thistSvc
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)

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

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 111 of file AthAlgorithm.h.

111{ 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() [1/2]

void AthAlgorithm::setFilterPassed ( bool state) const
inherited

Definition at line 102 of file AthAlgorithm.cxx.

102 {
103 setFilterPassed( state, Gaudi::Hive::currentContext() );
104}
void setFilterPassed(bool state) const

◆ setFilterPassed() [2/2]

void AthAlgorithm::setFilterPassed ( bool state,
const EventContext & ctx ) const
inherited

Definition at line 106 of file AthAlgorithm.cxx.

106 {
107 execState( ctx ).setFilterPassed(state);
108}

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

std::vector<int>* SpacePointAnalysis::m_barrelEndcap {}
private

Definition at line 42 of file SpacePointAnalysis.h.

42{};

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

std::vector<double>* SpacePointAnalysis::m_eta {}
private

Definition at line 50 of file SpacePointAnalysis.h.

50{};

◆ m_etaModule

std::vector<int>* SpacePointAnalysis::m_etaModule {}
private

Definition at line 45 of file SpacePointAnalysis.h.

45{};

◆ 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 AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 114 of file AthAlgorithm.h.

◆ m_globalCovXX

std::vector<double>* SpacePointAnalysis::m_globalCovXX {}
private

Definition at line 54 of file SpacePointAnalysis.h.

54{};

◆ m_globalCovXY

std::vector<double>* SpacePointAnalysis::m_globalCovXY {}
private

Definition at line 57 of file SpacePointAnalysis.h.

57{};

◆ m_globalCovXZ

std::vector<double>* SpacePointAnalysis::m_globalCovXZ {}
private

Definition at line 58 of file SpacePointAnalysis.h.

58{};

◆ m_globalCovYX

std::vector<double>* SpacePointAnalysis::m_globalCovYX {}
private

Definition at line 59 of file SpacePointAnalysis.h.

59{};

◆ m_globalCovYY

std::vector<double>* SpacePointAnalysis::m_globalCovYY {}
private

Definition at line 55 of file SpacePointAnalysis.h.

55{};

◆ m_globalCovYZ

std::vector<double>* SpacePointAnalysis::m_globalCovYZ {}
private

Definition at line 60 of file SpacePointAnalysis.h.

60{};

◆ m_globalCovZX

std::vector<double>* SpacePointAnalysis::m_globalCovZX {}
private

Definition at line 61 of file SpacePointAnalysis.h.

61{};

◆ m_globalCovZY

std::vector<double>* SpacePointAnalysis::m_globalCovZY {}
private

Definition at line 62 of file SpacePointAnalysis.h.

62{};

◆ m_globalCovZZ

std::vector<double>* SpacePointAnalysis::m_globalCovZZ {}
private

Definition at line 56 of file SpacePointAnalysis.h.

56{};

◆ m_globalX

std::vector<double>* SpacePointAnalysis::m_globalX {}
private

Definition at line 51 of file SpacePointAnalysis.h.

51{};

◆ m_globalY

std::vector<double>* SpacePointAnalysis::m_globalY {}
private

Definition at line 52 of file SpacePointAnalysis.h.

52{};

◆ m_globalZ

std::vector<double>* SpacePointAnalysis::m_globalZ {}
private

Definition at line 53 of file SpacePointAnalysis.h.

53{};

◆ m_h_etaSpacePoint

TH1* SpacePointAnalysis::m_h_etaSpacePoint {}
private

Definition at line 65 of file SpacePointAnalysis.h.

65{};

◆ m_h_globalZR

TH2* SpacePointAnalysis::m_h_globalZR {}
private

Definition at line 64 of file SpacePointAnalysis.h.

64{};

◆ m_inputKey

SG::ReadHandleKey<SpacePointContainer> SpacePointAnalysis::m_inputKey {this, "InputKey", "PixelSpacePoints", "Key of input space points"}
private

Definition at line 37 of file SpacePointAnalysis.h.

37{this, "InputKey", "PixelSpacePoints", "Key of input space points"};

◆ m_inputOverlapKey

SG::ReadHandleKey<SpacePointOverlapCollection> SpacePointAnalysis::m_inputOverlapKey {this, "InputOverlapKey", "OverlapSpacePoints", "Key of input for overlap space points"}
private

Definition at line 38 of file SpacePointAnalysis.h.

38{this, "InputOverlapKey", "OverlapSpacePoints", "Key of input for overlap space points"};

◆ m_isInnermost

std::vector<int>* SpacePointAnalysis::m_isInnermost {}
private

Definition at line 47 of file SpacePointAnalysis.h.

47{};

◆ m_isNextToInnermost

std::vector<int>* SpacePointAnalysis::m_isNextToInnermost {}
private

Definition at line 48 of file SpacePointAnalysis.h.

48{};

◆ m_isOverlap

std::vector<int>* SpacePointAnalysis::m_isOverlap {}
private

Definition at line 49 of file SpacePointAnalysis.h.

49{};

◆ m_layerDisk

std::vector<int>* SpacePointAnalysis::m_layerDisk {}
private

Definition at line 43 of file SpacePointAnalysis.h.

43{};

◆ m_ntupleDirName

StringProperty SpacePointAnalysis::m_ntupleDirName {this, "NtupleDirectoryName", "/SpacePointAnalysis/", "Directory name in output file"}
private

Definition at line 69 of file SpacePointAnalysis.h.

69{this, "NtupleDirectoryName", "/SpacePointAnalysis/", "Directory name in output file"};

◆ m_ntupleFileName

StringProperty SpacePointAnalysis::m_ntupleFileName {this, "NtupleFileName", "/ntuples/file1", "Output filename"}
private

Definition at line 68 of file SpacePointAnalysis.h.

68{this, "NtupleFileName", "/ntuples/file1", "Output filename"};

◆ m_ntupleTreeName

StringProperty SpacePointAnalysis::m_ntupleTreeName {this, "NtupleTreeName", "SpacePointAna", "Tree name in output file"}
private

Definition at line 70 of file SpacePointAnalysis.h.

70{this, "NtupleTreeName", "SpacePointAna", "Tree name in output file"};

◆ m_path

StringProperty SpacePointAnalysis::m_path {this, "HistPath", "/SpacePointAnalysis/", "Full path in output file"}
private

Definition at line 71 of file SpacePointAnalysis.h.

71{this, "HistPath", "/SpacePointAnalysis/", "Full path in output file"};

◆ m_phiModule

std::vector<int>* SpacePointAnalysis::m_phiModule {}
private

Definition at line 44 of file SpacePointAnalysis.h.

44{};

◆ m_pixelID

const PixelID* SpacePointAnalysis::m_pixelID {}
private

Definition at line 39 of file SpacePointAnalysis.h.

39{};

◆ m_sideModule

std::vector<int>* SpacePointAnalysis::m_sideModule {}
private

Definition at line 46 of file SpacePointAnalysis.h.

46{};

◆ m_stripID

const SCT_ID* SpacePointAnalysis::m_stripID {}
private

Definition at line 40 of file SpacePointAnalysis.h.

40{};

◆ m_thistSvc

ServiceHandle<ITHistSvc> SpacePointAnalysis::m_thistSvc { this, "THistSvc", "THistSvc", "Histogramming svc" }
private

Definition at line 72 of file SpacePointAnalysis.h.

72{ this, "THistSvc", "THistSvc", "Histogramming svc" };

◆ m_tree

TTree* SpacePointAnalysis::m_tree {}
private

Definition at line 67 of file SpacePointAnalysis.h.

67{};

◆ m_useOverlap

BooleanProperty SpacePointAnalysis::m_useOverlap {this, "UseOverlap", true, "enable use of overlap for SCT ID"}
private

Definition at line 75 of file SpacePointAnalysis.h.

75{this, "UseOverlap", true, "enable use of overlap for SCT ID"};

◆ m_usePixel

BooleanProperty SpacePointAnalysis::m_usePixel {this, "UsePixel", true, "enable use of pixel ID or SCT ID"}
private

Definition at line 74 of file SpacePointAnalysis.h.

74{this, "UsePixel", true, "enable use of pixel ID or SCT ID"};

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