LCCD  1.5.0
Public Member Functions | List of all members
lccd::DataFileHandler Class Reference

Implementation of ConditionsHandlerBase that handles conditions data that is stored in a data LCIO file. More...

#include <DataFileHandler.hh>

Inheritance diagram for lccd::DataFileHandler:
lccd::ConditionsHandlerBase lccd::IConditionsHandler

Public Member Functions

 DataFileHandler (const DataFileHandler &)=delete
 
DataFileHandleroperator= (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
 
ConditionsHandlerBaseoperator= (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.
 

Detailed Description

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.

Author
F.Gaede, S.Aplin, DESY
Version
Id:
DataFileHandler.hh,v 1.4 2007-04-27 13:21:31 gaede Exp

Constructor & Destructor Documentation

lccd::DataFileHandler::DataFileHandler ( const std::string &  name)

Default constructor.

Parameters
name,:of this conditions data set - used as collection name

References lccd::ConditionsHandlerBase::_col.

Member Function Documentation

lcio::LCCollection * lccd::DataFileHandler::defaultCollection ( )
virtual

The default collection registered with the handler.

Warning
Not implemented, use will cause exception to be thrown.

Implements lccd::ConditionsHandlerBase.

References lccd::ConditionsHandlerBase::name().

lcio::LCCollection * lccd::DataFileHandler::lastValidCollection ( )
virtual

The last valid collection held by the handler.

Warning
Not implemented, use will cause exception to be thrown.

Implements lccd::ConditionsHandlerBase.

References lccd::ConditionsHandlerBase::name().

void lccd::DataFileHandler::registerDefaultCollection ( lcio::LCCollection *  col)
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.

Warning
Not implemented, use will cause exception to be thrown.

Implements lccd::ConditionsHandlerBase.

References lccd::ConditionsHandlerBase::name().

virtual void lccd::DataFileHandler::update ( LCCDTimeStamp  timestamp)
inlinevirtual

Retrieves the new conditions data if required by timestamp.

Notifies all registered listeners
See implementation classes for details.

Implements lccd::ConditionsHandlerBase.

void lccd::DataFileHandler::updateEvent ( lcio::LCEvent *  evt)
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().


The documentation for this class was generated from the following files: