ATLAS Offline Software
Loading...
Searching...
No Matches
ContextUtility.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_CONTEXTUTILITY_H
5#define ACTSEVENT_CONTEXTUTILITY_H
6
7
10
12
15
16#include "Acts/Utilities/CalibrationContext.hpp"
17#include "Acts/MagneticField/MagneticFieldContext.hpp"
18
19namespace ActsTrk{
28 public:
33 template <class PropOwner>
34 explicit ContextUtility(PropOwner* owner);
37 StatusCode initialize(const bool enable = true);
40 Acts::GeometryContext getGeometryContext(const EventContext& ctx) const;
43 Acts::CalibrationContext getCalibrationContext(const EventContext& ctx) const;
46 Acts::MagneticFieldContext getMagneticFieldContext(const EventContext& ctx) const;
47 private:
53 std::function<MsgStream&(const MSG::Level)> m_msgPrinter;
55 std::function<bool(const MSG::Level)> m_msgLevel;
58 MsgStream& msg(const MSG::Level lvl) const;
60 bool msgLvl(const MSG::Level lvl) const;
61 };
62
63}
65#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_magCtxKey
Data dependency on the magnetic field map.
Acts::MagneticFieldContext getMagneticFieldContext(const EventContext &ctx) const
Retrieves the current magnetic field context from StoreGate.
ContextUtility(PropOwner *owner)
Constructor taking the pointer to the class holding the object used to declare the data dependency fr...
bool msgLvl(const MSG::Level lvl) const
Returns whether the stream satisfies the logging level.
Acts::GeometryContext getGeometryContext(const EventContext &ctx) const
Retrieves the current geometry context from StoreGate.
Acts::CalibrationContext getCalibrationContext(const EventContext &ctx) const
Retrieves the current calibration context from StoreGate.
std::function< bool(const MSG::Level)> m_msgLevel
Lambda to return the msg level from the parent's msg stream.
GeoContextReadKey_t m_geoCtxKey
Data dependency on the aligned geometry transforms.
std::function< MsgStream &(const MSG::Level)> m_msgPrinter
Lambda to access the parent's msg stream.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
SG::ReadHandleKey< GeometryContext > GeoContextReadKey_t
Abrivate the ReadHandleKey to declare the data dependency on the Geometry context.
void initialize()
MsgStream & msg
Definition testRead.cxx:32