CMS 3D CMS Logo

ODRunConfigInfo.h

Go to the documentation of this file.
00001 #ifndef ODRUNCONFIGINFO_H
00002 #define ODRUNCONFIGINFO_H
00003 
00004 #include <stdexcept>
00005 #include <iostream>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00008 #include "OnlineDB/EcalCondDB/interface/Tm.h"
00009 #include "OnlineDB/EcalCondDB/interface/RunModeDef.h"
00010 #include "OnlineDB/EcalCondDB/interface/RunTypeDef.h"
00011 
00012 class ODRunConfigInfo : public IODConfig {
00013  public:
00014   friend class EcalCondDBInterface;
00015 
00016   ODRunConfigInfo();
00017   ~ODRunConfigInfo();
00018   inline std::string getTable() { return "ECAL_RUN_CONFIGURATION_DAT"; }
00019 
00020   inline void setId(int id) { m_ID = id; }
00021   inline int getId() const { return m_ID; }
00022  
00023   
00024 
00025 inline Tm getDBTime() const{  return m_db_time;}
00026 //
00027 inline void setTag(std::string x) { m_tag = x; }
00028 std::string getTag() const{  return m_tag;}
00029 //
00030 void setDescription(std::string x) { m_description = x;}
00031 std::string getDescription() const{  return m_description;}
00032 //
00033 void setVersion(int x){ m_version = x;  }
00034 int getVersion()const {return m_version;  }
00035 //
00036 void setNumberOfSequences(int n){ m_num_seq = n;  }
00037 int getNumberOfSequences()const {return m_num_seq;  }
00038 //
00039 void setDefaults(int x) { m_defaults = x;}
00040 int getDefaults() const{  return m_defaults;}
00041 //
00042 void setTriggerMode(std::string x) { m_trigger_mode = x;}
00043 std::string getTriggerMode() const{  return m_trigger_mode;}
00044 //
00045 void setNumberOfEvents(int x) { m_num_events = x ;}
00046 int getNumberOfEvents() const{  return m_num_events ;}
00047 //
00048 
00049 
00050   RunTypeDef getRunTypeDef() const;
00051   void setRunTypeDef(const RunTypeDef runTypeDef);
00052   RunModeDef getRunModeDef() const;
00053   void setRunModeDef(const RunModeDef runModeDef);
00054 
00055 
00056   // operators
00057   inline bool operator==(const ODRunConfigInfo &r) const {  return (m_ID   == r.m_ID ); }
00058   inline bool operator!=(const ODRunConfigInfo &r) const { return !(*this == r); }
00059 
00060  private:
00061   // User data for this IOV
00062   int m_ID;
00063   Tm m_db_time;
00064   std::string m_tag;
00065   int m_version;
00066   RunModeDef m_runModeDef;
00067   RunTypeDef m_runTypeDef;
00068   int m_num_seq;
00069   std::string m_description;
00070   int m_defaults;
00071   std::string m_trigger_mode;
00072   int m_num_events;
00073 
00074   // Methods from IUniqueDBObject
00075   int fetchNextId()  throw(std::runtime_error);
00076   int fetchID() throw(std::runtime_error);
00077   int fetchIDFromTagAndVersion() throw(std::runtime_error);
00078   int fetchIDLast() throw(std::runtime_error);
00079   void setByID(int id) throw(std::runtime_error);
00080 
00081   void prepareWrite()  throw(std::runtime_error);
00082   void writeDB()       throw(std::runtime_error);
00083   void fetchData(ODRunConfigInfo * result)     throw(std::runtime_error);
00084   int updateDefaultCycle()   throw(runtime_error);
00085 
00086 };
00087 
00088 
00089 
00090 #endif

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