CMS 3D CMS Logo

LMFRunIOV.h

Go to the documentation of this file.
00001 #ifndef LMFRUNIOV_H
00002 #define LMFRUNIOV_H
00003 
00004 #include <stdexcept>
00005 #include <iostream>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IIOV.h"
00008 #include "OnlineDB/EcalCondDB/interface/LMFRunTag.h"
00009 #include "OnlineDB/EcalCondDB/interface/RunIOV.h"
00010 #include "OnlineDB/EcalCondDB/interface/Tm.h"
00011 
00012 typedef int subrun_t;
00013 
00014 class LMFRunIOV : public IIOV {
00015  public:
00016   friend class EcalCondDBInterface;
00017 
00018   LMFRunIOV();
00019   ~LMFRunIOV();
00020 
00021   // Methods for user data
00022   void setLMFRunTag(LMFRunTag tag);
00023   LMFRunTag getLMFRunTag() const;
00024   void setRunIOV(RunIOV iov);
00025   RunIOV getRunIOV();
00026 
00027   inline void setSubRunNumber(subrun_t subrun){m_subRunNum=subrun;}
00028   inline run_t getSubRunNumber() const{return m_subRunNum;}
00029   inline void setSubRunStart(Tm start){m_subRunStart=start;}
00030   inline Tm getSubRunStart() const{return m_subRunStart;}
00031   inline void setSubRunEnd(Tm end){m_subRunEnd=end;}
00032   inline Tm getSubRunEnd() const{return m_subRunEnd;}
00033   inline void setDBInsertionTime(Tm x){m_dbtime=x;}
00034   inline Tm getDBInsertionTime() const{return m_dbtime;}
00035   inline void setSubRunType(std::string x){m_subrun_type=x;}
00036   inline std::string getSubRunType() const{return m_subrun_type;}
00037 
00038   void setID(int id);
00039 
00040   // Methods from IUniqueDBObject
00041   int getID(){ return m_ID;} ;
00042   int fetchID() throw(std::runtime_error);
00043   void setByID(int id) throw(std::runtime_error);
00044 
00045   // Operators
00046   inline bool operator==(const LMFRunIOV &m) const
00047     {
00048       return ( m_lmfRunTag   == m.m_lmfRunTag &&
00049                m_runIOV      == m.m_runIOV &&
00050                m_subRunNum   == m.m_subRunNum &&
00051                m_subRunStart == m.m_subRunStart &&
00052                m_subRunEnd   == m.m_subRunEnd );
00053     }
00054 
00055   inline bool operator!=(const LMFRunIOV &m) const { return !(*this == m); }
00056 
00057  private:
00058   // User data for this IOV
00059   LMFRunTag m_lmfRunTag;
00060   RunIOV m_runIOV;
00061   subrun_t m_subRunNum;
00062   Tm m_subRunStart;
00063   Tm m_subRunEnd;
00064   Tm m_dbtime;
00065   std::string m_subrun_type;
00066 
00067   int writeDB() throw(std::runtime_error);
00068   void fetchParentIDs(int* lmfRunTagID, int* runIOVID) throw(std::runtime_error);
00069 
00070   void setByRun(LMFRunTag* lmftag, RunIOV* runiov, subrun_t subrun) throw(std::runtime_error);
00071 };
00072 
00073 #endif

Generated on Tue Jun 9 17:40:45 2009 for CMSSW by  doxygen 1.5.4