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() noexcept(false) override;
43 
44  void writeDB(const EcalLogicID* ecid, const MODCCSHFDat* item, MODRunIOV* iov) noexcept(false);
45 
47 
48  void fetchData(std::map<EcalLogicID, MODCCSHFDat>* fillMap, MODRunIOV* iov) noexcept(false);
49 
50  // User data
51  unsigned char* m_clob;
52  unsigned int m_size;
53  std::string m_file;
54  int testing;
55  unsigned char* readClob(Clob& clob, int size) noexcept(false);
56  void populateClob(Clob& clob, std::string fname, unsigned int clob_size) noexcept(false);
57 };
58 
59 #endif
size
Write out results.
std::string getFile() const
Definition: MODCCSHFDat.h:39
std::string getTable() override
Definition: MODCCSHFDat.h:27
oracle::occi::Clob Clob
Definition: MODCCSHFDat.h:21
unsigned char * m_clob
Definition: MODCCSHFDat.h:51
unsigned int getSize() const
Definition: MODCCSHFDat.h:33
void setTest(int id)
Definition: MODCCSHFDat.h:35
unsigned char * readClob(Clob &clob, int size) noexcept(false)
Definition: MODCCSHFDat.cc:292
void prepareWrite() noexcept(false) override
Definition: MODCCSHFDat.cc:52
unsigned char * getClob() const
Definition: MODCCSHFDat.h:30
int getTest() const
Definition: MODCCSHFDat.h:36
unsigned int m_size
Definition: MODCCSHFDat.h:52
std::string m_file
Definition: MODCCSHFDat.h:53
void fetchData(std::map< EcalLogicID, MODCCSHFDat > *fillMap, MODRunIOV *iov) noexcept(false)
Definition: MODCCSHFDat.cc:125
~MODCCSHFDat() override
Definition: MODCCSHFDat.cc:27
void writeDB(const EcalLogicID *ecid, const MODCCSHFDat *item, MODRunIOV *iov) noexcept(false)
Definition: MODCCSHFDat.cc:68
void setFile(std::string x)
Definition: MODCCSHFDat.cc:29
void writeArrayDB(const std::map< EcalLogicID, MODCCSHFDat > *data, MODRunIOV *iov) noexcept(false)
Definition: MODCCSHFDat.cc:166
void populateClob(Clob &clob, std::string fname, unsigned int clob_size) noexcept(false)
Definition: MODCCSHFDat.cc:234
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:80