00001 #ifndef DBFileHandler_h
00002 #define DBFileHandler_h
00003
00004
00005 #include "ConditionsHandlerBase.hh"
00006
00007 using namespace lcio ;
00008
00009 namespace lccd {
00010
00011
00012
00013 typedef std::pair<LCCDTimeStamp,LCCDTimeStamp> ValidityInterval ;
00014 typedef std::vector< ValidityInterval > ValidityVector ;
00015
00016
00034 class DBFileHandler : public ConditionsHandlerBase {
00035
00036 public:
00037
00046 DBFileHandler(const std::string& fileName,
00047 const std::string& name,
00048 const std::string& inputCollection="" ) ;
00049
00050
00051 virtual ~DBFileHandler() ;
00052
00061 virtual void update( LCCDTimeStamp timestamp ) ;
00062
00063
00064 protected :
00065
00066 DBFileHandler() {}
00067
00069 void init() ;
00070
00072 int findEventNumber( LCCDTimeStamp timeStamp ) ;
00073
00074
00075
00077 std::string _fileName ;
00078
00080 std::string _inputCollection ;
00081
00083 ValidityVector _valVec ;
00084
00086 LCReader* _lcReader ;
00087
00088 };
00089 } ;
00090
00091 #endif // DBFileHandler_h