1#ifndef FIRE_CONDITIONSPROVIDER_H
2#define FIRE_CONDITIONSPROVIDER_H
6#include "fire/ConditionsIntervalOfValidity.h"
7#include "fire/ConditionsObject.h"
8#include "fire/RunHeader.h"
9#include "fire/config/Parameters.h"
10#include "fire/exception/Exception.h"
11#include "fire/factory/Factory.h"
212#define DECLARE_CONDITIONS_PROVIDER(CLASS) \
214 auto v = fire::ConditionsProvider::Factory::get().declare<CLASS>(); \
Base class for all conditions objects, very simple.
Definition: ConditionsObject.h:11
Base class for all providers of conditions objects.
Definition: ConditionsProvider.h:83
virtual void attach(Conditions *c) final
Attach the central conditions system to this provider.
Definition: ConditionsProvider.h:158
virtual std::pair< const ConditionsObject *, ConditionsIntervalOfValidity > getCondition(const EventHeader &context)=0
Pure virtual getCondition function.
Conditions * conditions_
Handle to the central conditions system.
Definition: ConditionsProvider.h:180
const std::string & getTagName() const
Access the tag name.
Definition: ConditionsProvider.h:153
const std::string & getConditionObjectName() const
Get the condition object available from this provider.
Definition: ConditionsProvider.h:148
std::string tagname_
The tag name for the ConditionsProvider.
Definition: ConditionsProvider.h:186
virtual void release(const ConditionsObject *co)
Called by conditions system when done with a conditions object, appropriate point for cleanup.
Definition: ConditionsProvider.h:124
std::pair< const ConditionsObject *, ConditionsIntervalOfValidity > requestParentCondition(const std::string &name, const EventHeader &context)
Request another condition needed to construct this condition.
Definition: ConditionsProvider.cxx:12
virtual ~ConditionsProvider()=default
default destructor, virtual so derived types can be destructed
virtual void onNewRun(RunHeader &)
Callback for the ConditionsProvider to take any necessary action when the processing of events starts...
Definition: ConditionsProvider.h:143
logging::logger theLog_
The logger for this ConditionsProvider.
Definition: ConditionsProvider.h:176
virtual void onProcessStart()
Callback for the ConditionsProvider to take any necessary action when the processing of events starts...
Definition: ConditionsProvider.h:130
ConditionsProvider(const fire::config::Parameters &ps)
Configure the registered provider.
Definition: ConditionsProvider.cxx:6
std::string objectName_
The name of the object provided by this provider.
Definition: ConditionsProvider.h:183
virtual void onProcessEnd()
Callback for the ConditionsProvider to take any necessary action when the processing of events finish...
Definition: ConditionsProvider.h:137
Container and cache for conditions and conditions providers.
Definition: Conditions.h:66
Class encapsulating parameters for configuring a processor.
Definition: Parameters.h:28
Factory to dynamically create objects derived from a specific prototype class.
Definition: Factory.h:231
Interface to Boost.Logging.
log::sources::severity_channel_logger_mt< level, std::string > logger
Short names for boost::log.
Definition: Logger.h:84