LDMX Software
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
tracking::geo::MagneticFieldContext Class Reference

The context for a specific geometry. More...

#include <MagneticFieldContext.h>

Public Member Functions

const Acts::MagneticFieldContext & get () const
 get a reference to the actual geometry context ACTS object
 
- Public Member Functions inherited from framework::ConditionsObject
 ConditionsObject (const std::string &name)
 Class constructor.
 
virtual ~ConditionsObject ()
 Destructor.
 
std::string getName () const
 Get the name of this object.
 

Static Public Attributes

static const std::string NAME = "TrackingMagneticFieldContext"
 Conditions object name.
 

Private Member Functions

 MagneticFieldContext ()
 This constructor is where parameters would be passed into the MagneticField context from the provider.
 

Private Attributes

Acts::MagneticFieldContext magnetic_field_context_
 the actual geometry context we are wrapping
 

Friends

class MagneticFieldContextProvider
 the provider is a friend and so it can make one
 

Detailed Description

The context for a specific geometry.

This connects the Acts::MagneticFieldContext object to our conditions system so that it can be loaded from it. The MagneticFieldContext is what holds things like alignment constants within ACTS. Currently, we don't have any alignment constants so this just holds a default-constructed object for the entire run without doing anything else.

The context is both the object used as a condition and the provider of that condition. We could separate the two if a new context needs to be constructed when the conditions are updated but for now keeping them together reduces the amount of code needed.

Definition at line 29 of file MagneticFieldContext.h.

Constructor & Destructor Documentation

◆ MagneticFieldContext()

tracking::geo::MagneticFieldContext::MagneticFieldContext ( )
private

This constructor is where parameters would be passed into the MagneticField context from the provider.

Right now, there aren't any parameters to pass and so it is just default constructed. We still have it be private so that only the provider can make a new one.

Definition at line 11 of file MagneticFieldContext.cxx.

Base class for all conditions objects, very simple.
static const std::string NAME
Conditions object name.

Member Function Documentation

◆ get()

const Acts::MagneticFieldContext & tracking::geo::MagneticFieldContext::get ( ) const

get a reference to the actual geometry context ACTS object

Note
For future developers, the conditions object should handle the validity of the geometry context. In other words, if someone has a valid handle to a MagneticFieldContext object, they should be able to call this function without worry.

Definition at line 14 of file MagneticFieldContext.cxx.

14 {
16}
Acts::MagneticFieldContext magnetic_field_context_
the actual geometry context we are wrapping

References magnetic_field_context_.

Friends And Related Symbol Documentation

◆ MagneticFieldContextProvider

friend class MagneticFieldContextProvider
friend

the provider is a friend and so it can make one

Definition at line 45 of file MagneticFieldContext.h.

Member Data Documentation

◆ magnetic_field_context_

Acts::MagneticFieldContext tracking::geo::MagneticFieldContext::magnetic_field_context_
private

the actual geometry context we are wrapping

For now, this is just a regular object but if we want to actually modify the geometry context by re-constructing it in the future, it may need to evolve into some smart pointer so that it can be reconstructed at need OR we separate the conditions object which would be recreated whenever this object needs to be recreated.

Definition at line 64 of file MagneticFieldContext.h.

Referenced by get().

◆ NAME

const std::string tracking::geo::MagneticFieldContext::NAME = "TrackingMagneticFieldContext"
static

Conditions object name.

Definition at line 32 of file MagneticFieldContext.h.


The documentation for this class was generated from the following files: