LDMX Software
ecal::EcalTriggerGeometryProvider Class Reference

Public Member Functions

 EcalTriggerGeometryProvider (const std::string &name, const std::string &tagname, const framework::config::Parameters &parameters, framework::Process &process)
 Class constructor.
 
virtual ~EcalTriggerGeometryProvider ()
 Destructor.
 
virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOVgetCondition (const ldmx::EventHeader &context)
 Provides access to the EcalGeometry or EcalTriggerGeometry.
 
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
 DECLARE_FACTORY (ConditionsObjectProvider, std::shared_ptr< ConditionsObjectProvider >, const std::string &, const std::string &, const framework::config::Parameters &, Process &)
 declare that we have a factory for these types of classes
 
 ConditionsObjectProvider (const std::string &objname, const std::string &tagname, const framework::config::Parameters &parameters, Process &process)
 Class constructor.
 
virtual ~ConditionsObjectProvider ()=default
 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

EcalTriggerGeometryecal_trigger_geometry_
 

Additional Inherited Members

- 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 the_log_
 The logger for this ConditionsObjectProvider.
 

Detailed Description

Definition at line 145 of file EcalTriggerGeometry.cxx.

Constructor & Destructor Documentation

◆ EcalTriggerGeometryProvider()

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

Class constructor.

Definition at line 150 of file EcalTriggerGeometry.cxx.

154 : ConditionsObjectProvider(EcalTriggerGeometry::CONDITIONS_OBJECT_NAME,
155 tagname, parameters, process),
156 ecal_trigger_geometry_{nullptr} {}
const Process & process() const
Get the process handle.
ConditionsObjectProvider(const std::string &objname, const std::string &tagname, const framework::config::Parameters &parameters, Process &process)
Class constructor.

◆ ~EcalTriggerGeometryProvider()

virtual ecal::EcalTriggerGeometryProvider::~EcalTriggerGeometryProvider ( )
inlinevirtual

Destructor.

Definition at line 159 of file EcalTriggerGeometry.cxx.

159 {
160 if (ecal_trigger_geometry_ != nullptr) delete ecal_trigger_geometry_;
161 ecal_trigger_geometry_ = nullptr;
162 }

Member Function Documentation

◆ getCondition()

virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOV > ecal::EcalTriggerGeometryProvider::getCondition ( const ldmx::EventHeader & context)
inlinevirtual

Provides access to the EcalGeometry or EcalTriggerGeometry.

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 172 of file EcalTriggerGeometry.cxx.

172 {
173 if (ecal_trigger_geometry_ == nullptr) {
174 std::pair<const framework::ConditionsObject*, framework::ConditionsIOV>
175 cond_ecal_geom = requestParentCondition(
176 ldmx::EcalGeometry::CONDITIONS_OBJECT_NAME, context);
177 const ldmx::EcalGeometry* ecalgeom =
178 dynamic_cast<const ldmx::EcalGeometry*>(cond_ecal_geom.first);
179 ecal_trigger_geometry_ = new EcalTriggerGeometry(
180 INPLANE_IDENTICAL | LAYERS_IDENTICAL, ecalgeom);
181 }
182 return std::make_pair(ecal_trigger_geometry_,
184 context.getRun(), context.getRun(), true, true));
185 }
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.
Translation between real-space positions and cell IDs within the ECal.
int getRun() const
Return the run number.
Definition EventHeader.h:84

References ldmx::EventHeader::getRun(), and framework::ConditionsObjectProvider::requestParentCondition().

◆ releaseConditionsObject()

virtual void ecal::EcalTriggerGeometryProvider::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 191 of file EcalTriggerGeometry.cxx.

191{}

Member Data Documentation

◆ ecal_trigger_geometry_

EcalTriggerGeometry* ecal::EcalTriggerGeometryProvider::ecal_trigger_geometry_
private

Definition at line 194 of file EcalTriggerGeometry.cxx.


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