CMS 3D CMS Logo

MODCCSHFDat.h
Go to the documentation of this file.
1 #ifndef MODCCSHFDAT_H
2 #define MODCCSHFDAT_H
3 
4 #include <map>
5 #include <stdexcept>
6 
7 #include <string>
8 #include <fstream>
9 #include <iostream>
10 #include <cstdio>
11 #include <cstring>
12 
14 
18 
19 class MODCCSHFDat : public IDataItem {
20  public:
21  typedef oracle::occi::Clob Clob;
22  friend class EcalCondDBInterface;
23  MODCCSHFDat();
24  ~MODCCSHFDat() override;
25 
26  // User data methods
27  inline std::string getTable() override { return "OD_CCS_HF_DAT"; }
28 
29  inline void setClob(unsigned char* x) { m_clob = x; }
30  inline unsigned char* getClob() const { return m_clob; }
31 
32  inline void setSize(unsigned int id) { m_size = id; }
33  inline unsigned int getSize() const { return m_size; }
34 
35  inline void setTest(int id) { testing = id; }
36  inline int getTest() const { return testing; }
37 
38  void setFile(std::string x) ;
39  inline std::string getFile() const { return m_file; }
40 
41  private:
42  void prepareWrite()
43  noexcept(false) override;
44 
45  void writeDB(const EcalLogicID* ecid, const MODCCSHFDat* item, MODRunIOV* iov )
46  noexcept(false);
47 
48  void writeArrayDB(const std::map< EcalLogicID, MODCCSHFDat >* data, MODRunIOV* iov)
49  noexcept(false);
50 
51  void fetchData(std::map< EcalLogicID, MODCCSHFDat >* fillMap, MODRunIOV* iov)
52  noexcept(false);
53 
54  // User data
55  unsigned char* m_clob;
56  unsigned int m_size;
58  int testing;
59  unsigned char* readClob (Clob &clob, int size)
60  noexcept(false);
61  void populateClob (Clob &clob, std::string fname, unsigned int clob_size)
62  noexcept(false);
63 
64 
65 
66 };
67 
68 #endif
size
Write out results.
std::string getFile() const
Definition: MODCCSHFDat.h:39
std::string getTable() override
Definition: MODCCSHFDat.h:27
unsigned char * getClob() const
Definition: MODCCSHFDat.h:30
oracle::occi::Clob Clob
Definition: MODCCSHFDat.h:21
unsigned char * m_clob
Definition: MODCCSHFDat.h:55
void setTest(int id)
Definition: MODCCSHFDat.h:35
unsigned char * readClob(Clob &clob, int size) noexcept(false)
Definition: MODCCSHFDat.cc:329
void prepareWrite() noexcept(false) override
Definition: MODCCSHFDat.cc:61
int getTest() const
Definition: MODCCSHFDat.h:36
unsigned int m_size
Definition: MODCCSHFDat.h:56
std::string m_file
Definition: MODCCSHFDat.h:57
void fetchData(std::map< EcalLogicID, MODCCSHFDat > *fillMap, MODRunIOV *iov) noexcept(false)
Definition: MODCCSHFDat.cc:142
~MODCCSHFDat() override
Definition: MODCCSHFDat.cc:32
#define noexcept
void writeDB(const EcalLogicID *ecid, const MODCCSHFDat *item, MODRunIOV *iov) noexcept(false)
Definition: MODCCSHFDat.cc:81
void setFile(std::string x)
Definition: MODCCSHFDat.cc:37
void writeArrayDB(const std::map< EcalLogicID, MODCCSHFDat > *data, MODRunIOV *iov) noexcept(false)
Definition: MODCCSHFDat.cc:185
void populateClob(Clob &clob, std::string fname, unsigned int clob_size) noexcept(false)
Definition: MODCCSHFDat.cc:258
void setClob(unsigned char *x)
Definition: MODCCSHFDat.h:29
void setSize(unsigned int id)
Definition: MODCCSHFDat.h:32
string fname
main script
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
unsigned int getSize() const
Definition: MODCCSHFDat.h:33