CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/OnlineDB/EcalCondDB/interface/ODWeightsSamplesDat.h

Go to the documentation of this file.
00001 #ifndef ODWEIGHTSSAMPLESDAT_H
00002 #define ODWEIGHTSSAMPLESDAT_H
00003 
00004 #include <vector>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
00008 #include "OnlineDB/EcalCondDB/interface/IODConfig.h"
00009 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
00010 #include "OnlineDB/EcalCondDB/interface/ODFEWeightsInfo.h"
00011 
00012 class ODWeightsSamplesDat : public IODConfig {
00013  public:
00014   friend class EcalCondDBInterface;
00015   ODWeightsSamplesDat();
00016   ~ODWeightsSamplesDat();
00017 
00018   // User data methods
00019   inline std::string getTable() { return "DCC_WEIGHTSAMPLE_DAT"; }
00020 
00021   inline void setId(int dac) { m_ID = dac; }
00022   inline int getId() const { return m_ID; }
00023 
00024   inline void setFedId(int dac) { m_fed = dac; }
00025   inline int getFedId() const { return m_fed; }
00026 
00027   inline void setSampleId(int dac) { m_ss = dac; }
00028   inline int getSampleId() const { return m_ss; }
00029 
00030   inline void setWeightNumber(int dac) { m_sn = dac; }
00031   inline int getWeightNumber() const { return m_sn; }
00032 
00033 
00034 
00035  private:
00036   void clear();
00037   void prepareWrite() 
00038     throw(std::runtime_error);
00039 
00040   void writeDB(const ODWeightsSamplesDat* item, ODFEWeightsInfo* iov )
00041     throw(std::runtime_error);
00042 
00043   void writeArrayDB(const std::vector< ODWeightsSamplesDat > data, ODFEWeightsInfo* iov)
00044     throw(std::runtime_error);
00045 
00046 
00047   void fetchData(std::vector< ODWeightsSamplesDat >* fillMap, ODFEWeightsInfo* iov)
00048      throw(std::runtime_error);
00049 
00050   void fetchData(ODWeightsSamplesDat * p)     throw(std::runtime_error);
00051 
00052   // User data
00053 
00054   int m_fed;
00055   int m_ss;
00056   int m_sn;
00057   int m_ID;
00058  
00059 };
00060 
00061 #endif