ATLAS Offline Software
Loading...
Searching...
No Matches
AuxiliaryMeasurementHandler.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef ActsEvent_AuxiliaryMeasurementHandler_H
5#define ActsEvent_AuxiliaryMeasurementHandler_H
6
12#include "Acts/Utilities/Result.hpp"
13
14#include <unordered_map>
15
16namespace ActsTrk{
23 public:
29 template <class PropOwner>
30 AuxiliaryMeasurementHandler(PropOwner* owner);
34 StatusCode initialize(const std::string& preFix,
35 bool used = true);
36
39 public:
51
53 template<size_t N>
55 const ProjectorType projector,
56 const AmgSymMatrix(N)& locCov,
57 const AmgVector(N) locPos = AmgVector(N)::Zero());
58
59 private:
68 MeasurementProvider(const EventContext& ctx,
69 const Acts::GeometryContext& gctx,
70 const AuxiliaryMeasurementHandler* parent);
72 StatusCode setupContainers();
74 template<typename AuxCont_t, typename Cont_t>
75 StatusCode recordContainer(SG::WriteHandle<Cont_t>& handle);
76
77
78 const EventContext& m_ctx;
79 const Acts::GeometryContext m_gctx;
89 std::unordered_map<SurfacePtr_t, const xAOD::TrackSurface*> m_cachedSurfs{};
90
91 };
92
93 enum class HandleStatus: std::uint8_t{
94 ok = 0,
97 };
98 using HandleReturn_t = Acts::Result<MeasurementProvider, HandleStatus>;
99
108 HandleReturn_t makeHandle(const EventContext& ctx,
109 const Acts::GeometryContext& gctx) const;
110
111 private:
114 std::function<MsgStream&(const MSG::Level)> m_msgPrinter{};
116 std::function<bool(const MSG::Level)> m_msgLevel{};
127 MsgStream& msg(const MSG::Level lvl) const;
129 bool msgLvl(const MSG::Level lvl) const;
130 };
131}
133#endif
#define AmgSymMatrix(dim)
#define AmgVector(rows)
Property holding a SG store/key/clid from which a WriteHandle is made.
Handle class for recording to StoreGate.
MeasurementProvider & operator=(const MeasurementProvider &other)=delete
Delete the copy assignment.
MeasurementProvider & operator=(MeasurementProvider &&other)=delete
Default move assignment operator.
SG::WriteHandle< xAOD::AuxiliaryMeasurementContainer > WriteHandle_t
Abrivation of the WriteHandle.
StatusCode recordContainer(SG::WriteHandle< Cont_t > &handle)
StatusCode setupContainers()
Setup method to record the Auxiliary measurement containers into StoreGate.
MeasurementProvider(const MeasurementProvider &other)=delete
Delete the copy constructor.
MeasurementProvider(MeasurementProvider &&other)=default
Default move constructor.
SG::WriteHandle< xAOD::TrackSurfaceContainer > SurfaceHandle_t
xAOD::AuxiliaryMeasurement * newMeasurement(const SurfacePtr_t &surface, const ProjectorType projector, const AmgSymMatrix(N)&locCov, const AmgVector(N) locPos=AmgVector(N)::Zero())
std::unordered_map< SurfacePtr_t, const xAOD::TrackSurface * > m_cachedSurfs
List of precached surfaces.
Key_t m_writeKey2D
Key to write the 2D measurements.
Key_t m_writeKey1D
Key to write the 1D measurements.
SG::WriteHandleKey< xAOD::AuxiliaryMeasurementContainer > Key_t
HandleReturn_t makeHandle(const EventContext &ctx, const Acts::GeometryContext &gctx) const
Creates a new MeasurementProvider and triggers the write of the container backend to StoreGate.
Acts::Result< MeasurementProvider, HandleStatus > HandleReturn_t
xAOD::AuxiliaryMeasurement::SurfacePtr_t SurfacePtr_t
bool msgLvl(const MSG::Level lvl) const
Returns whether the stream satisfies the logging level.
AuxiliaryMeasurementHandler(PropOwner *owner)
Constructor taking the pointer to the class holding the object used to declare the data dependency fr...
std::function< bool(const MSG::Level)> m_msgLevel
Lambda to return the msg level from the parent's msg stream.
Key_t m_writeKey3D
Key to write the 2D + time measurements.
std::function< MsgStream &(const MSG::Level)> m_msgPrinter
Lambda to access the parent's msg stream.
SG::WriteHandleKey< xAOD::TrackSurfaceContainer > m_surfaceKey
Key to write the surfaces associated to the measurements.
Property holding a SG store/key/clid from which a WriteHandle is made.
holding In fact this class is here in order to allow STL container for all features This class is sho...
ActsTrk::detail::MeasurementCalibratorBase::ProjectorType ProjectorType
Use the calibration projector.
std::shared_ptr< const Acts::Surface > SurfacePtr_t
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
AuxiliaryMeasurement_v1 AuxiliaryMeasurement
void initialize()
MsgStream & msg
Definition testRead.cxx:32