LCCD
1.5.0
|
Implementation of ConditionsHandlerBase that handles conditions data that is stored in a data LCIO file. More...
#include <DataFileHandler.hh>
Public Member Functions | |
DataFileHandler (const DataFileHandler &)=delete | |
DataFileHandler & | operator= (const DataFileHandler &)=delete |
DataFileHandler (const std::string &name) | |
Default constructor. More... | |
virtual void | updateEvent (lcio::LCEvent *evt) |
Checks wether the collection is present in the event, if so it keeps it until a new version is found otherwise it adds the current collection to the event. More... | |
virtual void | update (LCCDTimeStamp) |
Retrieves the new conditions data if required by timestamp. More... | |
virtual void | registerDefaultCollection (lcio::LCCollection *col) |
Register a pointer to a default collection which will be passed to the IConditionsChangeListener if no data can be found for a given time stamp. More... | |
virtual lcio::LCCollection * | defaultCollection () |
The default collection registered with the handler. More... | |
virtual lcio::LCCollection * | lastValidCollection () |
The last valid collection held by the handler. More... | |
Public Member Functions inherited from lccd::ConditionsHandlerBase | |
ConditionsHandlerBase (const ConditionsHandlerBase &)=delete | |
ConditionsHandlerBase & | operator= (const ConditionsHandlerBase &)=delete |
ConditionsHandlerBase (const std::string &name) | |
Default c'tor - need a name for the conditions data set. | |
virtual lcio::LCCollection * | currentCollection () |
Returns the current collection of conditions data. | |
virtual void | registerChangeListener (IConditionsChangeListener *cl) |
Every IConditionsChangeListener will be notified if the conditions data of this instance has changed. | |
virtual void | removeChangeListener (IConditionsChangeListener *cl) |
Remove the specified listener from list of registered listeners ;. | |
virtual bool | isChangeListenerRegistered (IConditionsChangeListener *cl) |
checks if the changeListner is Registered | |
virtual const std::string | name () |
The name of this conditions handler - used, e.g. More... | |
virtual LCCDTimeStamp | validSince () |
First timestamp for which the current conditions data is valid. | |
virtual LCCDTimeStamp | validTill () |
Last timestamp for which the current conditions data is valid. | |
Additional Inherited Members | |
Protected Member Functions inherited from lccd::ConditionsHandlerBase | |
virtual void | notifyListeners () |
Tell all registered listeners that the conditions data has changed. | |
Protected Attributes inherited from lccd::ConditionsHandlerBase | |
lcio::LCCollection * | _col = nullptr |
The current collection of conditions data. More... | |
std::string | _name {} |
Name assigned with conditions data. | |
LCCDTimeStamp | _validSince {} |
First timestamp for which the current data is valid. More... | |
LCCDTimeStamp | _validTill {} |
Last timestamp for which the current data is valid. More... | |
std::vector < IConditionsChangeListener * > | _changeListeners {} |
The registered change listeners. | |
Implementation of ConditionsHandlerBase that handles conditions data that is stored in a data LCIO file.
The condition collection is kept until an event is presented that has a new version of the particular collection. The time stamps are ignored and the validity of the conditions data is determined by the sequence with which they appear in the data stream.
This can for example be used in cases where the DAQ system writes slow control data into the same data stream as the raw data.
Upon registering an IConditionsChangeListener with this Conditions Handler the call-back method registeredWithHandler( IConditionsHandler* ch ) will be called. Likewise calling removeChangeListener( IConditionsChangeListener* cl) will call the call-back method deRegisteredWithHandler( IConditionsHandler* ch )
Note: The use of default Collections is not implemented for this Class.
lccd::DataFileHandler::DataFileHandler | ( | const std::string & | name | ) |
Default constructor.
name,: | of this conditions data set - used as collection name |
References lccd::ConditionsHandlerBase::_col.
|
virtual |
The default collection registered with the handler.
Implements lccd::ConditionsHandlerBase.
References lccd::ConditionsHandlerBase::name().
|
virtual |
The last valid collection held by the handler.
Implements lccd::ConditionsHandlerBase.
References lccd::ConditionsHandlerBase::name().
|
virtual |
Register a pointer to a default collection which will be passed to the IConditionsChangeListener if no data can be found for a given time stamp.
Implements lccd::ConditionsHandlerBase.
References lccd::ConditionsHandlerBase::name().
|
inlinevirtual |
Retrieves the new conditions data if required by timestamp.
Notifies all registered listeners
See implementation classes for details.
Implements lccd::ConditionsHandlerBase.
|
virtual |
Checks wether the collection is present in the event, if so it keeps it until a new version is found otherwise it adds the current collection to the event.
The events time stamp is ignored.
Notifies all registered listeners.
Reimplemented from lccd::ConditionsHandlerBase.
References lccd::ConditionsHandlerBase::_col, lccd::ConditionsHandlerBase::_validSince, lccd::ConditionsHandlerBase::_validTill, lccd::ConditionsHandlerBase::currentCollection(), lccd::LCCDPlusInf, lccd::ConditionsHandlerBase::name(), and lccd::ConditionsHandlerBase::notifyListeners().