LDMX Software
Public Member Functions | Private Attributes | List of all members
hcal::HcalTriggerGeometryProvider Class Reference

Public Member Functions

 HcalTriggerGeometryProvider (const std::string &name, const std::string &tagname, const framework::config::Parameters &parameters, framework::Process &process)
 Class constructor.
 
virtual ~HcalTriggerGeometryProvider ()
 Destructor.
 
virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOVgetCondition (const ldmx::EventHeader &context)
 Provides access to the HcalGeometry or HcalTriggerGeometry.
 
virtual void releaseConditionsObject (const framework::ConditionsObject *co)
 Take no action on release, as the object is permanently owned by the Provider.
 
- 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 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

HcalTriggerGeometryhcalTriggerGeometry_
 

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

Definition at line 62 of file HcalTriggerGeometry.cxx.

Constructor & Destructor Documentation

◆ HcalTriggerGeometryProvider()

hcal::HcalTriggerGeometryProvider::HcalTriggerGeometryProvider ( const std::string &  name,
const std::string &  tagname,
const framework::config::Parameters parameters,
framework::Process process 
)
inline

Class constructor.

Definition at line 67 of file HcalTriggerGeometry.cxx.

71 : ConditionsObjectProvider(HcalTriggerGeometry::CONDITIONS_OBJECT_NAME,
72 tagname, parameters, process),
73 hcalTriggerGeometry_{nullptr} {}
be configured to load conditions objects from CSV files.
const Process & process() const
Get the process handle.

◆ ~HcalTriggerGeometryProvider()

virtual hcal::HcalTriggerGeometryProvider::~HcalTriggerGeometryProvider ( )
inlinevirtual

Destructor.

Definition at line 76 of file HcalTriggerGeometry.cxx.

76 {
77 if (hcalTriggerGeometry_ != nullptr) delete hcalTriggerGeometry_;
78 hcalTriggerGeometry_ = nullptr;
79 }

Member Function Documentation

◆ getCondition()

virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOV > hcal::HcalTriggerGeometryProvider::getCondition ( const ldmx::EventHeader context)
inlinevirtual

Provides access to the HcalGeometry or HcalTriggerGeometry.

Note
Currently, these are assumed to be valid for all time, but this behavior could be changed. Users should not cache the pointer between events

Implements framework::ConditionsObjectProvider.

Definition at line 89 of file HcalTriggerGeometry.cxx.

89 {
90 if (hcalTriggerGeometry_ == nullptr) {
91 std::pair<const framework::ConditionsObject*, framework::ConditionsIOV>
92 cond_hcal_geom = requestParentCondition(
94 const ldmx::HcalGeometry* hcalgeom =
95 dynamic_cast<const ldmx::HcalGeometry*>(cond_hcal_geom.first);
96 hcalTriggerGeometry_ = new HcalTriggerGeometry(hcalgeom);
97 }
98 return std::make_pair(hcalTriggerGeometry_,
100 context.getRun(), context.getRun(), true, true));
101 }
Class which defines the run/event/type range for which a given condition is valid,...
std::pair< const ConditionsObject *, ConditionsIOV > requestParentCondition(const std::string &name, const ldmx::EventHeader &context)
Request another condition needed to construct this condition.
int getRun() const
Return the run number.
Definition EventHeader.h:84
Implementation of HCal strip readout.
static constexpr const char * CONDITIONS_OBJECT_NAME
Conditions object: The name of the python configuration calling this class (Hcal/python/HcalGeometry....

References ldmx::HcalGeometry::CONDITIONS_OBJECT_NAME, and ldmx::EventHeader::getRun().

◆ releaseConditionsObject()

virtual void hcal::HcalTriggerGeometryProvider::releaseConditionsObject ( const framework::ConditionsObject co)
inlinevirtual

Take no action on release, as the object is permanently owned by the Provider.

Reimplemented from framework::ConditionsObjectProvider.

Definition at line 107 of file HcalTriggerGeometry.cxx.

107{}

Member Data Documentation

◆ hcalTriggerGeometry_

HcalTriggerGeometry* hcal::HcalTriggerGeometryProvider::hcalTriggerGeometry_
private

Definition at line 110 of file HcalTriggerGeometry.cxx.


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