![]() |
ATLAS Offline Software
|
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -> handles the aligned transforms of the Surfaces & volumes 2) MagneticFieldContext -> Contains the magnetic field 3) CalibrationContext -> Pipes the StoreGate access through the Acts caller chain The utility class declares the data dependencies on the needed conditions by calling the declareProperty on its client. More...
#include <ContextUtility.h>
Public Member Functions | |
| template<class PropOwner> | |
| ContextUtility (PropOwner *owner) | |
| Constructor taking the pointer to the class holding the object used to declare the data dependency from the WriteHandleKeys to the AvalancheScheduler. | |
| StatusCode | initialize (const bool enable=true) |
| Initializes the ReadHandleKeys held by the utility class. | |
| 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. | |
| Acts::MagneticFieldContext | getMagneticFieldContext (const EventContext &ctx) const |
| Retrieves the current magnetic field context from StoreGate. | |
Private Member Functions | |
| MsgStream & | msg (const MSG::Level lvl) const |
| Return the reference to the msg logging stream. | |
| bool | msgLvl (const MSG::Level lvl) const |
| Returns whether the stream satisfies the logging level. | |
Private Attributes | |
| GeoContextReadKey_t | m_geoCtxKey |
| Data dependency on the aligned geometry transforms. | |
| SG::ReadCondHandleKey< AtlasFieldCacheCondObj > | m_magCtxKey |
| Data dependency on the magnetic field map. | |
| std::function< MsgStream &(const MSG::Level)> | m_msgPrinter |
| Lambda to access the parent's msg stream. | |
| std::function< bool(const MSG::Level)> | m_msgLevel |
| Lambda to return the msg level from the parent's msg stream. | |
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -> handles the aligned transforms of the Surfaces & volumes 2) MagneticFieldContext -> Contains the magnetic field 3) CalibrationContext -> Pipes the StoreGate access through the Acts caller chain The utility class declares the data dependencies on the needed conditions by calling the declareProperty on its client.
Likewise any StoreGateKey the Utility needs to be initialized in in the initialize method.
Definition at line 27 of file ContextUtility.h.
|
explicit |
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::ContextUtility m_ctxProvider{this};
| Acts::CalibrationContext ActsTrk::ContextUtility::getCalibrationContext | ( | const EventContext & | ctx | ) | const |
Retrieves the current calibration context from StoreGate.
| ctx | The event context to access the conditions store |
Definition at line 43 of file ContextUtility.cxx.
| Acts::GeometryContext ActsTrk::ContextUtility::getGeometryContext | ( | const EventContext & | ctx | ) | const |
Retrieves the current geometry context from StoreGate.
| ctx | The event context to access the conditions store |
Definition at line 30 of file ContextUtility.cxx.
| Acts::MagneticFieldContext ActsTrk::ContextUtility::getMagneticFieldContext | ( | const EventContext & | ctx | ) | const |
Retrieves the current magnetic field context from StoreGate.
| ctx | The event context to access the conditions store |
Definition at line 47 of file ContextUtility.cxx.
| StatusCode ActsTrk::ContextUtility::initialize | ( | const bool | enable = true | ) |
Initializes the ReadHandleKeys held by the utility class.
| enable | Flag to toggle whether the key shall be used or not |
Definition at line 16 of file ContextUtility.cxx.
|
private |
Return the reference to the msg logging stream.
| lvl | Logging level to be applied |
Definition at line 22 of file ContextUtility.cxx.
|
private |
Returns whether the stream satisfies the logging level.
Definition at line 26 of file ContextUtility.cxx.
|
private |
Data dependency on the aligned geometry transforms.
Definition at line 49 of file ContextUtility.h.
|
private |
Data dependency on the magnetic field map.
Definition at line 51 of file ContextUtility.h.
|
private |
Lambda to return the msg level from the parent's msg stream.
Definition at line 55 of file ContextUtility.h.
|
private |
Lambda to access the parent's msg stream.
Definition at line 53 of file ContextUtility.h.