LDMX Software
MagneticFieldContext.cxx
1#include "Tracking/geo/MagneticFieldContext.h"
2
4#include "Framework/Configure/Parameters.h"
5#include "Framework/Exception/Exception.h"
6
7namespace tracking::geo {
8
9const std::string MagneticFieldContext::NAME = "TrackingMagneticFieldContext";
10
12 : framework::ConditionsObject(NAME) {}
13
14const Acts::MagneticFieldContext& MagneticFieldContext::get() const {
16}
17
20 public:
29 MagneticFieldContextProvider(const std::string& name,
30 const std::string& tagname,
31 const framework::config::Parameters& parameters,
34 parameters, process) {}
35
45 std::pair<const framework::ConditionsObject*, framework::ConditionsIOV>
46 getCondition(const ldmx::EventHeader& context) final override {
47 return std::make_pair<const framework::ConditionsObject*,
50 }
51};
52
53} // namespace tracking::geo
54
55DECLARE_CONDITIONS_PROVIDER_NS(tracking::geo, MagneticFieldContextProvider)
Base class for provider of conditions information like pedestals, gains, electronics maps,...
#define DECLARE_CONDITIONS_PROVIDER_NS(NS, CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
be configured to load conditions objects from CSV files.
Class which defines the run/event/type range for which a given condition is valid,...
Base class for all providers of conditions objects.
const Process & process() const
Get the process handle.
Base class for all conditions objects, very simple.
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Provides header information an event such as event number and timestamp.
Definition EventHeader.h:44
MagneticFieldContextProvider(const std::string &name, const std::string &tagname, const framework::config::Parameters &parameters, framework::Process &process)
Create the context conditions object.
std::pair< const framework::ConditionsObject *, framework::ConditionsIOV > getCondition(const ldmx::EventHeader &context) final override
Get the context as a conditions object.
The context for a specific geometry.
Acts::MagneticFieldContext magnetic_field_context_
the actual geometry context we are wrapping
const Acts::MagneticFieldContext & get() const
get a reference to the actual geometry context ACTS object
MagneticFieldContext()
This constructor is where parameters would be passed into the MagneticField context from the provider...
static const std::string NAME
Conditions object name.
All classes in the ldmx-sw project use this namespace.
Definition PerfDict.cxx:45
Visualization.