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

#include <TileEopFilterAlg.h>

Inheritance diagram for TileEopFilterAlg:
Collaboration diagram for TileEopFilterAlg:

Public Member Functions

 TileEopFilterAlg (const std::string &name, ISvcLocator *pSvcLocator)
 ~TileEopFilterAlg ()
virtual StatusCode initialize ()
virtual StatusCode execute ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::string m_inputTracks
std::string m_outputTracks
std::string m_inputClusters
std::string m_outputClusters
std::string m_inputCells
std::string m_outputCells
std::string m_trackClusters
std::string m_trackCells
std::string m_clusterCells
float m_trackMom
float m_trackEta
float m_trackIso
float m_trackPtrel
float m_trackClusterR
float m_trackCellR
bool m_dumpLarCells
ToolHandle< ITrackToolsm_trackInCalo
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 23 of file TileEopFilterAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TileEopFilterAlg()

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

Definition at line 18 of file TileEopFilterAlg.cxx.

18 :
19 AthAlgorithm( name, pSvcLocator ), m_trackInCalo("TrackExtrapolator"){
20//=======================================
21
22 declareProperty("InputTracks", m_inputTracks = "InDetTrackParticles");
23 declareProperty("OutputTracks", m_outputTracks = "SelectedTracks");
24 declareProperty("InputClusters", m_inputClusters = "CaloTopoClusters");
25 declareProperty("OutputClusters", m_outputClusters = "SelectedClusters");
26 declareProperty("InputCells", m_inputCells = "AllCalo");
27 declareProperty("OutputCells", m_outputCells = "SelectedCells");
28 declareProperty("TrackClusters", m_trackClusters = "TrackClusters");
29 declareProperty("TrackCells", m_trackCells = "TrackCells");
30 declareProperty("ClusterCells", m_clusterCells = "ClusterCells");
31 declareProperty("TrackMomCut", m_trackMom = 1000.);
32 declareProperty("TrackEtaCut", m_trackEta = 2.4);
33 declareProperty("TrackIsoCut", m_trackIso = 0.8);
34 declareProperty("TrackPtrelCut", m_trackPtrel = 0.15);
35 declareProperty("TrackClusterR", m_trackClusterR = 0.2);
36 declareProperty("TrackCellR", m_trackCellR = 1.0);
37 declareProperty("DumpLArCells", m_dumpLarCells = false);
38 declareProperty("TrackTools", m_trackInCalo);
39}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_outputTracks
std::string m_inputClusters
ToolHandle< ITrackTools > m_trackInCalo
std::string m_inputCells
std::string m_clusterCells
std::string m_outputCells
std::string m_trackClusters
std::string m_inputTracks
std::string m_outputClusters
std::string m_trackCells

◆ ~TileEopFilterAlg()

TileEopFilterAlg::~TileEopFilterAlg ( )
inline

Definition at line 29 of file TileEopFilterAlg.h.

29{};

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TileEopFilterAlg::execute ( )
virtual

Definition at line 52 of file TileEopFilterAlg.cxx.

52 {
53//=======================================
54
55 //Get the input tracks
56 const TRACKCONTAINER* inputTracks = 0;
57 CHECK( evtStore()->retrieve( inputTracks, m_inputTracks ) );
58
59 //Allocate the output tracks container
60 TRACKCONTAINER * outputTracks = new TRACKCONTAINER;
61 TRACKAUXCONTAINER* outputAuxTracks = new TRACKAUXCONTAINER;
62 outputTracks->setStore( outputAuxTracks );
63
64
65 //Select tracks
66 TRACKCONTAINER::const_iterator trackItr = inputTracks->begin();
67 TRACKCONTAINER::const_iterator trackEnd = inputTracks->end();
68 for(; trackItr != trackEnd; ++trackItr ){
69 const TRACK* track = *trackItr;
70 if(!track){ ATH_MSG_INFO("Not a valid track"); continue; }
71 //Cut 1. Momentum
72 if(track->p4().P() >= m_trackMom){
73 //Cut 2. Eta
74 if(fabs(track->eta()) <= m_trackEta){
75 /*
76 //Cut 3. Isolation: Only one track in that cone
77 //Extrapolate the current track and all other tracks and check they don't overlap in the range
78 int tracksInCone=1;
79 TRACKCONTAINER::const_iterator trackItr2 = inputTracks->begin();
80 TRACKCONTAINER::const_iterator trackEnd2 = inputTracks->end();
81 vector< vector<double> > etrack = m_trackInCalo->getXYZEtaPhiPerLayer(track);
82 for(; trackItr2 != trackEnd2; ++trackItr2 ){
83 if(trackItr==trackItr2) continue;
84 const TRACK* track2 = *trackItr2;
85 if(track2->p() < m_trackMom) continue;
86 vector< vector<double> > etrack2 = m_trackInCalo->getXYZEtaPhiPerLayer(track2);
87 for(int i=0;i<11;i++){
88 double dif_eta = etrack2[i][3] - etrack[i][3];
89 double dif_phi = etrack2[i][4] - etrack[i][4];
90 if(dif_phi<0) dif_phi=-dif_phi;
91 if(dif_phi>M_PI){dif_phi=2*M_PI-dif_phi;}
92 double deltaR = sqrt(dif_eta*dif_eta+dif_phi*dif_phi);
93 if(deltaR<m_trackIso) tracksInCone++;
94 }
95 }
96 if(tracksInCone==1){
97 TRACK* tmpTrack = new TRACK();
98 tmpTrack->makePrivateStore( track );
99 outputTracks->push_back(tmpTrack);
100 }
101 */
102
103 //Cut 3. Isolation: require ptcone{IsoCut}/track_pt < ptrelCut
104 double ptcone=0.;
105 TRACKCONTAINER::const_iterator trackItr2 = inputTracks->begin();
106 TRACKCONTAINER::const_iterator trackEnd2 = inputTracks->end();
107 for(; trackItr2 != trackEnd2; ++trackItr2 ){
108 if(trackItr==trackItr2) continue;
109 const TRACK* track2 = *trackItr2;
110 double dif_eta = track->eta() - track2->eta();
111 double dif_phi = track->phi() - track2->phi();
112 if(dif_phi<0) dif_phi=-dif_phi;
113 if(dif_phi>M_PI){dif_phi=2*M_PI-dif_phi;}
114 double deltaR = sqrt(dif_eta*dif_eta+dif_phi*dif_phi);
115 if(deltaR<m_trackIso) ptcone += track2->pt();
116 }
117 if(ptcone/track->pt() < m_trackPtrel ){
118 TRACK* tmpTrack = new TRACK();
119 tmpTrack->makePrivateStore( track );
120 outputTracks->push_back(tmpTrack);
121 }
122 }
123 }
124 }
125
126 ATH_MSG_DEBUG("Number of selected tracks: " << outputTracks->size());
127
128 //Get input clusters
129 const CLUSTERCONTAINER* inputClusters = 0;
130 CHECK( evtStore()->retrieve( inputClusters, m_inputClusters ) );
131
132 //Allocate output clusters container
135 outputClusters->setStore( outputAuxClusters );
136
137
138 //Allocate output association between tracks and clusters
139 ASSOCCONTAINER* trackClusters = new ASSOCCONTAINER_CONSTRUCTOR(outputTracks->size());
140 CHECK( evtStore()->record( trackClusters, m_trackClusters ) );
141
142 //Select clusters that match a track
143 //For each cluster loop over all selected tracks
144 //extrapolate the track to each calorimeter layer
145 //compute distance of cluster center in given layer to track pointer in same layer
146 //select cluster if distance is smaller than threshold
147 CLUSTERCONTAINER::const_iterator clusterItr = inputClusters->begin();
148 CLUSTERCONTAINER::const_iterator clusterEnd = inputClusters->end();
149 for(;clusterItr != clusterEnd; ++clusterItr){
150 const CLUSTER* cluster = *clusterItr;
151 TRACKCONTAINER::const_iterator trackItr = outputTracks->begin();
152 TRACKCONTAINER::const_iterator trackEnd = outputTracks->end();
153 ASSOCCONTAINER::iterator assocItr = trackClusters->begin();
154 for( ; trackItr != trackEnd; ++trackItr ){
155 const TRACK* track = *trackItr;
156 vector< vector<double> > etrack = m_trackInCalo->getXYZEtaPhiPerLayer(track);
157 double deltaR=999;
158 for(int cell_sid=0;cell_sid<CaloSampling::Unknown;cell_sid++){
159 int lay=-1;
160 if (cell_sid==0 || cell_sid==4 ){lay=0;}
161 else if(cell_sid==1 || cell_sid==5 ){lay=1;}
162 else if(cell_sid==2 || cell_sid==6 ){lay=2;}
163 else if(cell_sid==3 || cell_sid==7 ){lay=3;}
164 else if(cell_sid==12 || cell_sid==18){lay=4;}
165 else if(cell_sid==13 || cell_sid==19){lay=5;}
166 else if(cell_sid==15 || cell_sid==17){lay=5;}
167 else if(cell_sid==14 || cell_sid==20){lay=6;}
168 else if(cell_sid==16) {lay=6;}
169 else if(cell_sid==8 ){lay=7;}
170 else if(cell_sid==9 ){lay=8;}
171 else if(cell_sid==10 ){lay=9;}
172 else if(cell_sid==11 ){lay=10;}
173 if(lay==-1) continue;
174 double dif_eta = cluster->etaSample((CaloSampling::CaloSample)cell_sid) - etrack[lay][3];
175 double dif_phi = cluster->phiSample((CaloSampling::CaloSample)cell_sid) - etrack[lay][4];
176 if(dif_phi<0) dif_phi=-dif_phi;
177 if(dif_phi>M_PI){dif_phi=2*M_PI-dif_phi;}
178 double tmp = sqrt(dif_eta*dif_eta+dif_phi*dif_phi);
179 deltaR = (tmp<deltaR ? tmp : deltaR);
180 }
182 unsigned int i=0;
183 while(i!=outputClusters->size()){if(outputClusters->at(i)==cluster){break;}i++;}
184 if(i==outputClusters->size()){
185 CLUSTER* tmpCluster = new CLUSTER();
186 tmpCluster->makePrivateStore( cluster );
187 outputClusters->push_back(tmpCluster);
188 }
189 //Fill association
190 assocItr->push_back(i); //FIXME
191 }
192 ++assocItr;
193 }
194 }
195
196 ATH_MSG_DEBUG("Number of selected clusters: " << outputClusters->size());
197
198 //Get input cells
199 const CELLCONTAINER* inputCells = 0;
200 CHECK( evtStore()->retrieve( inputCells, m_inputCells ) );
201
202 //Allocate output cells container
203 ConstDataVector<CELLCONTAINER>* outputCells = new ConstDataVector<CELLCONTAINER>( SG::VIEW_ELEMENTS );
204 CHECK( evtStore()->record( outputCells, m_outputCells ) );
205
206 //Allocate output association between clusters and cells
207 ASSOCCONTAINER* clusterCells = new ASSOCCONTAINER_CONSTRUCTOR(outputClusters->size());
208 CHECK( evtStore()->record( clusterCells, m_clusterCells ) );
209
210 //Select cells associated to clusters
211 clusterItr = outputClusters->begin();
212 clusterEnd = outputClusters->end();
213 ASSOCCONTAINER::iterator assocItr = clusterCells->begin();
214 //Loop over clusters
215 for(;clusterItr != clusterEnd; ++clusterItr){
216 const CLUSTER* cluster = *clusterItr;
217 if(cluster->getCellLinks() != 0){
218 CLUSTER::const_cell_iterator cellItr = cluster->cell_begin();
219 CLUSTER::const_cell_iterator cellEnd = cluster->cell_end();
220 for(;cellItr != cellEnd; ++cellItr){
221 const CELL* cell = *cellItr;
222 unsigned int i=0;
223 while(i!=outputCells->size()){if(outputCells->at(i)==cell){break;}i++;}
224 if(i==outputCells->size()){
225 outputCells->push_back(cell);
226 }
227 //Fill association
228 assocItr->push_back(i);//FIXME
229 }
230 }
231 ++assocItr;
232 }
233
234 //Allocate output association between tracks and cells
235 ASSOCCONTAINER* trackCells = new ASSOCCONTAINER_CONSTRUCTOR(outputTracks->size());
236 CHECK( evtStore()->record( trackCells, m_trackCells ) );
237
238 //Also select cells associated to tracks
239 //cell matches track in a cone of DeltaR and is not in ouputCells already
240 trackItr = outputTracks->begin();
241 trackEnd = outputTracks->end();
242 assocItr = trackCells->begin();
243 //Loop over tracks
244 for( ; trackItr != trackEnd; ++trackItr ){
245 const TRACK* track = *trackItr;
246 vector< vector<double> > etrack = m_trackInCalo->getXYZEtaPhiPerLayer(track);
247 //loop cells
248 CELLCONTAINER::const_iterator cellItr = inputCells->begin();
249 CELLCONTAINER::const_iterator cellEnd = inputCells->end();
250 for(;cellItr != cellEnd; ++cellItr){
251 const CELL* cell = *cellItr;
252 CaloSampling::CaloSample cell_sid = (CaloSampling::CaloSample)cell->caloDDE()->getSampling();
253 //http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.def
254 int lay=-1;
255 if (cell_sid==0 || cell_sid==4 ){lay=0;}
256 else if(cell_sid==1 || cell_sid==5 ){lay=1;}
257 else if(cell_sid==2 || cell_sid==6 ){lay=2;}
258 else if(cell_sid==3 || cell_sid==7 ){lay=3;}
259 else if(cell_sid==12 || cell_sid==18){lay=4;}
260 else if(cell_sid==13 || cell_sid==19){lay=5;}
261 else if(cell_sid==15 || cell_sid==17){lay=5;}
262 else if(cell_sid==14 || cell_sid==20){lay=6;}
263 else if(cell_sid==16) {lay=6;}
264 else if(cell_sid==8 ){lay=7;}
265 else if(cell_sid==9 ){lay=8;}
266 else if(cell_sid==10 ){lay=9;}
267 else if(cell_sid==11 ){lay=10;}
268 if(lay==-1) continue;
269 double dif_eta = cell->eta() - etrack[lay][3];
270 double dif_phi = cell->phi() - etrack[lay][4];
271 if(dif_phi<0) dif_phi=-dif_phi;
272 if(dif_phi>M_PI){dif_phi=2*M_PI-dif_phi;}
273 double deltaR = sqrt(dif_eta*dif_eta+dif_phi*dif_phi);
274 if(deltaR<=m_trackCellR){
275 unsigned int i=0;
276 while(i!=outputCells->size()){if(outputCells->at(i)==cell){break;}i++;}
277 if(i==outputCells->size()){
278 outputCells->push_back(cell);
279 }
280 assocItr->push_back(i);//FIXME
281 }
282 }
283 ++assocItr;
284 }
285
286 ATH_MSG_DEBUG("Number of selected cells: " << outputCells->size());
287
288 CHECK( evtStore()->record(outputClusters, m_outputClusters ) );
289 CHECK( evtStore()->record(outputAuxClusters, m_outputClusters+"Aux.") );
290 CHECK( evtStore()->record(outputTracks, m_outputTracks) );
291 CHECK( evtStore()->record(outputAuxTracks, m_outputTracks+"Aux.") );
292
293
294 return StatusCode::SUCCESS;
295
296}
#define M_PI
Scalar deltaR(const MatrixBase< Derived > &vec) const
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
#define CHECK(...)
Evaluate an expression and check for errors.
xAOD::TrackParticleAuxContainer TRACKAUXCONTAINER
xAOD::TrackParticle TRACK
xAOD::CaloClusterContainer CLUSTERCONTAINER
CaloCell CELL
CALORIMETER INCLUDES.
CaloCellContainer CELLCONTAINER
xAOD::CaloCluster CLUSTER
xAOD::TrackParticleContainer TRACKCONTAINER
std::vector< std::vector< int > > ASSOCCONTAINER
#define ASSOCCONTAINER_CONSTRUCTOR(size)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ElementProxy at(size_type n)
Access an element, as an lvalue.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const T * at(size_type n) const
Access an element, as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
void makePrivateStore()
Create a new (empty) private store for this object.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
CaloClusterCellLink::const_iterator const_cell_iterator
Iterator of the underlying CaloClusterCellLink (explicitly const version)
const_cell_iterator cell_end() const
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
@ ptcone
Track isolation.
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
CaloClusterAuxContainer_v2 CaloClusterAuxContainer
Define the latest version of the calorimeter cluster auxiliary container.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ initialize()

StatusCode TileEopFilterAlg::initialize ( )
virtual

Definition at line 42 of file TileEopFilterAlg.cxx.

42 {
43//=======================================
44
45 CHECK(m_trackInCalo.retrieve());
46 //CHECK(m_trackIsoTool.retrieve());
47
48 return StatusCode::SUCCESS;
49}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_clusterCells

std::string TileEopFilterAlg::m_clusterCells
private

Definition at line 44 of file TileEopFilterAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dumpLarCells

bool TileEopFilterAlg::m_dumpLarCells
private

Definition at line 51 of file TileEopFilterAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_inputCells

std::string TileEopFilterAlg::m_inputCells
private

Definition at line 40 of file TileEopFilterAlg.h.

◆ m_inputClusters

std::string TileEopFilterAlg::m_inputClusters
private

Definition at line 38 of file TileEopFilterAlg.h.

◆ m_inputTracks

std::string TileEopFilterAlg::m_inputTracks
private

Definition at line 36 of file TileEopFilterAlg.h.

◆ m_outputCells

std::string TileEopFilterAlg::m_outputCells
private

Definition at line 41 of file TileEopFilterAlg.h.

◆ m_outputClusters

std::string TileEopFilterAlg::m_outputClusters
private

Definition at line 39 of file TileEopFilterAlg.h.

◆ m_outputTracks

std::string TileEopFilterAlg::m_outputTracks
private

Definition at line 37 of file TileEopFilterAlg.h.

◆ m_trackCellR

float TileEopFilterAlg::m_trackCellR
private

Definition at line 50 of file TileEopFilterAlg.h.

◆ m_trackCells

std::string TileEopFilterAlg::m_trackCells
private

Definition at line 43 of file TileEopFilterAlg.h.

◆ m_trackClusterR

float TileEopFilterAlg::m_trackClusterR
private

Definition at line 49 of file TileEopFilterAlg.h.

◆ m_trackClusters

std::string TileEopFilterAlg::m_trackClusters
private

Definition at line 42 of file TileEopFilterAlg.h.

◆ m_trackEta

float TileEopFilterAlg::m_trackEta
private

Definition at line 46 of file TileEopFilterAlg.h.

◆ m_trackInCalo

ToolHandle<ITrackTools> TileEopFilterAlg::m_trackInCalo
private

Definition at line 53 of file TileEopFilterAlg.h.

◆ m_trackIso

float TileEopFilterAlg::m_trackIso
private

Definition at line 47 of file TileEopFilterAlg.h.

◆ m_trackMom

float TileEopFilterAlg::m_trackMom
private

Definition at line 45 of file TileEopFilterAlg.h.

◆ m_trackPtrel

float TileEopFilterAlg::m_trackPtrel
private

Definition at line 48 of file TileEopFilterAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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