TDbiEpochRollback.hxx

Go to the documentation of this file.
00001 #ifndef DBIEPOCHROLLBACK_H
00002 #define DBIEPOCHROLLBACK_H
00003 
00004 /**
00005  *
00006  * $Id: TDbiEpochRollback.hxx,v 1.1 2011/01/18 05:49:19 finch Exp $
00007  *
00008  * \class TDbiEpochRollback
00009  *
00010  *
00011  * \brief
00012  * <b>Concept</b>  A register of rollback epochs organised by table name
00013  *
00014  * \brief
00015  * <b>Purpose</b> Simplify epoch rollback management by extracting info.
00016  * from DBI registry and serving by table name
00017  *
00018  * Contact: A.Finch@lancaster.ac.uk
00019  *
00020  *
00021  */
00022 
00023 #include <map>
00024 #include <string>
00025 
00026 #ifndef ROOT_Rtypes
00027 #if !defined(__CINT__) || defined(__MAKECINT__)
00028 #include "Rtypes.h"
00029 #endif
00030 #endif
00031 
00032 class TDbiRegistry;
00033 
00034 class TDbiEpochRollback
00035 {
00036 
00037 public:
00038 
00039   typedef std::map<std::string,UInt_t> name_map_t;
00040 
00041 // Constructors and destructors.
00042            TDbiEpochRollback();
00043   virtual ~TDbiEpochRollback();
00044 
00045 // State testing member functions
00046 
00047   const std::string& GetEpochCondition(const std::string& tableName) const;
00048   void Show() const;
00049 
00050 // State changing member functions
00051 
00052   void Clear() {fTableToEpoch.clear();}
00053   void Set(TDbiRegistry& reg);  //Modifies TDbiRegistry
00054 
00055 private:
00056 
00057 // Data members
00058 
00059 /// Look-up table name -> maximum epoch number
00060   name_map_t fTableToEpoch;
00061 
00062 ClassDef(TDbiEpochRollback,0)   // Rollback dates by table name.
00063 
00064 };
00065 
00066 
00067 
00068 #endif  // DBIEPOCHROLLBACK_H
00069 

Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1