CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/OnlineDB/EcalCondDB/interface/MODCCSHFDat.h

Go to the documentation of this file.
00001 #ifndef MODCCSHFDAT_H
00002 #define MODCCSHFDAT_H
00003 
00004 #include <map>
00005 #include <stdexcept>
00006 
00007 #include <string>
00008 #include <fstream>
00009 #include <iostream>
00010 #include <stdio.h>
00011 #include <cstring>
00012 
00013 #include "OnlineDB/Oracle/interface/Oracle.h"
00014 
00015 #include "OnlineDB/EcalCondDB/interface/IDataItem.h"
00016 #include "OnlineDB/EcalCondDB/interface/MODRunIOV.h"
00017 #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h"
00018 
00019 class MODCCSHFDat : public IDataItem {
00020  public:
00021   typedef oracle::occi::Clob Clob;
00022   friend class EcalCondDBInterface;
00023   MODCCSHFDat();
00024   ~MODCCSHFDat();
00025 
00026   // User data methods
00027   inline std::string getTable() { return "OD_CCS_HF_DAT"; }
00028 
00029   inline void setClob(unsigned char* x) { m_clob = x; }
00030   inline unsigned char* getClob() const { return m_clob; }
00031 
00032   inline void setSize(unsigned int id) { m_size = id; }
00033   inline unsigned int getSize() const { return m_size; }
00034 
00035   inline void setTest(int id) { testing = id; }
00036   inline int getTest() const { return testing; }
00037 
00038   void setFile(std::string x) ;
00039   inline std::string getFile() const { return m_file; }
00040 
00041  private:
00042   void prepareWrite() 
00043     throw(std::runtime_error);
00044 
00045   void writeDB(const EcalLogicID* ecid, const MODCCSHFDat* item, MODRunIOV* iov )
00046     throw(std::runtime_error);
00047 
00048   void writeArrayDB(const std::map< EcalLogicID, MODCCSHFDat >* data, MODRunIOV* iov)
00049   throw(std::runtime_error);
00050 
00051   void fetchData(std::map< EcalLogicID, MODCCSHFDat >* fillMap, MODRunIOV* iov)
00052      throw(std::runtime_error);
00053 
00054   // User data
00055   unsigned char* m_clob;
00056   unsigned int m_size;
00057   std::string m_file;
00058   int testing;
00059   unsigned char* readClob (Clob &clob, int size)
00060     throw (std::runtime_error);
00061   void populateClob (Clob &clob, std::string fname, unsigned int clob_size)
00062     throw (std::runtime_error);
00063 
00064 
00065 
00066 };
00067 
00068 #endif