ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
ActsTrk::AuxiliaryMeasurementHandler Class Reference

Utility class to handle the creation of the Auxiliary measurement used in an Acts track fit This class declares the additionally written xAOD::AuxiliaryMeasurementContainers to the AvalancheScheduler. More...

#include <AuxiliaryMeasurementHandler.h>

Collaboration diagram for ActsTrk::AuxiliaryMeasurementHandler:

Classes

class  MeasurementProvider
 Helper struct to create a new pseudo measurement. More...
 

Public Types

using SurfacePtr_t = xAOD::AuxiliaryMeasurement::SurfacePtr_t
 

Public Member Functions

template<class PropOwner >
 AuxiliaryMeasurementHandler (PropOwner *owner)
 Constructor taking the pointer to the class holding the object used to declare the data dependency from the WriteHandleKeys to the AvalancheScheduler. More...
 
StatusCode initialize (const std::string &preFix)
 Initialize the write handle keys. More...
 
MeasurementProvider makeHandle (const EventContext &ctx, xAOD::TrackSurfaceContainer &surfaceBackend) const
 Creates a new MeasurementProvider and triggers the write of the container backend to StoreGate. More...
 

Private Types

using Key_t = SG::WriteHandleKey< xAOD::AuxiliaryMeasurementContainer >
 

Private Attributes

MsgStream & m_msg
 
Key_t m_writeKey1D
 
Key_t m_writeKey2D
 
Key_t m_writeKey3D
 
ActsGeometryContext m_gctx {}
 

Detailed Description

Utility class to handle the creation of the Auxiliary measurement used in an Acts track fit This class declares the additionally written xAOD::AuxiliaryMeasurementContainers to the AvalancheScheduler.

Per event, the user creates an instance of the MeasurementProvider which setups the storage backend for the measurements and writes the containers to StoreGate. Auxiliary measurements are created by calling the newMeasurement method.

Definition at line 21 of file AuxiliaryMeasurementHandler.h.

Member Typedef Documentation

◆ Key_t

Definition at line 95 of file AuxiliaryMeasurementHandler.h.

◆ SurfacePtr_t

Definition at line 23 of file AuxiliaryMeasurementHandler.h.

Constructor & Destructor Documentation

◆ AuxiliaryMeasurementHandler()

template<class PropOwner >
ActsTrk::AuxiliaryMeasurementHandler::AuxiliaryMeasurementHandler ( PropOwner *  owner)

Constructor taking the pointer to the class holding the object used to declare the data dependency from the WriteHandleKeys to the AvalancheScheduler.

The object should be defined in the header like ActsTrk::AuxiliaryMeasurementHandler m_pseudoHandle{this};

Member Function Documentation

◆ initialize()

StatusCode ActsTrk::AuxiliaryMeasurementHandler::initialize ( const std::string &  preFix)

Initialize the write handle keys.

Parameters
preFixCommon prefix to be put in front of all keys

Definition at line 26 of file AuxiliaryMeasurementHandler.cxx.

26  {
27  unsigned counter{1};
28  for (auto& initMe : {&m_writeKey1D, &m_writeKey2D, &m_writeKey3D}){
29  (*initMe) = std::format("{:}AuxiliaryMeasContainer{:}D", preFix, counter++);
30  if (!initMe->initialize()) {
31  m_msg<<MSG::FATAL<<"Failed to initialize "<<(*initMe).fullKey()<<endmsg;
32  return StatusCode::FAILURE;
33  }
34  }
35  return StatusCode::SUCCESS;
36  }

◆ makeHandle()

AuxiliaryMeasurementHandler::MeasurementProvider ActsTrk::AuxiliaryMeasurementHandler::makeHandle ( const EventContext &  ctx,
xAOD::TrackSurfaceContainer surfaceBackend 
) const

Creates a new MeasurementProvider and triggers the write of the container backend to StoreGate.

The user needs to provide a reference to a mutable xAOD::TrackSurfaceContainer where the persistified surfaces are appended to. The client needs to ensure that the lifetime of the surface container prevails the provider's lifetime.

Parameters
ctxEventContext to write the containers to store gate
surfaceBackendReference to a mutable track surface container.

Definition at line 51 of file AuxiliaryMeasurementHandler.cxx.

52  {
53  MeasurementProvider newHandle{ctx, this, surfaceBackend};
54  if (!newHandle.setupContainers()) {
55  THROW_EXCEPTION("Failed to setup the auxillary handle");
56  }
57  return newHandle;
58  }

Member Data Documentation

◆ m_gctx

ActsGeometryContext ActsTrk::AuxiliaryMeasurementHandler::m_gctx {}
private

Definition at line 100 of file AuxiliaryMeasurementHandler.h.

◆ m_msg

MsgStream& ActsTrk::AuxiliaryMeasurementHandler::m_msg
private

Definition at line 96 of file AuxiliaryMeasurementHandler.h.

◆ m_writeKey1D

Key_t ActsTrk::AuxiliaryMeasurementHandler::m_writeKey1D
private

Definition at line 97 of file AuxiliaryMeasurementHandler.h.

◆ m_writeKey2D

Key_t ActsTrk::AuxiliaryMeasurementHandler::m_writeKey2D
private

Definition at line 98 of file AuxiliaryMeasurementHandler.h.

◆ m_writeKey3D

Key_t ActsTrk::AuxiliaryMeasurementHandler::m_writeKey3D
private

Definition at line 99 of file AuxiliaryMeasurementHandler.h.


The documentation for this class was generated from the following files:
vtune_athena.format
format
Definition: vtune_athena.py:14
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:18
ActsTrk::AuxiliaryMeasurementHandler::m_writeKey2D
Key_t m_writeKey2D
Definition: AuxiliaryMeasurementHandler.h:98
ActsTrk::AuxiliaryMeasurementHandler::m_writeKey1D
Key_t m_writeKey1D
Definition: AuxiliaryMeasurementHandler.h:97
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition: throwExcept.h:10
ActsTrk::AuxiliaryMeasurementHandler::m_writeKey3D
Key_t m_writeKey3D
Definition: AuxiliaryMeasurementHandler.h:99
test_pyathena.counter
counter
Definition: test_pyathena.py:15
ActsTrk::AuxiliaryMeasurementHandler::m_msg
MsgStream & m_msg
Definition: AuxiliaryMeasurementHandler.h:96