LDMX Software
Public Member Functions | Private Attributes | List of all members
ecal::EcalDetectorMapLoader Class Reference

Public Member Functions

 EcalDetectorMapLoader (const std::string &name, const std::string &tagname, const framework::config::Parameters &parameters, framework::Process &process)
 
virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOVgetCondition (const ldmx::EventHeader &context)
 Pure virtual getCondition function.
 
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

EcalDetectorMapthe_map_
 
std::string cell_map_
 
std::string motherboard_map_
 
std::string layer_map_
 
bool want_d2e_
 

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 10 of file EcalDetectorMap.cxx.

Constructor & Destructor Documentation

◆ EcalDetectorMapLoader()

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

Definition at line 12 of file EcalDetectorMap.cxx.

16 tagname, parameters, process),
17 the_map_{nullptr} {
18 want_d2e_ = parameters.getParameter<bool>("want_d2e");
19 cell_map_ = parameters.getParameter<std::string>("cell_map");
20 motherboard_map_ = parameters.getParameter<std::string>("motherboard_map");
21 layer_map_ = parameters.getParameter<std::string>("layer_map");
22 }
be configured to load conditions objects from CSV files.
static constexpr const char * CONDITIONS_OBJECT_NAME
The name of the EID <-> DetID map for the ECal.
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

Member Function Documentation

◆ getCondition()

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

Pure virtual getCondition function.

Must be implemented by any Conditions providers.

Implements framework::ConditionsObjectProvider.

Definition at line 26 of file EcalDetectorMap.cxx.

26 {
27 if (!the_map_) {
28 the_map_ = new EcalDetectorMap(cell_map_, motherboard_map_, layer_map_,
29 want_d2e_);
30 }
31
32 return std::make_pair(
33 the_map_, framework::ConditionsIOV(context.getRun(), context.getRun(),
34 true, true));
35 }
Class which defines the run/event/type range for which a given condition is valid,...
int getRun() const
Return the run number.
Definition EventHeader.h:84

References ldmx::EventHeader::getRun().

◆ releaseConditionsObject()

virtual void ecal::EcalDetectorMapLoader::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 41 of file EcalDetectorMap.cxx.

41{}

Member Data Documentation

◆ cell_map_

std::string ecal::EcalDetectorMapLoader::cell_map_
private

Definition at line 45 of file EcalDetectorMap.cxx.

◆ layer_map_

std::string ecal::EcalDetectorMapLoader::layer_map_
private

Definition at line 47 of file EcalDetectorMap.cxx.

◆ motherboard_map_

std::string ecal::EcalDetectorMapLoader::motherboard_map_
private

Definition at line 46 of file EcalDetectorMap.cxx.

◆ the_map_

EcalDetectorMap* ecal::EcalDetectorMapLoader::the_map_
private

Definition at line 44 of file EcalDetectorMap.cxx.

◆ want_d2e_

bool ecal::EcalDetectorMapLoader::want_d2e_
private

Definition at line 48 of file EcalDetectorMap.cxx.


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