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

Retrieves all InDet::SpacePoint data for Pixel and SCT. More...

#include <SiSpacePointRetriever.h>

Inheritance diagram for JiveXML::SiSpacePointRetriever:
Collaboration diagram for JiveXML::SiSpacePointRetriever:

Public Member Functions

 SiSpacePointRetriever (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor. More...
 
virtual StatusCode retrieve (ToolHandle< IFormatTool > &FormatTool)
 Retrieve all the data. More...
 
virtual std::string dataTypeName () const
 Return the name of the data type. More...
 
virtual StatusCode initialize ()
 Only retrieve geo tool in initialize. 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 ()
 Return the interface identifier. 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

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

const ToolHandle< IInDetGeoModelToolm_geo {this,"GeoModelTool","JiveXML::InDetGeoModelTool/InDetGeoModelTool",""}
 A tool handle to the geo model tool. More...
 
SG::ReadHandleKey< SpacePointContainerm_PixelSPContainerName
 StoreGate key for Pixel space points. More...
 
SG::ReadHandleKey< SpacePointContainerm_SCTSPContainerName
 StoreGate key for SCT space points. More...
 
bool m_usePixelTruthMap = false
 StoreGate key for pixel PRD_MultiTruth. More...
 
SG::ReadHandleKey< PRD_MultiTruthCollectionm_PixelPRDTruthName
 
bool m_useSCTTruthMap = false
 StoreGate key for SCT PRD_MultiTruth. More...
 
SG::ReadHandleKey< PRD_MultiTruthCollectionm_SCTPRDTruthName
 
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

Retrieves all InDet::SpacePoint data for Pixel and SCT.

Definition at line 35 of file SiSpacePointRetriever.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

◆ SiSpacePointRetriever()

JiveXML::SiSpacePointRetriever::SiSpacePointRetriever ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard Constructor.

This is the standard AthAlgTool constructor.

Parameters
typeAlgTool type name
nameAlgTool instance name
parentAlgTools parent owning this tool

Definition at line 30 of file SiSpacePointRetriever.cxx.

30  :
32  {
33 
34  //Declare the interface
35  declareInterface<IDataRetriever>(this);
36 
37  //And the properties
38  declareProperty("PixelSpacePoints" , m_PixelSPContainerName = std::string("PixelSpacePoints"));
39  declareProperty("SCTSpacePoints" , m_SCTSPContainerName = std::string("SCT_SpacePoints"));
40  declareProperty("PRD_TruthPixel" , m_PixelPRDTruthName = std::string("PRD_MultiTruthPixel"));
41  declareProperty("PRD_TruthSCT" , m_SCTPRDTruthName = std::string("PRD_MultiTruthSCT"));
42  }

Member Function Documentation

◆ dataTypeName()

virtual std::string JiveXML::SiSpacePointRetriever::dataTypeName ( ) const
inlinevirtual

Return the name of the data type.

Implements JiveXML::IDataRetriever.

Definition at line 47 of file SiSpacePointRetriever.h.

47 { return "S3D"; };

◆ 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 JiveXML::SiSpacePointRetriever::initialize ( )
virtual

Only retrieve geo tool in initialize.

Definition at line 260 of file SiSpacePointRetriever.cxx.

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

const InterfaceID & JiveXML::IDataRetriever::interfaceID ( )
inlinestaticinherited

Return the interface identifier.

Definition at line 40 of file IDataRetriever.h.

40 { return IID_IDataRetriever; }

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

◆ retrieve()

StatusCode JiveXML::SiSpacePointRetriever::retrieve ( ToolHandle< IFormatTool > &  FormatTool)
virtual

Retrieve all the data.

Implementation of DataRetriever interface.

Parameters
FormatToolthe tool that will create formated output from the DataMap

Try to retrieve all the relevant collections

Now make a list of SpacePoint - PRDTruth collection pairs to run over

Found out how much space we will need

Declare all the data we want to retrieve

Now fill in all the data

Implements JiveXML::IDataRetriever.

Definition at line 109 of file SiSpacePointRetriever.cxx.

109  {
110 
111  //be verbose
112  ATH_MSG_DEBUG( "Retrieving " << dataTypeName() );
113 
119  if ( not PixelSPContainer.isValid() )
120  ATH_MSG_WARNING( "Unable to retrieve SpacePoint container with name " << m_PixelSPContainerName.key() );
121 
123  if (m_usePixelTruthMap) {
124  PixelPRDTruthColl = SG::makeHandle(m_PixelPRDTruthName);
125  if ( not PixelPRDTruthColl.isValid() )
126  ATH_MSG_WARNING( "Unable to retrieve PRD_MultiTruth collection with name " << m_PixelPRDTruthName.key() );
127  }
128 
130  if ( not SCTSPContainer.isValid() )
131  ATH_MSG_WARNING( "Unable to retrieve SpacePoint container with name " << m_SCTSPContainerName.key() );
132 
134  if (m_useSCTTruthMap) {
135  SCTPRDTruthColl = SG::makeHandle(m_SCTPRDTruthName);
136  if ( not SCTPRDTruthColl.isValid() )
137  ATH_MSG_WARNING( "Unable to retrieve PRD_MultiTruth collection with name " << m_SCTPRDTruthName.key() );
138  }
139 
143  using SpacePointTruthPair = std::pair<const SpacePointContainer *, const PRD_MultiTruthCollection *>;
144  std::vector<SpacePointTruthPair> SpacePointTruthPairList;
145 
146  //Add Pixel if there is a collection
147  if (PixelSPContainer.isValid())
148  SpacePointTruthPairList.emplace_back(PixelSPContainer.cptr(), m_usePixelTruthMap ? PixelPRDTruthColl.cptr() : nullptr);
149 
150  //Add SCT if there is a collection
151  if (SCTSPContainer.isValid())
152  SpacePointTruthPairList.emplace_back(SCTSPContainer.cptr(), m_useSCTTruthMap ? SCTPRDTruthColl.cptr() : nullptr);
153 
157  int NSpacePoints = 0;
158  //Loop over all SpacePoint - PRDTruth pairs
159  for (const auto &SPTruthPair : SpacePointTruthPairList) {
160 
161  //Add up the size of the SpacePoint collections in the container
162  for (const auto SpacePoint : *(SPTruthPair.first))
163  NSpacePoints += SpacePoint->size();
164  }
165 
166  ATH_MSG_DEBUG( "Counted " << NSpacePoints << " in total" );
167 
171  DataVect x; x.reserve(NSpacePoints);
172  DataVect y; y.reserve(NSpacePoints);
173  DataVect z; z.reserve(NSpacePoints);
174  DataVect clusters; clusters.reserve(NSpacePoints*2);
175  DataVect phiModule; phiModule.reserve(NSpacePoints);
176  DataVect etaModule; etaModule.reserve(NSpacePoints);
177  DataVect numBarcodes; numBarcodes.reserve(NSpacePoints);
178  DataVect barcodes; barcodes.reserve(NSpacePoints); // Usually less then one per space point
179 
184  //Loop over all SpacePoint - PRDTruth pairs
185  for (const auto &SPTruthPair : SpacePointTruthPairList) {
186 
187  // Loop over SpacePoint Collections in the SpacePoint container
188  for (const auto SpacePointColl : *(SPTruthPair.first)){
189 
190  //Loop over SpacePoints themselves
191  for (const auto SpacePoint : *SpacePointColl) {
192 
193  //Get the position of the space point
194  Amg::Vector3D point = SpacePoint->globalPosition();
195 
196  //Store position in units of centimeters
197  x.push_back(DataType(point.x() * CLHEP::mm/CLHEP::cm));
198  y.push_back(DataType(point.y() * CLHEP::mm/CLHEP::cm));
199  z.push_back(DataType(point.z() * CLHEP::mm/CLHEP::cm));
200 
201  //Get the cluster list for the Space point (first and second)
202  const std::pair<const Trk::PrepRawData*, const Trk::PrepRawData*> clusterList = SpacePoint->clusterList();
203 
204  //Get the identifiers of the first and second cluster
205  Identifier idFirst = clusterList.first->identify();
206  Identifier idSecond = (clusterList.second != NULL) ? clusterList.second->identify() : Identifier();
207 
208  //Get phi and eta of the module in detector coordinates of the first cluster
209  if (clusterList.first->type(Trk::PrepRawDataType::SCT_Cluster)) {
210  phiModule.push_back(DataType(m_geo->SCTIDHelper()->phi_module(idFirst)));
211  etaModule.push_back(DataType(m_geo->SCTIDHelper()->eta_module(idFirst)));
212  }
213  else {
214  phiModule.push_back(DataType(m_geo->PixelIDHelper()->phi_module(idFirst)));
215  etaModule.push_back(DataType(m_geo->PixelIDHelper()->eta_module(idFirst)));
216  }
217 
218  // Store the cluster(s) identifier (pair)
219  clusters.push_back(DataType(idFirst.get_compact()));
220  clusters.push_back((idSecond.is_valid()) ? DataType(idSecond.get_compact()) : DataType(-1));
221 
222  //Stop here if there is no truth
223  const PRD_MultiTruthCollection* PRDTruthColl = SPTruthPair.second;
224  if ( PRDTruthColl == nullptr ) continue ;
225 
226  // Finally get barcodes of associated truth particles
227  numBarcodes.push_back(SiSpacePointRetrieverHelpers::getTruthBarcodes(idFirst, idSecond, PRDTruthColl, barcodes));
228 
229  ATH_MSG_VERBOSE( "Found " << numBarcodes.back() << " common barcodes, now "
230  << barcodes.size() << " in total" );
231 
232  } // loop over SpacePoint collection
233  } // loop over SpacePoint container
234  } //loop over SpacePoint - TruthMap collection pairs
235 
236  //Now put together the DataMap
238  dataMap["x"] = x;
239  dataMap["y"] = y;
240  dataMap["z"] = z;
241  dataMap["clusters multiple=\"2\""] = clusters;
242  dataMap["phiModule"] = phiModule;
243  dataMap["etaModule"] = etaModule;
244 
245  //Only store truth associations if we retrieved them
246  if ( numBarcodes.size() > 0 ){
247  //Add barcodes counter
248  dataMap["numBarcodes"] = numBarcodes;
249  // Compute the "multiple" and put the barcodes vector in the map.
250  std::string bctag = "barcodes multiple=\""+DataType(barcodes.size()/double(numBarcodes.size())).toString()+"\"";
251  dataMap[bctag] = barcodes;
252  }
253 
254  ATH_MSG_DEBUG( dataTypeName() << ": "<< x.size() );
255 
256  //forward data to formating tool and return
257  return FormatTool->AddToEvent(dataTypeName(), "", &dataMap);
258  }

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

const ToolHandle<IInDetGeoModelTool> JiveXML::SiSpacePointRetriever::m_geo {this,"GeoModelTool","JiveXML::InDetGeoModelTool/InDetGeoModelTool",""}
private

A tool handle to the geo model tool.

Definition at line 55 of file SiSpacePointRetriever.h.

◆ m_PixelPRDTruthName

SG::ReadHandleKey<PRD_MultiTruthCollection> JiveXML::SiSpacePointRetriever::m_PixelPRDTruthName
private

Definition at line 66 of file SiSpacePointRetriever.h.

◆ m_PixelSPContainerName

SG::ReadHandleKey<SpacePointContainer> JiveXML::SiSpacePointRetriever::m_PixelSPContainerName
private

StoreGate key for Pixel space points.

Definition at line 59 of file SiSpacePointRetriever.h.

◆ m_SCTPRDTruthName

SG::ReadHandleKey<PRD_MultiTruthCollection> JiveXML::SiSpacePointRetriever::m_SCTPRDTruthName
private

Definition at line 70 of file SiSpacePointRetriever.h.

◆ m_SCTSPContainerName

SG::ReadHandleKey<SpacePointContainer> JiveXML::SiSpacePointRetriever::m_SCTSPContainerName
private

StoreGate key for SCT space points.

Definition at line 62 of file SiSpacePointRetriever.h.

◆ m_usePixelTruthMap

bool JiveXML::SiSpacePointRetriever::m_usePixelTruthMap = false
private

StoreGate key for pixel PRD_MultiTruth.

Definition at line 65 of file SiSpacePointRetriever.h.

◆ m_useSCTTruthMap

bool JiveXML::SiSpacePointRetriever::m_useSCTTruthMap = false
private

StoreGate key for SCT PRD_MultiTruth.

Definition at line 69 of file SiSpacePointRetriever.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:
JiveXML::SiSpacePointRetriever::m_SCTPRDTruthName
SG::ReadHandleKey< PRD_MultiTruthCollection > m_SCTPRDTruthName
Definition: SiSpacePointRetriever.h:70
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
SG::ReadHandle< SpacePointContainer >
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PRD_MultiTruthCollection
A PRD is mapped onto all contributing particles.
Definition: PRD_MultiTruthCollection.h:24
JiveXML::DataVect
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.
Definition: DataType.h:58
DataType
OFFLINE_FRAGMENTS_NAMESPACE::PointerType DataType
Definition: RoIBResultByteStreamTool.cxx:25
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
JiveXML::DataMap
std::map< std::string, DataVect > DataMap
Definition: DataType.h:59
x
#define x
Identifier::is_valid
bool is_valid() const
Check if id is in a valid state.
SpacePoint
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SpacePoint.h:6
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
JiveXML::SiSpacePointRetrieverHelpers::getTruthBarcodes
unsigned int getTruthBarcodes(const Identifier idFirst, const Identifier idSecond, const PRD_MultiTruthCollection *truthColl, DataVect &barcodes)
Get the barcodes of associated truth particles for a SpacePoint ( we require both clusters,...
Definition: SiSpacePointRetriever.cxx:55
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
python.Dumpers.barcodes
def barcodes(beg, end, sz)
Definition: Dumpers.py:2800
z
#define z
LArHistMerge_trf.dataMap
dataMap
Definition: LArHistMerge_trf.py:218
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
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
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
JiveXML::SiSpacePointRetriever::m_useSCTTruthMap
bool m_useSCTTruthMap
StoreGate key for SCT PRD_MultiTruth.
Definition: SiSpacePointRetriever.h:69
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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
JiveXML::SiSpacePointRetriever::dataTypeName
virtual std::string dataTypeName() const
Return the name of the data type.
Definition: SiSpacePointRetriever.h:47
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
JiveXML::SiSpacePointRetriever::m_geo
const ToolHandle< IInDetGeoModelTool > m_geo
A tool handle to the geo model tool.
Definition: SiSpacePointRetriever.h:56
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
JiveXML::SiSpacePointRetriever::m_PixelSPContainerName
SG::ReadHandleKey< SpacePointContainer > m_PixelSPContainerName
StoreGate key for Pixel space points.
Definition: SiSpacePointRetriever.h:59
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
TRT::Hit::phiModule
@ phiModule
Definition: HitInfo.h:80
Identifier::get_compact
value_type get_compact(void) const
Get the compact id.
Trk::PrepRawDataType::SCT_Cluster
@ SCT_Cluster
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
JiveXML::SiSpacePointRetriever::m_PixelPRDTruthName
SG::ReadHandleKey< PRD_MultiTruthCollection > m_PixelPRDTruthName
Definition: SiSpacePointRetriever.h:66
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
JiveXML::SiSpacePointRetriever::m_SCTSPContainerName
SG::ReadHandleKey< SpacePointContainer > m_SCTSPContainerName
StoreGate key for SCT space points.
Definition: SiSpacePointRetriever.h:62
JiveXML::SiSpacePointRetriever::m_usePixelTruthMap
bool m_usePixelTruthMap
StoreGate key for pixel PRD_MultiTruth.
Definition: SiSpacePointRetriever.h:65