1#ifndef FIRE_CONDITIONS_H
2#define FIRE_CONDITIONS_H
4#include "fire/exception/Exception.h"
5#include "fire/EventHeader.h"
6#include "fire/exception/Exception.h"
7#include "fire/ConditionsProvider.h"
8#include "fire/config/Parameters.h"
113 template <
class ConditionType>
116 return dynamic_cast<const ConditionType&
>(*
getConditionPtr(condition_name));
119 "Condition '"+condition_name+
"' is not the input type '"
120 +boost::core::demangle(
typeid(ConditionType).name())+
"'.");
Defines the run/event/type range for which a given condition is valid, including for all time.
Definition: ConditionsIntervalOfValidity.h:13
Base class for all conditions objects, very simple.
Definition: ConditionsObject.h:11
Container and cache for conditions and conditions providers.
Definition: Conditions.h:66
Conditions(const config::Parameters &ps, Process &p)
Configure the conditions system and attach the current process.
Definition: Conditions.cxx:9
std::map< std::string, std::shared_ptr< ConditionsProvider > > providers_
Map of who provides which condition.
Definition: Conditions.h:159
const ConditionType & get(const std::string &condition_name)
Primary request action for a conditions object.
Definition: Conditions.h:114
Process & process_
Handle to the Process.
Definition: Conditions.h:156
const ConditionsObject * getConditionPtr(const std::string &condition_name)
Core request action for a conditions object.
Definition: Conditions.cxx:46
void onProcessStart()
Calls onProcessStart for all instances of ConditionsProvider.
Definition: Conditions.cxx:25
void onProcessEnd()
Calls onProcessEnd for all instances of ConditionsProvider.
Definition: Conditions.cxx:29
void onNewRun(RunHeader &rh)
Calls onNewRun for all instances of ConditionsProvider.
Definition: Conditions.cxx:33
std::map< std::string, CacheEntry > cache_
Conditions cache.
Definition: Conditions.h:174
ConditionsIntervalOfValidity getConditionIOV(const std::string &condition_name) const
Access the interval of validity for the given condition.
Definition: Conditions.cxx:37
Standard base exception class with some useful output information.
Definition: Exception.h:18
The central object managing the data processing.
Definition: Process.h:16
Class encapsulating parameters for configuring a processor.
Definition: Parameters.h:28
Interface to Boost.Logging.
fire::Process Process
alias Process into this namespace
Definition: EventProcessor.h:105
An entry to store an already loaded conditions object.
Definition: Conditions.h:164
std::shared_ptr< ConditionsProvider > provider
Provider that gave us the conditions object.
Definition: Conditions.h:168
ConditionsIntervalOfValidity iov
Interval Of Validity for this entry in the cache.
Definition: Conditions.h:166
const ConditionsObject * obj
Const pointer to the retrieved conditions object.
Definition: Conditions.h:170