CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/OnlineDB/EcalCondDB/interface/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   void setDBTime(Tm x) { m_db_time=x; }
00026 inline Tm getDBTime() const{  return m_db_time;}
00027 //
00028 inline void setTag(std::string x) { m_tag = x; }
00029 std::string getTag() const{  return m_tag;}
00030 //
00031 void setDescription(std::string x) { m_description = x;}
00032 std::string getDescription() const{  return m_description;}
00033 //
00034 void setVersion(int x){ m_version = x;  }
00035 int getVersion()const {return m_version;  }
00036 //
00037 void setNumberOfSequences(int n){ m_num_seq = n;  }
00038 int getNumberOfSequences()const {return m_num_seq;  }
00039 //
00040 void setDefaults(int x) { m_defaults = x;}
00041 int getDefaults() const{  return m_defaults;}
00042 //
00043 void setTriggerMode(std::string x) { m_trigger_mode = x;}
00044 std::string getTriggerMode() const{  return m_trigger_mode;}
00045 //
00046 void setNumberOfEvents(int x) { m_num_events = x ;}
00047 int getNumberOfEvents() const{  return m_num_events ;}
00048 //
00049 void setUsageStatus(std::string x) { m_usage_status = x;}
00050 std::string getUsageStatus() const{  return m_usage_status;}
00051 //
00052 
00053   RunTypeDef getRunTypeDef() const;
00054   void setRunTypeDef(const RunTypeDef runTypeDef);
00055   RunModeDef getRunModeDef() const;
00056   void setRunModeDef(const RunModeDef runModeDef);
00057 
00058 
00059   // operators
00060   inline bool operator==(const ODRunConfigInfo &r) const {  return (m_ID   == r.m_ID ); }
00061   inline bool operator!=(const ODRunConfigInfo &r) const { return !(*this == r); }
00062 
00063  private:
00064   // User data for this IOV
00065   int m_ID;
00066   Tm m_db_time;
00067   std::string m_tag;
00068   int m_version;
00069   RunModeDef m_runModeDef;
00070   RunTypeDef m_runTypeDef;
00071   int m_num_seq;
00072   std::string m_description;
00073   int m_defaults;
00074   std::string m_trigger_mode;
00075   int m_num_events;
00076   std::string m_usage_status;
00077 
00078   // Methods from IUniqueDBObject
00079   int fetchNextId()  throw(std::runtime_error);
00080   int fetchID() throw(std::runtime_error);
00081   int fetchIDFromTagAndVersion() throw(std::runtime_error);
00082   int fetchIDLast() throw(std::runtime_error);
00083   void setByID(int id) throw(std::runtime_error);
00084 
00085   void prepareWrite()  throw(std::runtime_error);
00086   void writeDB()       throw(std::runtime_error);
00087   void fetchData(ODRunConfigInfo * result)     throw(std::runtime_error);
00088   int updateDefaultCycle()   throw(std::runtime_error);
00089   void clear();
00090 
00091 };
00092 
00093 
00094 
00095 #endif