CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/OnlineDB/EcalCondDB/interface/ODRunConfigSeqInfo.h

Go to the documentation of this file.
00001 #ifndef ODRUNCONFIGSEQINFO_H
00002 #define ODRUNCONFIGSEQINFO_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 #include "OnlineDB/EcalCondDB/interface/RunSeqDef.h"
00012 
00013 typedef int run_t;
00014 
00015 class ODRunConfigSeqInfo : public IODConfig {
00016  public:
00017   friend class EcalCondDBInterface;
00018 
00019   ODRunConfigSeqInfo();
00020   ~ODRunConfigSeqInfo();
00021 
00022   inline std::string getTable() { return "ECAL_SEQUENCE_DAT"; }
00023 
00024 
00025   // Methods for user data
00026 
00027   inline void setId(int id) { m_ID = id; }
00028   inline int getId() const { return m_ID; }
00029 
00030   inline   void setDescription(std::string x) { m_description = x; }
00031   inline  std::string getDescription() const{ return m_description;}
00032   inline  void setEcalConfigId(int x){ m_ecal_config_id = x; }
00033   inline  int getEcalConfigId()const{ return m_ecal_config_id;}
00034   inline  void setNumberOfCycles(int x){ m_cycles = x; }
00035   inline  void setSequenceId(int x){ m_ID = x; }
00036   inline  int getSequenceId()const{ return m_ID;}
00037   inline  int getNumberOfCycles() const{return m_cycles;}
00038   inline  void setSequenceNumber(int x){m_seq_num=x;}
00039   inline  int getSequenceNumber() const{return m_seq_num;}
00040   //
00041   RunSeqDef getRunSeqDef() const;
00042   void setRunSeqDef(const RunSeqDef runSeqDef);
00043 
00044   // operators
00045   inline bool operator==(const ODRunConfigSeqInfo &r) const {  return (m_ID   == r.m_ID ); }
00046   inline bool operator!=(const ODRunConfigSeqInfo &r) const { return !(*this == r); }
00047 
00048  private:
00049   int m_ID;
00050   int m_ecal_config_id;
00051   int m_seq_num;
00052   int m_sequence_id;
00053   int m_cycles;
00054   RunSeqDef m_run_seq;
00055   std::string m_description;
00056 
00057   // Methods from IUniqueDBObject
00058   int fetchID() throw(std::runtime_error); // fetches the sequence by the ecal_config_id and seq_num
00059   int fetchIDLast() throw(std::runtime_error); // fetches the sequence by the ecal_config_id and seq_num
00060   void setByID(int id) throw(std::runtime_error);
00061 
00062   void  writeDB()throw(std::runtime_error);
00063 
00064   void prepareWrite()  throw(std::runtime_error);
00065 
00066   void fetchData(ODRunConfigSeqInfo * result)     throw(std::runtime_error);
00067   void clear();
00068 
00069 
00070 };
00071 
00072 
00073 
00074 #endif