Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

lccd::ConditionsHandlerBase Class Reference

Base implementation of IConditionsHandler. More...

#include <ConditionsHandlerBase.hh>

Inheritance diagram for lccd::ConditionsHandlerBase:

lccd::IConditionsHandler lccd::DataFileHandler lccd::DBCondHandler lccd::DBFileHandler lccd::SimpleFileHandler List of all members.

Public Member Functions

 ConditionsHandlerBase (const std::string &name)
 Default c'tor - need a name for the conditions data set.

virtual void updateEvent (lcio::LCEvent *evt)
 Retrieves the new conditions data if required by evt->getTimestamp() and adds a collection to event with its name.

virtual void update (LCCDTimeStamp timestamp)=0
 Retrieves the new conditions data if required by timestamp.

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 const std::string name ()
 The name of this conditions handler - used, e.g.

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.


Protected Member Functions

virtual void notifyListeners ()
 Tell all registered listeners that the conditions data has changed.


Protected Attributes

lcio::LCCollection * _col
 The current collection of conditions data.

std::string _name
 Name assigned with conditions data.

LCCDTimeStamp _validSince
 First timestamp for which the current data is valid.

LCCDTimeStamp _validTill
 Last timestamp for which the current data is valid.

std::vector< IConditionsChangeListener * > _changeListeners
 The registered change listeners.


Detailed Description

Base implementation of IConditionsHandler.

Provides common code, e.g. registration and notfication of IConditionsChangeListeners.
Subclasses need to implement IConditionsHandler::update( LCCDTimeStamp timestamp ).

Author:
F.Gaede, DESY
Version:
Id
ConditionsHandlerBase.hh,v 1.2 2005/02/22 18:55:22 gaede Exp


Member Function Documentation

virtual const std::string lccd::ConditionsHandlerBase::name  )  [inline, virtual]
 

The name of this conditions handler - used, e.g.

as name of the collection in update( lcio::LCEvent* evt ).

See also:
update( lcio::LCEvent* evt )

Implements lccd::IConditionsHandler.

virtual void lccd::ConditionsHandlerBase::update LCCDTimeStamp  timestamp  )  [pure virtual]
 

Retrieves the new conditions data if required by timestamp.

Notifies all registered listeners
See implementation classes for details.

Implements lccd::IConditionsHandler.

Implemented in lccd::DataFileHandler, lccd::DBCondHandler, lccd::DBFileHandler, and lccd::SimpleFileHandler.

virtual void lccd::ConditionsHandlerBase::updateEvent lcio::LCEvent *  evt  )  [virtual]
 

Retrieves the new conditions data if required by evt->getTimestamp() and adds a collection to event with its name.

Notifies all registered listeners

Implements lccd::IConditionsHandler.

Reimplemented in lccd::DataFileHandler.


The documentation for this class was generated from the following file:
Generated on Fri Sep 9 12:30:32 2005 for LCCD by doxygen 1.3.5