CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/OnlineDB/EcalCondDB/interface/RunSeqDef.h

Go to the documentation of this file.
00001 #ifndef RUNSEQDEF_H
00002 #define RUNSEQDEF_H
00003 
00004 #include <string>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IDef.h"
00008 #include "OnlineDB/EcalCondDB/interface/RunTypeDef.h"
00009 
00013 class RunSeqDef : public IDef {
00014   public:
00015  friend class ODRunConfigSeqInfo; 
00016  friend class EcalCondDBInterface;
00017   
00018   RunSeqDef();
00019   virtual ~RunSeqDef();
00020 
00021   // Methods for user data
00022   std::string getRunSeq() const;
00023   void setRunSeq(std::string runseq);
00024 
00025   RunTypeDef getRunTypeDef() const;
00026   void setRunTypeDef(const RunTypeDef runTypeDef);
00027 
00028 
00029 
00030 
00031   
00032   // Methods from IUniqueDBObject
00033   int fetchID() throw(std::runtime_error);
00034   void setByID(int id) throw(std::runtime_error);
00035 
00036   // Operators.  m_desc is not considered, it cannot be written to DB anyhow
00037   inline bool operator==(const RunSeqDef &t) const { return m_runSeq == t.m_runSeq; }
00038   inline bool operator!=(const RunSeqDef &t) const { return m_runSeq != t.m_runSeq; }
00039   
00040  protected:
00041   // User data for this def
00042   std::string m_runSeq;
00043   RunTypeDef m_runType;  
00044 
00045   int writeDB()throw(std::runtime_error);
00046 
00047 
00048   void fetchAllDefs( std::vector<RunSeqDef>* fillVec) throw(std::runtime_error);
00049 };
00050 
00051 #endif