CMS 3D CMS Logo

/data/git/CMSSW_5_3_11_patch5/src/OnlineDB/EcalCondDB/interface/RunModeDef.h

Go to the documentation of this file.
00001 #ifndef RUNMODEDEF_H
00002 #define RUNMODEDEF_H
00003 
00004 #include <string>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IDef.h"
00008 
00012 class RunModeDef : public IDef {
00013   public:
00014   friend class EcalCondDBInterface;
00015   
00016   RunModeDef();
00017   virtual ~RunModeDef();
00018 
00019   // Methods for user data
00020   std::string getRunMode() const;
00021   void setRunMode(std::string runmode);
00022   
00023 
00024 
00025   // Methods from IUniqueDBObject
00026   int fetchID() throw(std::runtime_error);
00027   void setByID(int id) throw(std::runtime_error);
00028 
00029   // Operators.  m_desc is not considered, it cannot be written to DB anyhow
00030   inline bool operator==(const RunModeDef &t) const { return m_runMode == t.m_runMode; }
00031   inline bool operator!=(const RunModeDef &t) const { return m_runMode != t.m_runMode; }
00032   
00033  protected:
00034   // User data for this def
00035   std::string m_runMode;
00036 
00037 
00038   void fetchAllDefs( std::vector<RunModeDef>* fillVec) throw(std::runtime_error);
00039 };
00040 
00041 #endif