CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/OnlineDB/EcalCondDB/interface/DCUIOV.h

Go to the documentation of this file.
00001 #ifndef DCUIOV_H
00002 #define DCUIOV_H
00003 
00004 #include <stdexcept>
00005 #include <iostream>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IIOV.h"
00008 #include "OnlineDB/EcalCondDB/interface/DCUTag.h"
00009 #include "OnlineDB/EcalCondDB/interface/Tm.h"
00010 
00011 typedef int run_t;
00012 
00013 class DCUIOV : public IIOV {
00014  public:
00015   friend class EcalCondDBInterface;
00016 
00017   DCUIOV();
00018   ~DCUIOV();
00019 
00020   // Methods for user data
00021   void setSince(Tm since);
00022   Tm getSince() const;
00023   void setTill(Tm till);
00024   Tm getTill() const;
00025   void setDCUTag(DCUTag tag);
00026   DCUTag getDCUTag() const;
00027 
00028   // Methods from IUniqueDBObject
00029   int getID(){ return m_ID;} ;
00030   int fetchID() throw(std::runtime_error);
00031   void setByID(int id) throw(std::runtime_error);
00032 
00033   // Operators
00034   inline bool operator==(const DCUIOV &m) const
00035     {
00036       return ( m_dcuTag   == m.m_dcuTag &&
00037                m_since == m.m_since &&
00038                m_till   == m.m_till );
00039     }
00040 
00041   inline bool operator!=(const DCUIOV &m) const { return !(*this == m); }
00042 
00043 
00044  private:
00045   // User data for this IOV
00046   Tm m_since;
00047   Tm m_till;
00048   DCUTag m_dcuTag;
00049 
00050   int writeDB() throw(std::runtime_error);
00051   void setByTm(DCUTag* tag, Tm time) throw(std::runtime_error);
00052 };
00053 
00054 #endif