LDMX Software
Public Member Functions | Private Attributes | List of all members
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
 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

EcalTriggerGeometryecalTriggerGeometry_
 

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 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 ecalTriggerGeometry_{nullptr} {}
be configured to load conditions objects from CSV files.
const Process & process() const
Get the process handle.

◆ ~EcalTriggerGeometryProvider()

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

Destructor.

Definition at line 159 of file EcalTriggerGeometry.cxx.

159 {
160 if (ecalTriggerGeometry_ != nullptr) delete ecalTriggerGeometry_;
161 ecalTriggerGeometry_ = 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 (ecalTriggerGeometry_ == 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 ecalTriggerGeometry_ = new EcalTriggerGeometry(
180 INPLANE_IDENTICAL | LAYERS_IDENTICAL, ecalgeom);
181 }
182 return std::make_pair(ecalTriggerGeometry_,
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

◆ ecalTriggerGeometry_

EcalTriggerGeometry* ecal::EcalTriggerGeometryProvider::ecalTriggerGeometry_
private

Definition at line 194 of file EcalTriggerGeometry.cxx.


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