LDMX Software
|
Base class for all providers of conditions objects. More...
#include <ConditionsObjectProvider.h>
Public Member Functions | |
ConditionsObjectProvider (const std::string &objname, const std::string &tagname, const framework::config::Parameters ¶meters, Process &process) | |
Class constructor. | |
virtual | ~ConditionsObjectProvider () |
Class destructor. | |
virtual std::pair< const ConditionsObject *, ConditionsIOV > | getCondition (const ldmx::EventHeader &context)=0 |
Pure virtual getCondition function. | |
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. | |
Static Public Member Functions | |
static void | declare (const std::string &classname, ConditionsObjectProviderMaker *) |
Internal function which is part of the PluginFactory machinery. | |
Static Public Attributes | |
static const int | CLASSTYPE {10} |
Constant used to types by the PluginFactory. | |
Protected Member Functions | |
std::pair< const ConditionsObject *, ConditionsIOV > | requestParentCondition (const std::string &name, const ldmx::EventHeader &context) |
Request another condition needed to construct this condition. | |
const Process & | process () const |
Get the process handle. | |
Protected Attributes | |
logging::logger | theLog_ |
The logger for this ConditionsObjectProvider. | |
Private Attributes | |
Process & | process_ |
Handle to the Process. | |
std::string | objectName_ |
The name of the object provided by this provider. | |
std::string | tagname_ |
The tag name for the ConditionsObjectProvider. | |
Base class for all providers of conditions objects.
Definition at line 48 of file ConditionsObjectProvider.h.
ConditionsObjectProvider::ConditionsObjectProvider | ( | const std::string & | objname, |
const std::string & | tagname, | ||
const framework::config::Parameters & | parameters, | ||
Process & | process | ||
) |
Class constructor.
name | Name for this instance of the class. |
tagName | The tag for the database entry (should not include whitespace) |
process | The Process class associated with ConditionsObjectProvider, provided by the framework. |
Definition at line 9 of file ConditionsObjectProvider.cxx.
|
inlinevirtual |
|
static |
Internal function which is part of the PluginFactory machinery.
classname | The class name of the processor. |
Definition at line 25 of file ConditionsObjectProvider.cxx.
References CLASSTYPE, framework::PluginFactory::getInstance(), and framework::PluginFactory::registerConditionsObjectProvider().
|
pure virtual |
Pure virtual getCondition function.
Must be implemented by any Conditions providers.
Implemented in conditions::SimpleCSVTableProvider, ecal::EcalDetectorMapLoader, ecal::EcalGeometryProvider, ecal::EcalTriggerGeometryProvider, framework::RandomNumberSeedService, hcal::HcalDetectorMapLoader, hcal::HcalGeometryProvider, hcal::HcalTriggerGeometryProvider, hcal::HcalReconConditionsProvider, tracking::geo::CalibrationContextProvider, tracking::geo::GeometryContextProvider, tracking::geo::MagneticFieldContextProvider, and tracking::geo::TrackersTrackingGeometryProvider.
|
inline |
Get the list of conditions objects available from this provider.
Definition at line 115 of file ConditionsObjectProvider.h.
References objectName_.
Referenced by framework::Conditions::createConditionsObjectProvider().
|
inline |
Access the tag name.
Definition at line 127 of file ConditionsObjectProvider.h.
References tagname_.
|
inlinevirtual |
Callback for the ConditionsObjectProvider to take any necessary action when the processing of events starts for a given run.
Reimplemented in framework::RandomNumberSeedService, ecal::EcalGeometryProvider, and hcal::HcalGeometryProvider.
Definition at line 110 of file ConditionsObjectProvider.h.
|
inlinevirtual |
Callback for the ConditionsObjectProvider to take any necessary action when the processing of events finishes, such as closing database connections.
Definition at line 104 of file ConditionsObjectProvider.h.
|
inlinevirtual |
Callback for the ConditionsObjectProvider to take any necessary action when the processing of events starts.
Definition at line 97 of file ConditionsObjectProvider.h.
|
inlineprotected |
Get the process handle.
Definition at line 138 of file ConditionsObjectProvider.h.
References process_.
Referenced by framework::RandomNumberSeedService::onNewRun().
|
inlinevirtual |
Called by conditions system when done with a conditions object, appropriate point for cleanup.
Reimplemented in framework::RandomNumberSeedService, ecal::EcalDetectorMapLoader, ecal::EcalGeometryProvider, ecal::EcalTriggerGeometryProvider, hcal::HcalDetectorMapLoader, hcal::HcalGeometryProvider, and hcal::HcalTriggerGeometryProvider.
Definition at line 89 of file ConditionsObjectProvider.h.
|
protected |
Request another condition needed to construct this condition.
Definition at line 18 of file ConditionsObjectProvider.cxx.
References framework::Conditions::getConditionIOV(), framework::Conditions::getConditionPtr(), framework::Process::getConditions(), and process_.
Referenced by ecal::EcalTriggerGeometryProvider::getCondition(), hcal::HcalReconConditionsProvider::getCondition(), and tracking::geo::TrackersTrackingGeometryProvider::getCondition().
|
static |
Constant used to types by the PluginFactory.
Definition at line 51 of file ConditionsObjectProvider.h.
Referenced by declare().
|
private |
The name of the object provided by this provider.
Definition at line 145 of file ConditionsObjectProvider.h.
Referenced by getConditionObjectName().
|
private |
Handle to the Process.
Definition at line 142 of file ConditionsObjectProvider.h.
Referenced by process(), and requestParentCondition().
|
private |
The tag name for the ConditionsObjectProvider.
Definition at line 148 of file ConditionsObjectProvider.h.
Referenced by getTagName().
|
protected |
The logger for this ConditionsObjectProvider.
Definition at line 135 of file ConditionsObjectProvider.h.