CMS 3D CMS Logo

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

Go to the documentation of this file.
00001 #ifndef MONOCCUPANCYDAT_H
00002 #define MONOCCUPANCYDAT_H
00003 
00004 #include <map>
00005 #include <stdexcept>
00006 
00007 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
00008 #include "OnlineDB/EcalCondDB/interface/MonRunTag.h"
00009 #include "OnlineDB/EcalCondDB/interface/MonRunIOV.h"
00010 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
00011 
00012 class MonOccupancyDat : public IDataItem {
00013  public:
00014   friend class EcalCondDBInterface;
00015   MonOccupancyDat();
00016   ~MonOccupancyDat();
00017 
00018   // User data methods
00019   inline std::string getTable() { return "MON_OCCUPANCY_DAT"; }
00020 
00021   void setEventsOverLowThreshold(int events) { m_eventsOverLowThreshold = events; }
00022   int getEventsOverLowThreshold() const { return m_eventsOverLowThreshold; }
00023   
00024   void setEventsOverHighThreshold(int events) { m_eventsOverHighThreshold = events; }
00025   int getEventsOverHighThreshold() const { return m_eventsOverHighThreshold; }
00026 
00027   void setAvgEnergy(float energy) { m_avgEnergy = energy; }
00028   float getAvgEnergy() const { return m_avgEnergy; }
00029   
00030  private:
00031   void prepareWrite() 
00032     throw(std::runtime_error);
00033 
00034   void writeDB(const EcalLogicID* ecid, const MonOccupancyDat* item, MonRunIOV* iov)
00035     throw(std::runtime_error);
00036 
00037   void writeArrayDB(const std::map< EcalLogicID, MonOccupancyDat >* data, MonRunIOV* iov)
00038     throw(std::runtime_error);
00039 
00040 
00041   void fetchData(std::map< EcalLogicID, MonOccupancyDat >* fillVec, MonRunIOV* iov)
00042      throw(std::runtime_error);
00043 
00044   // User data
00045   int m_eventsOverLowThreshold;
00046   int m_eventsOverHighThreshold;
00047   float m_avgEnergy;
00048 };
00049 
00050 #endif