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

The provider of a tracking geometry. More...

Public Member Functions

 TrackersTrackingGeometryProvider (const std::string &name, const std::string &tag_name, const framework::config::Parameters &parameters, framework::Process &process)
 
std::pair< const framework::ConditionsObject *, framework::ConditionsIOVgetCondition (const ldmx::EventHeader &context) final override
 create the tracking geometry as configured by the input parameters, using the input context to update any run-dependent constants
 
- Public Member Functions inherited from framework::ConditionsObjectProvider
 ConditionsObjectProvider (const std::string &objname, const std::string &tagname, const framework::config::Parameters &parameters, Process &process)
 Class constructor.
 
virtual ~ConditionsObjectProvider ()
 Class destructor.
 
virtual void releaseConditionsObject (const ConditionsObject *co)
 Called by conditions system when done with a conditions object, appropriate point for cleanup.
 
virtual void onProcessStart ()
 Callback for the ConditionsObjectProvider to take any necessary action when the processing of events starts.
 
virtual void onProcessEnd ()
 Callback for the ConditionsObjectProvider to take any necessary action when the processing of events finishes, such as closing database connections.
 
virtual void onNewRun (ldmx::RunHeader &)
 Callback for the ConditionsObjectProvider to take any necessary action when the processing of events starts for a given run.
 
const std::string & getConditionObjectName () const
 Get the list of conditions objects available from this provider.
 
const std::string & getTagName () const
 Access the tag name.
 

Private Attributes

std::string detector_
 the path to the detector we will use for tracking
 
bool debug_
 whether to have debug information or not
 

Additional Inherited Members

- Static Public Member Functions inherited from framework::ConditionsObjectProvider
static void declare (const std::string &classname, ConditionsObjectProviderMaker *)
 Internal function which is part of the PluginFactory machinery.
 
- Static Public Attributes inherited from framework::ConditionsObjectProvider
static const int CLASSTYPE {10}
 Constant used to types by the PluginFactory.
 
- Protected Member Functions inherited from framework::ConditionsObjectProvider
std::pair< const ConditionsObject *, ConditionsIOVrequestParentCondition (const std::string &name, const ldmx::EventHeader &context)
 Request another condition needed to construct this condition.
 
const Processprocess () const
 Get the process handle.
 
- Protected Attributes inherited from framework::ConditionsObjectProvider
logging::logger theLog_
 The logger for this ConditionsObjectProvider.
 

Detailed Description

The provider of a tracking geometry.

Definition at line 14 of file TrackersTrackingGeometryProvider.cxx.

Constructor & Destructor Documentation

◆ TrackersTrackingGeometryProvider()

tracking::geo::TrackersTrackingGeometryProvider::TrackersTrackingGeometryProvider ( const std::string &  name,
const std::string &  tag_name,
const framework::config::Parameters parameters,
framework::Process process 
)

Definition at line 39 of file TrackersTrackingGeometryProvider.cxx.

43 : framework::ConditionsObjectProvider(name, tag_name, parameters, process) {
44 detector_ = parameters.getParameter<std::string>("detector");
45 debug_ = parameters.getParameter<bool>("debug");
46}
Base class for all providers of conditions objects.
const Process & process() const
Get the process handle.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
Definition Parameters.h:89
std::string detector_
the path to the detector we will use for tracking

Member Function Documentation

◆ getCondition()

std::pair< const framework::ConditionsObject *, framework::ConditionsIOV > tracking::geo::TrackersTrackingGeometryProvider::getCondition ( const ldmx::EventHeader context)
finaloverridevirtual

create the tracking geometry as configured by the input parameters, using the input context to update any run-dependent constants

Parameters
[in]contextEventHeader with contextual information to pull from
Returns
pair of the created object and the associated interval of validity

For now, the tracking geometry is assumed to be accurate for the entire IOV of the GeometryContext.

we need the context for this geometry so we request the parent condition

return a new trackers tracking geometry, the conditions system handles cleaning up with the realeaseConditionsObject function which - by default

  • simply deletes the allocated conditions object. This probably will confuse linters and debuggers but is the main way to do it in the currently-designed conditions system.

Implements framework::ConditionsObjectProvider.

Definition at line 49 of file TrackersTrackingGeometryProvider.cxx.

50 {
59 auto [condition, iov] =
61
62 auto the_context = dynamic_cast<const GeometryContext*>(condition);
63
71 return std::make_pair(
72 new TrackersTrackingGeometry(the_context->get(), detector_, debug_), iov);
73}
std::pair< const ConditionsObject *, ConditionsIOV > requestParentCondition(const std::string &name, const ldmx::EventHeader &context)
Request another condition needed to construct this condition.
static const std::string NAME
Conditions object name.

References debug_, detector_, tracking::geo::GeometryContext::NAME, and framework::ConditionsObjectProvider::requestParentCondition().

Member Data Documentation

◆ debug_

bool tracking::geo::TrackersTrackingGeometryProvider::debug_
private

whether to have debug information or not

Definition at line 36 of file TrackersTrackingGeometryProvider.cxx.

Referenced by getCondition().

◆ detector_

std::string tracking::geo::TrackersTrackingGeometryProvider::detector_
private

the path to the detector we will use for tracking

Definition at line 34 of file TrackersTrackingGeometryProvider.cxx.

Referenced by getCondition().


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