ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
xAODMaker::TrackCollectionCnvTool Class Reference

#include <TrackCollectionCnvTool.h>

Inheritance diagram for xAODMaker::TrackCollectionCnvTool:
Collaboration diagram for xAODMaker::TrackCollectionCnvTool:

Public Member Functions

 TrackCollectionCnvTool (const std::string &type, const std::string &name, const IInterface *parent)
 Regular AlgTool constructor. More...
 
virtual StatusCode initialize () override
 Function initialising the tool. More...
 
virtual StatusCode convert (const TrackCollection *aod, xAOD::TrackParticleContainer *xaod, const xAOD::Vertex *vtx=nullptr) const override
 Function that fills an existing xAOD::TrackParticleContainer. More...
 
virtual StatusCode convertAndAugment (const TrackCollection *aod, xAOD::TrackParticleContainer *xaod, const ObservedTrackMap *trk_map, const xAOD::Vertex *vtx=nullptr) const override
 Function that fills an existing xAOD::TrackParticleContainer and augments track particles. More...
 
virtual StatusCode setParticleCreatorTool (ToolHandle< Trk::ITrackParticleCreatorTool > *tool) override
 allow other algorithms to pass the tool in order to preserve initialisation More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Gaudi interface definition. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

xAOD::TrackParticlecreateParticle (xAOD::TrackParticleContainer &xaod, const TrackCollection &container, const Trk::Track &tp, const xAOD::Vertex *vtx) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ToolHandle< Trk::ITrackParticleCreatorToolm_particleCreator
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 27 of file TrackCollectionCnvTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrackCollectionCnvTool()

xAODMaker::TrackCollectionCnvTool::TrackCollectionCnvTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Regular AlgTool constructor.

Definition at line 16 of file TrackCollectionCnvTool.cxx.

19  : AthAlgTool( type, name, parent ),
20  m_particleCreator("Trk::TrackParticleCreatorTool/TrackParticleCreatorTool")
21  {
22 
23  // Declare the interface(s) provided by the tool:
24  declareInterface< ITrackCollectionCnvTool >( this );
25  declareProperty("TrackParticleCreator", m_particleCreator, "creator of xAOD::TrackParticles");
26  }

Member Function Documentation

◆ convert()

StatusCode xAODMaker::TrackCollectionCnvTool::convert ( const TrackCollection aod,
xAOD::TrackParticleContainer xaod,
const xAOD::Vertex vtx = nullptr 
) const
overridevirtual

Function that fills an existing xAOD::TrackParticleContainer.

Implements xAODMaker::ITrackCollectionCnvTool.

Definition at line 36 of file TrackCollectionCnvTool.cxx.

37  {
38 
39  ATH_MSG_DEBUG( "Sizes of containers before conversion: aod, xaod: " << aod->size() << ", " << xaod->size() );
40 
43 
44  for( ;itr!=end;++itr ) {
45  // Create the xAOD object:
46  if (!(*itr)) {
47  ATH_MSG_WARNING("Empty element in container!");
48  continue;
49  }
50  xAOD::TrackParticle* particle = createParticle(*xaod, *aod, **itr, vtx);
51 
52  if (!particle) {
53  ATH_MSG_WARNING("Failed to create a TrackParticle");
54  continue;
55  }
56  }
57 
58  ATH_MSG_DEBUG( "Sizes of containers after conversion: aod, xaod: " << aod->size() << ", " << xaod->size() );
59 
60  return StatusCode::SUCCESS;
61  }

◆ convertAndAugment()

StatusCode xAODMaker::TrackCollectionCnvTool::convertAndAugment ( const TrackCollection aod,
xAOD::TrackParticleContainer xaod,
const ObservedTrackMap trk_map,
const xAOD::Vertex vtx = nullptr 
) const
overridevirtual

Function that fills an existing xAOD::TrackParticleContainer and augments track particles.

Implements xAODMaker::ITrackCollectionCnvTool.

Definition at line 63 of file TrackCollectionCnvTool.cxx.

64  {
65 
66  ATH_MSG_DEBUG( "convertAndAugment: Sizes of containers before conversion: aod, xaod: " << aod->size() << ", " << xaod->size() );
67  ATH_MSG_DEBUG( "convertAndAugment: Size of track map: " << trk_map->size() );
68 
71  ObservedTrackMap::const_iterator itrMap = trk_map->begin();
72 
73  // Check size of track collection matches size of observed tracks map
74  if(aod->size() != trk_map->size()){
75  ATH_MSG_ERROR("convertAndAugment: Number of tracks different in collection to convert vs. observed tracks map: "<<aod->size()<<" vs. "<<trk_map->size());
76  return StatusCode::FAILURE;
77  }
78 
79  for( ;itr!=end;++itr ) {
80  // Create the xAOD object:
81  if (!(*itr)) {
82  ATH_MSG_WARNING("convertAndAugment: Empty element in container!");
83  continue;
84  }
85  xAOD::TrackParticle* particle = createParticle(*xaod, *aod, **itr, vtx);
86  if(!particle){
87  ATH_MSG_WARNING("convertAndAugment: Failed to create a TrackParticle");
88  ++itrMap;
89  continue;
90  }
91  // Augment xAOD object with information from track map
92  static const SG::Decorator<long int> IdDec ("Id");
93  IdDec (*particle) = (*itrMap).first;
94 
95 #define DECORATE2(NAME, SEL, TYPE) \
96  static const SG::Decorator<TYPE> NAME##Dec (#NAME); \
97  NAME##Dec(*particle) = std::get<xAOD::ObserverToolIndex::SEL>((*itrMap).second)
98 #define DECORATE(NAME, TYPE) DECORATE2(NAME, NAME, TYPE)
99  DECORATE(score, double);
100  DECORATE(rejectStep, int);
101  DECORATE(rejectReason, int);
102  DECORATE(parentId, long int);
103  DECORATE(numPixelHoles, int);
104  DECORATE(numSCTHoles, int);
109  DECORATE(numShared, int);
110  DECORATE(isPatternTrack, int);
111  DECORATE(totalSiHits, int);
112  DECORATE(inROI, int);
113  DECORATE2(thishasblayer, hasIBLHit, int);
114  DECORATE2(hassharedblayer, hasSharedIBLHit, int);
115  DECORATE2(hassharedpixel, hasSharedPixel, int);
116  DECORATE2(firstisshared, firstPixIsShared, int);
119  DECORATE(numPixelHits, int);
120  DECORATE(numSCTHits, int);
121  DECORATE(numUnused, int);
122  DECORATE(numTRT_Unused, int);
123  DECORATE(numSCT_Unused, int);
124  DECORATE(numPseudo, int);
125  DECORATE(averageSplit1, int);
126  DECORATE(averageSplit2, int);
128 #undef DECORATE
129 #undef DECORATE2
130 
131  const std::vector<xAOD::RejectionStep>& v_rejectStep =
132  std::get<xAOD::ObserverToolIndex::rejectStep_full>((*itrMap).second);
133  const std::vector<xAOD::RejectionReason>& v_rejectReason =
134  std::get<xAOD::ObserverToolIndex::rejectReason_full>((*itrMap).second);
135  static const SG::Decorator<std::vector<int> > rejectStep_fullDec ("rejectStep_full");
136  static const SG::Decorator<std::vector<int> > rejectReason_fullDec ("rejectReason_full");
137  rejectStep_fullDec(*particle).assign (v_rejectStep.begin(), v_rejectStep.end());
138  rejectReason_fullDec(*particle).assign (v_rejectReason.begin(), v_rejectReason.end());
139  ATH_MSG_DEBUG("convertAndAugment: Augmenting TrackParticle with id "
140  << IdDec(*particle) << " and rejectReason "
141  << rejectReasonDec(*particle)
142  << " (has chi2 = " << particle->chiSquared() << ")");
143  ++itrMap;
144  }
146  "convertAndAugment: Sizes of containers after conversion: aod, xaod: "
147  << aod->size() << ", " << xaod->size());
148  return StatusCode::SUCCESS;
149  }

◆ createParticle()

xAOD::TrackParticle * xAODMaker::TrackCollectionCnvTool::createParticle ( xAOD::TrackParticleContainer xaod,
const TrackCollection container,
const Trk::Track tp,
const xAOD::Vertex vtx 
) const
inlineprivate

Definition at line 151 of file TrackCollectionCnvTool.cxx.

154  {
155  // create the xAOD::TrackParticle, the pointer is added to the container in the function
156  ElementLink<TrackCollection> trackLink( &tp, container );
157  return m_particleCreator->createParticle( trackLink, &xaod , vtx);
158  //no! return m_particleCreator->createParticle( tp, &xaod );
159  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ initialize()

StatusCode xAODMaker::TrackCollectionCnvTool::initialize ( )
overridevirtual

Function initialising the tool.

Definition at line 28 of file TrackCollectionCnvTool.cxx.

28  {
29  // Greet the user:
30  ATH_MSG_INFO( "Initializing TrackCollectionCnvTool with " << m_particleCreator.name() );
31  ATH_CHECK( m_particleCreator.retrieve() );
32 
33  return StatusCode::SUCCESS;
34  }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

static const InterfaceID& xAODMaker::ITrackCollectionCnvTool::interfaceID ( )
inlinestaticinherited

Gaudi interface definition.

Definition at line 47 of file ITrackCollectionCnvTool.h.

47  {
48  return IID_ITrackCollectionCnvTool;
49  }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::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< AlgTool > >::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< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setParticleCreatorTool()

StatusCode xAODMaker::TrackCollectionCnvTool::setParticleCreatorTool ( ToolHandle< Trk::ITrackParticleCreatorTool > *  tool)
overridevirtual

allow other algorithms to pass the tool in order to preserve initialisation

Implements xAODMaker::ITrackCollectionCnvTool.

Definition at line 161 of file TrackCollectionCnvTool.cxx.

162  {
163  ATH_MSG_DEBUG( "In setParticleCreatorTool" );
165 
166  return StatusCode::SUCCESS;
167  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_particleCreator

ToolHandle<Trk::ITrackParticleCreatorTool> xAODMaker::TrackCollectionCnvTool::m_particleCreator
private

Definition at line 50 of file TrackCollectionCnvTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::numSharedOrSplit
@ numSharedOrSplit
Definition: TrackingPrimitives.h:521
xAOD::hasIBLHit
@ hasIBLHit
Definition: TrackingPrimitives.h:527
xAOD::numWeightedShared
@ numWeightedShared
Definition: TrackingPrimitives.h:541
xAOD::numUnused
@ numUnused
Definition: TrackingPrimitives.h:535
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::isPatternTrack
@ isPatternTrack
Definition: TrackingPrimitives.h:524
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
xAOD::averageSplit2
@ averageSplit2
Definition: TrackingPrimitives.h:540
xAOD::hasSharedIBLHit
@ hasSharedIBLHit
Definition: TrackingPrimitives.h:528
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::numSplitSharedPixel
@ numSplitSharedPixel
Definition: TrackingPrimitives.h:519
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
xAOD::numPseudo
@ numPseudo
Definition: TrackingPrimitives.h:538
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::firstPixIsShared
@ firstPixIsShared
Definition: TrackingPrimitives.h:530
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::hasSharedPixel
@ hasSharedPixel
Definition: TrackingPrimitives.h:529
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAOD::numSCTDeadSensor
@ numSCTDeadSensor
Definition: TrackingPrimitives.h:532
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
xAODMaker::TrackCollectionCnvTool::m_particleCreator
ToolHandle< Trk::ITrackParticleCreatorTool > m_particleCreator
Definition: TrackCollectionCnvTool.h:50
xAOD::totalSiHits
@ totalSiHits
Definition: TrackingPrimitives.h:525
xAOD::numPixelHits
@ numPixelHits
Definition: TrackingPrimitives.h:533
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::numSharedOrSplitPixels
@ numSharedOrSplitPixels
Definition: TrackingPrimitives.h:522
xAOD::numSCTHits
@ numSCTHits
Definition: TrackingPrimitives.h:534
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::rejectStep
@ rejectStep
Definition: TrackingPrimitives.h:514
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::numSCT_Unused
@ numSCT_Unused
Definition: TrackingPrimitives.h:537
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::inROI
@ inROI
Definition: TrackingPrimitives.h:526
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
xAOD::averageSplit1
@ averageSplit1
Definition: TrackingPrimitives.h:539
xAOD::score
@ score
Definition: TrackingPrimitives.h:513
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
a
TList * a
Definition: liststreamerinfos.cxx:10
h
DECORATE2
#define DECORATE2(NAME, SEL, TYPE)
xAOD::parentId
@ parentId
Definition: TrackingPrimitives.h:516
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::rejectReason
@ rejectReason
Definition: TrackingPrimitives.h:515
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
DECORATE
#define DECORATE(NAME, TYPE)
xAOD::numPixelHoles
@ numPixelHoles
Definition: TrackingPrimitives.h:517
xAODMaker::TrackCollectionCnvTool::createParticle
xAOD::TrackParticle * createParticle(xAOD::TrackParticleContainer &xaod, const TrackCollection &container, const Trk::Track &tp, const xAOD::Vertex *vtx) const
Definition: TrackCollectionCnvTool.cxx:151
xAOD::numTRT_Unused
@ numTRT_Unused
Definition: TrackingPrimitives.h:536
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::numSCTHoles
@ numSCTHoles
Definition: TrackingPrimitives.h:518
xAOD::numSplitSharedSCT
@ numSplitSharedSCT
Definition: TrackingPrimitives.h:520
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::numShared
@ numShared
Definition: TrackingPrimitives.h:523
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::numPixelDeadSensor
@ numPixelDeadSensor
Definition: TrackingPrimitives.h:531
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528