8#ifndef FRAMEWORK_CONDITIONSOBJECTPROVIDER_H_
9#define FRAMEWORK_CONDITIONSOBJECTPROVIDER_H_
14#include "Framework/Exception/Exception.h"
21#include "Framework/Configure/Parameters.h"
22#include "Framework/Logger.h"
41 const std::string& objname,
const std::string& tagname,
68 const std::string& tagname,
81 virtual std::pair<const ConditionsObject*, ConditionsIOV>
getCondition(
121 static void declare(
const std::string& classname,
164#define DECLARE_CONDITIONS_PROVIDER(CLASS) \
165 framework::ConditionsObjectProvider* CLASS##_ldmx_make( \
166 const std::string& name, const std::string& tagname, \
167 const framework::config::Parameters& params, \
168 framework::Process& process) { \
169 return new CLASS(name, tagname, params, process); \
171 __attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
172 framework::ConditionsObjectProvider::declare(#CLASS, &CLASS##_ldmx_make); \
184#define DECLARE_CONDITIONS_PROVIDER_NS(NS, CLASS) \
185 framework::ConditionsObjectProvider* CLASS##_ldmx_make( \
186 const std::string& name, const std::string& tagname, \
187 const framework::config::Parameters& params, \
188 framework::Process& process) { \
189 return new NS::CLASS(name, tagname, params, process); \
191 __attribute__((constructor(1000))) static void CLASS##_ldmx_declare() { \
192 framework::ConditionsObjectProvider::declare( \
193 std::string(#NS) + "::" + std::string(#CLASS), &CLASS##_ldmx_make); \
Interval-of-validity object for conditions information.
Base class for conditions information like pedestals, gains, electronics maps, etc.
be configured to load conditions objects from CSV files.
Base class for all providers of conditions objects.
static const int CLASSTYPE
Constant used to types by the PluginFactory.
virtual void onProcessStart()
Callback for the ConditionsObjectProvider to take any necessary action when the processing of events ...
std::pair< const ConditionsObject *, ConditionsIOV > requestParentCondition(const std::string &name, const ldmx::EventHeader &context)
Request another condition needed to construct this condition.
logging::logger theLog_
The logger for this ConditionsObjectProvider.
virtual ~ConditionsObjectProvider()
Class destructor.
virtual void onNewRun(ldmx::RunHeader &)
Callback for the ConditionsObjectProvider to take any necessary action when the processing of events ...
std::string objectName_
The name of the object provided by this provider.
const Process & process() const
Get the process handle.
std::string tagname_
The tag name for the ConditionsObjectProvider.
virtual void onProcessEnd()
Callback for the ConditionsObjectProvider to take any necessary action when the processing of events ...
virtual std::pair< const ConditionsObject *, ConditionsIOV > getCondition(const ldmx::EventHeader &context)=0
Pure virtual getCondition function.
const std::string & getTagName() const
Access the tag name.
virtual void releaseConditionsObject(const ConditionsObject *co)
Called by conditions system when done with a conditions object, appropriate point for cleanup.
static void declare(const std::string &classname, ConditionsObjectProviderMaker *)
Internal function which is part of the PluginFactory machinery.
Process & process_
Handle to the Process.
const std::string & getConditionObjectName() const
Get the list of conditions objects available from this provider.
Base class for all conditions objects, very simple.
Class which represents the process under execution.
Class encapsulating parameters for configuring a processor.
All classes in the ldmx-sw project use this namespace.
ConditionsObjectProvider * ConditionsObjectProviderMaker(const std::string &objname, const std::string &tagname, const framework::config::Parameters ¶ms, Process &process)
Typedef for PluginFactory use.