CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
FEConfigCokeDat Class Reference

#include <FEConfigCokeDat.h>

Inheritance diagram for FEConfigCokeDat:
IDataItem IDBObject

Public Member Functions

void clear ()
 
 FEConfigCokeDat ()
 
int getCombCumulDetect () const
 
int getCombiMode () const
 
int getCombSuccDetect () const
 
int getCumDetectEnable () const
 
int getCumul1Detect () const
 
int getCumul1EventLimit () const
 
int getCumul2Limit () const
 
int getCumulEventLimit () const
 
int getOccDetect () const
 
int getOccLimit () const
 
int getOccMode () const
 
int getPar1 () const
 
int getPar10 () const
 
int getPar11 () const
 
int getPar12 () const
 
int getPar13 () const
 
int getPar14 () const
 
int getPar15 () const
 
int getPar16 () const
 
int getPar17 () const
 
int getPar18 () const
 
int getPar19 () const
 
int getPar2 () const
 
int getPar3 () const
 
int getPar4 () const
 
int getPar5 () const
 
int getPar6 () const
 
int getPar7 () const
 
int getPar8 () const
 
int getPar9 () const
 
int getStopBufW () const
 
int getSucc1EventLimit () const
 
int getSuccDetectEnable () const
 
int getSuccEventLimit () const
 
std::string getTable () override
 
int getThreshold () const
 
int getThreshold1 () const
 
int getThreshold2 () const
 
int getThreshold3 () const
 
void setCombCumulDetect (int x)
 
void setCombiMode (int x)
 
void setCombSuccDetect (int x)
 
void setCumDetectEnable (int x)
 
void setCumul1Detect (int x)
 
void setCumul1EventLimit (int x)
 
void setCumul2Limit (int x)
 
void setCumulEventLimit (int x)
 
void setOccDetect (int x)
 
void setOccLimit (int x)
 
void setOccMode (int x)
 
void setPar1 (int x)
 
void setPar10 (int x)
 
void setPar11 (int x)
 
void setPar12 (int x)
 
void setPar13 (int x)
 
void setPar14 (int x)
 
void setPar15 (int x)
 
void setPar16 (int x)
 
void setPar17 (int x)
 
void setPar18 (int x)
 
void setPar19 (int x)
 
void setPar2 (int x)
 
void setPar3 (int x)
 
void setPar4 (int x)
 
void setPar5 (int x)
 
void setPar6 (int x)
 
void setPar7 (int x)
 
void setPar8 (int x)
 
void setPar9 (int x)
 
void setStopBufW (int x)
 
void setSucc1EventLimit (int x)
 
void setSuccDetectEnable (int x)
 
void setSuccEventLimit (int x)
 
void setThreshold (int x)
 
void setThreshold1 (int x)
 
void setThreshold2 (int x)
 
void setThreshold3 (int x)
 
 ~FEConfigCokeDat () override
 
- Public Member Functions inherited from IDataItem
 IDataItem ()
 
- Public Member Functions inherited from IDBObject
oracle::occi::Connection * getConn () const
 
oracle::occi::Environment * getEnv () const
 
void setConnection (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
virtual ~IDBObject ()
 

Private Member Functions

void fetchData (std::map< EcalLogicID, FEConfigCokeDat > *fillMap, FEConfigCokeInfo *iconf) noexcept(false)
 
void prepareWrite () noexcept(false) override
 
void writeArrayDB (const std::map< EcalLogicID, FEConfigCokeDat > *data, FEConfigCokeInfo *iconf) noexcept(false)
 
void writeDB (const EcalLogicID *ecid, const FEConfigCokeDat *item, FEConfigCokeInfo *iconf) noexcept(false)
 

Private Attributes

int m_comb_cumul_det
 
int m_comb_succ_det
 
int m_combi_mode
 
int m_cum1_det
 
int m_cum1_ev_lim
 
int m_cum2_lim
 
int m_cum_det_en
 
int m_cum_ev_lim
 
int m_occ_det
 
int m_occ_lim
 
int m_occ_mode
 
int m_stop_bufw
 
int m_succ1_ev_lim
 
int m_succ_det_en
 
int m_succ_ev_lim
 
int m_thre
 
int m_thre1
 
int m_thre2
 
int m_thre3
 

Friends

class EcalCondDBInterface
 

Additional Inherited Members

- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS = 1024
 
- Protected Member Functions inherited from IDataItem
void checkPrepare () noexcept(false)
 
void createReadStatement () noexcept(false)
 
void setPrefetchRowCount (int ncount) noexcept(false)
 
void terminateReadStatement () noexcept(false)
 
void terminateWriteStatement () noexcept(false)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const noexcept(false)
 
- Protected Attributes inherited from IDataItem
oracle::occi::Statement * m_readStmt
 
oracle::occi::Statement * m_writeStmt
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

Definition at line 11 of file FEConfigCokeDat.h.

Constructor & Destructor Documentation

◆ FEConfigCokeDat()

FEConfigCokeDat::FEConfigCokeDat ( )

Definition at line 12 of file FEConfigCokeDat.cc.

References clear().

12  {
13  m_env = nullptr;
14  m_conn = nullptr;
15  m_writeStmt = nullptr;
16  m_readStmt = nullptr;
17 
18  clear();
19 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:23
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:24

◆ ~FEConfigCokeDat()

FEConfigCokeDat::~FEConfigCokeDat ( )
override

Definition at line 21 of file FEConfigCokeDat.cc.

21 {}

Member Function Documentation

◆ clear()

void FEConfigCokeDat::clear ( void  )
inline

Definition at line 98 of file FEConfigCokeDat.h.

References m_comb_cumul_det, m_comb_succ_det, m_combi_mode, m_cum1_det, m_cum1_ev_lim, m_cum2_lim, m_cum_det_en, m_cum_ev_lim, m_occ_det, m_occ_lim, m_occ_mode, m_stop_bufw, m_succ1_ev_lim, m_succ_det_en, m_succ_ev_lim, m_thre, m_thre1, m_thre2, and m_thre3.

98  {
99  m_thre = 0;
100  m_succ_ev_lim = 0;
101  m_cum_ev_lim = 0;
102  m_succ_det_en = 0;
103  m_cum_det_en = 0;
104  m_thre1 = 0;
105  m_succ1_ev_lim = 0;
106  m_cum1_ev_lim = 0;
107  m_combi_mode = 0;
108  m_occ_mode = 0;
109  m_comb_succ_det = 0;
110  m_comb_cumul_det = 0;
111  m_occ_det = 0;
112  m_cum1_det = 0;
113  m_thre2 = 0;
114  m_occ_lim = 0;
115  m_thre3 = 0;
116  m_cum2_lim = 0;
117  m_stop_bufw = 0;
118  }

◆ fetchData()

void FEConfigCokeDat::fetchData ( std::map< EcalLogicID, FEConfigCokeDat > *  fillMap,
FEConfigCokeInfo iconf 
)
privatenoexcept

Definition at line 86 of file FEConfigCokeDat.cc.

References MillePedeFileConverter_cfg::e, Exception, AlCaHLTBitMon_ParallelJobs::p, setPar1(), setPar10(), setPar11(), setPar12(), setPar13(), setPar14(), setPar15(), setPar16(), setPar17(), setPar18(), setPar19(), setPar2(), setPar3(), setPar4(), setPar5(), setPar6(), setPar7(), setPar8(), and setPar9().

86  {
87  this->checkConnection();
88  fillMap->clear();
89 
90  iconf->setConnection(m_env, m_conn);
91  int iconfID = iconf->fetchID();
92  if (!iconfID) {
93  // throw(std::runtime_error("FEConfigCokeDat::writeDB: ICONF not in DB"));
94  return;
95  }
96 
97  try {
98  m_readStmt->setSQL(
99  "SELECT cv.name, cv.logic_id, cv.id1, cv.id2, cv.id3, cv.maps_to, "
100  " d.THRESHOLD, d.SUCC_EVENT_LIMIT, d.CUMUL_EVENT_LIMIT, d.SUCC_DETECT_ENABLE, d.CUMUL_DETECT_ENABLE, "
101  "d.THD1_THRESHOLD, d.SUCC1_EV_LIMIT, d.CUMUL1_EV_LIMIT, d.COMBI_MODE, d.OCC_MODE, d.COMB_SUCC_DETECT, "
102  "d.COMB_CUMUL_DETECT, d.OCC_DETECT, d.CUMUL1_DETECT, d.THD2_THRESHOLD , d.OCC_LIMIT , d.THD3_THRESHOLD , "
103  "d.CUMUL2_LIMIT , d.STOP_BUFW "
104  "FROM channelview cv JOIN " +
105  getTable() +
106  " d "
107  "ON cv.logic_id = d.logic_id AND cv.name = cv.maps_to "
108  "WHERE coke_conf_id = :coke_conf_id");
109  m_readStmt->setInt(1, iconfID);
110  ResultSet* rset = m_readStmt->executeQuery();
111 
112  std::pair<EcalLogicID, FEConfigCokeDat> p;
113  FEConfigCokeDat dat;
114  while (rset->next()) {
115  p.first = EcalLogicID(rset->getString(1), // name
116  rset->getInt(2), // logic_id
117  rset->getInt(3), // id1
118  rset->getInt(4), // id2
119  rset->getInt(5), // id3
120  rset->getString(6)); // maps_to
121 
122  dat.setPar1(rset->getInt(7));
123  dat.setPar2(rset->getInt(8));
124  dat.setPar3(rset->getInt(9));
125  dat.setPar4(rset->getInt(10));
126  dat.setPar5(rset->getInt(11));
127  dat.setPar6(rset->getInt(12));
128  dat.setPar7(rset->getInt(13));
129  dat.setPar8(rset->getInt(14));
130  dat.setPar9(rset->getInt(15));
131  dat.setPar10(rset->getInt(16));
132  dat.setPar11(rset->getInt(17));
133  dat.setPar12(rset->getInt(18));
134  dat.setPar13(rset->getInt(19));
135  dat.setPar14(rset->getInt(20));
136  dat.setPar15(rset->getInt(21));
137  dat.setPar16(rset->getInt(22));
138  dat.setPar17(rset->getInt(23));
139  dat.setPar18(rset->getInt(24));
140  dat.setPar19(rset->getInt(25));
141 
142  p.second = dat;
143  fillMap->insert(p);
144  }
145  } catch (SQLException& e) {
146  throw cms::Exception("SQLException") << "FEConfigCokeDat::fetchData: " << e.getMessage();
147  }
148 }
void setPar7(int x)
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
void setPar17(int x)
void setPar15(int x)
void setPar12(int x)
int fetchID() noexcept(false)
void setPar19(int x)
void setPar14(int x)
void setPar4(int x)
void setPar18(int x)
std::string getTable() override
void setPar9(int x)
void setPar11(int x)
void setPar16(int x)
void setPar8(int x)
void setPar5(int x)
void setPar10(int x)
oracle::occi::Statement * m_readStmt
Definition: IDataItem.h:24
void setPar13(int x)
void setPar6(int x)
void setPar1(int x)
void setPar3(int x)
void setConnection(oracle::occi::Environment *env, oracle::occi::Connection *conn)
Definition: IDBObject.h:23
void setPar2(int x)

◆ getCombCumulDetect()

int FEConfigCokeDat::getCombCumulDetect ( ) const
inline

Definition at line 43 of file FEConfigCokeDat.h.

References m_comb_cumul_det.

43 { return m_comb_cumul_det; }

◆ getCombiMode()

int FEConfigCokeDat::getCombiMode ( ) const
inline

Definition at line 37 of file FEConfigCokeDat.h.

References m_combi_mode.

37 { return m_combi_mode; }

◆ getCombSuccDetect()

int FEConfigCokeDat::getCombSuccDetect ( ) const
inline

Definition at line 41 of file FEConfigCokeDat.h.

References m_comb_succ_det.

41 { return m_comb_succ_det; }

◆ getCumDetectEnable()

int FEConfigCokeDat::getCumDetectEnable ( ) const
inline

Definition at line 29 of file FEConfigCokeDat.h.

References m_cum_det_en.

29 { return m_cum_det_en; }

◆ getCumul1Detect()

int FEConfigCokeDat::getCumul1Detect ( ) const
inline

Definition at line 47 of file FEConfigCokeDat.h.

References m_cum1_det.

47 { return m_cum1_det; }

◆ getCumul1EventLimit()

int FEConfigCokeDat::getCumul1EventLimit ( ) const
inline

Definition at line 35 of file FEConfigCokeDat.h.

References m_cum1_ev_lim.

35 { return m_cum1_ev_lim; }

◆ getCumul2Limit()

int FEConfigCokeDat::getCumul2Limit ( ) const
inline

Definition at line 55 of file FEConfigCokeDat.h.

References m_cum2_lim.

55 { return m_cum2_lim; }

◆ getCumulEventLimit()

int FEConfigCokeDat::getCumulEventLimit ( ) const
inline

Definition at line 25 of file FEConfigCokeDat.h.

References m_cum_ev_lim.

25 { return m_cum_ev_lim; }

◆ getOccDetect()

int FEConfigCokeDat::getOccDetect ( ) const
inline

Definition at line 45 of file FEConfigCokeDat.h.

References m_occ_det.

45 { return m_occ_det; }

◆ getOccLimit()

int FEConfigCokeDat::getOccLimit ( ) const
inline

Definition at line 51 of file FEConfigCokeDat.h.

References m_occ_lim.

51 { return m_occ_lim; }

◆ getOccMode()

int FEConfigCokeDat::getOccMode ( ) const
inline

Definition at line 39 of file FEConfigCokeDat.h.

References m_occ_mode.

39 { return m_occ_mode; }

◆ getPar1()

int FEConfigCokeDat::getPar1 ( ) const
inline

Definition at line 60 of file FEConfigCokeDat.h.

References m_thre.

Referenced by writeArrayDB().

60 { return m_thre; }

◆ getPar10()

int FEConfigCokeDat::getPar10 ( ) const
inline

Definition at line 78 of file FEConfigCokeDat.h.

References m_occ_mode.

Referenced by writeArrayDB().

78 { return m_occ_mode; }

◆ getPar11()

int FEConfigCokeDat::getPar11 ( ) const
inline

Definition at line 80 of file FEConfigCokeDat.h.

References m_comb_succ_det.

Referenced by writeArrayDB().

80 { return m_comb_succ_det; }

◆ getPar12()

int FEConfigCokeDat::getPar12 ( ) const
inline

Definition at line 82 of file FEConfigCokeDat.h.

References m_comb_cumul_det.

Referenced by writeArrayDB().

82 { return m_comb_cumul_det; }

◆ getPar13()

int FEConfigCokeDat::getPar13 ( ) const
inline

Definition at line 84 of file FEConfigCokeDat.h.

References m_occ_det.

Referenced by writeArrayDB().

84 { return m_occ_det; }

◆ getPar14()

int FEConfigCokeDat::getPar14 ( ) const
inline

Definition at line 86 of file FEConfigCokeDat.h.

References m_cum1_det.

Referenced by writeArrayDB().

86 { return m_cum1_det; }

◆ getPar15()

int FEConfigCokeDat::getPar15 ( ) const
inline

Definition at line 88 of file FEConfigCokeDat.h.

References m_thre2.

Referenced by writeArrayDB().

88 { return m_thre2; }

◆ getPar16()

int FEConfigCokeDat::getPar16 ( ) const
inline

Definition at line 90 of file FEConfigCokeDat.h.

References m_occ_lim.

Referenced by writeArrayDB().

90 { return m_occ_lim; }

◆ getPar17()

int FEConfigCokeDat::getPar17 ( ) const
inline

Definition at line 92 of file FEConfigCokeDat.h.

References m_thre3.

Referenced by writeArrayDB().

92 { return m_thre3; }

◆ getPar18()

int FEConfigCokeDat::getPar18 ( ) const
inline

Definition at line 94 of file FEConfigCokeDat.h.

References m_cum2_lim.

Referenced by writeArrayDB().

94 { return m_cum2_lim; }

◆ getPar19()

int FEConfigCokeDat::getPar19 ( ) const
inline

Definition at line 96 of file FEConfigCokeDat.h.

References m_stop_bufw.

Referenced by writeArrayDB().

96 { return m_stop_bufw; }

◆ getPar2()

int FEConfigCokeDat::getPar2 ( ) const
inline

Definition at line 62 of file FEConfigCokeDat.h.

References m_succ_ev_lim.

Referenced by writeArrayDB().

62 { return m_succ_ev_lim; }

◆ getPar3()

int FEConfigCokeDat::getPar3 ( ) const
inline

Definition at line 64 of file FEConfigCokeDat.h.

References m_cum_ev_lim.

Referenced by writeArrayDB().

64 { return m_cum_ev_lim; }

◆ getPar4()

int FEConfigCokeDat::getPar4 ( ) const
inline

Definition at line 66 of file FEConfigCokeDat.h.

References m_succ_det_en.

Referenced by writeArrayDB().

66 { return m_succ_det_en; }

◆ getPar5()

int FEConfigCokeDat::getPar5 ( ) const
inline

Definition at line 68 of file FEConfigCokeDat.h.

References m_cum_det_en.

Referenced by writeArrayDB().

68 { return m_cum_det_en; }

◆ getPar6()

int FEConfigCokeDat::getPar6 ( ) const
inline

Definition at line 70 of file FEConfigCokeDat.h.

References m_thre1.

Referenced by writeArrayDB().

70 { return m_thre1; }

◆ getPar7()

int FEConfigCokeDat::getPar7 ( ) const
inline

Definition at line 72 of file FEConfigCokeDat.h.

References m_succ1_ev_lim.

Referenced by writeArrayDB().

72 { return m_succ1_ev_lim; }

◆ getPar8()

int FEConfigCokeDat::getPar8 ( ) const
inline

Definition at line 74 of file FEConfigCokeDat.h.

References m_cum1_ev_lim.

Referenced by writeArrayDB().

74 { return m_cum1_ev_lim; }

◆ getPar9()

int FEConfigCokeDat::getPar9 ( ) const
inline

Definition at line 76 of file FEConfigCokeDat.h.

References m_combi_mode.

Referenced by writeArrayDB().

76 { return m_combi_mode; }

◆ getStopBufW()

int FEConfigCokeDat::getStopBufW ( ) const
inline

Definition at line 57 of file FEConfigCokeDat.h.

References m_stop_bufw.

57 { return m_stop_bufw; }

◆ getSucc1EventLimit()

int FEConfigCokeDat::getSucc1EventLimit ( ) const
inline

Definition at line 33 of file FEConfigCokeDat.h.

References m_succ1_ev_lim.

33 { return m_succ1_ev_lim; }

◆ getSuccDetectEnable()

int FEConfigCokeDat::getSuccDetectEnable ( ) const
inline

Definition at line 27 of file FEConfigCokeDat.h.

References m_succ_det_en.

27 { return m_succ_det_en; }

◆ getSuccEventLimit()

int FEConfigCokeDat::getSuccEventLimit ( ) const
inline

Definition at line 23 of file FEConfigCokeDat.h.

References m_succ_ev_lim.

23 { return m_succ_ev_lim; }

◆ getTable()

std::string FEConfigCokeDat::getTable ( )
inlineoverridevirtual

Implements IDataItem.

Definition at line 18 of file FEConfigCokeDat.h.

18 { return "FE_CONFIG_COKE_DAT"; }

◆ getThreshold()

int FEConfigCokeDat::getThreshold ( ) const
inline

Definition at line 21 of file FEConfigCokeDat.h.

References m_thre.

21 { return m_thre; }

◆ getThreshold1()

int FEConfigCokeDat::getThreshold1 ( ) const
inline

Definition at line 31 of file FEConfigCokeDat.h.

References m_thre1.

31 { return m_thre1; }

◆ getThreshold2()

int FEConfigCokeDat::getThreshold2 ( ) const
inline

Definition at line 49 of file FEConfigCokeDat.h.

References m_thre2.

49 { return m_thre2; }

◆ getThreshold3()

int FEConfigCokeDat::getThreshold3 ( ) const
inline

Definition at line 53 of file FEConfigCokeDat.h.

References m_thre3.

53 { return m_thre3; }

◆ prepareWrite()

void FEConfigCokeDat::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IDataItem.

Definition at line 23 of file FEConfigCokeDat.cc.

References MillePedeFileConverter_cfg::e, and Exception.

23  {
24  this->checkConnection();
25 
26  try {
27  m_writeStmt = m_conn->createStatement();
28  m_writeStmt->setSQL(
29  "INSERT INTO " + getTable() +
30  " (coke_conf_id, logic_id, "
31  " THRESHOLD, SUCC_EVENT_LIMIT, CUMUL_EVENT_LIMIT, SUCC_DETECT_ENABLE, CUMUL_DETECT_ENABLE, THD1_THRESHOLD, "
32  "SUCC1_EV_LIMIT, CUMUL1_EV_LIMIT, COMBI_MODE, OCC_MODE, COMB_SUCC_DETECT, COMB_CUMUL_DETECT, OCC_DETECT, "
33  "CUMUL1_DETECT, THD2_THRESHOLD , OCC_LIMIT , THD3_THRESHOLD , CUMUL2_LIMIT , STOP_BUFW ) "
34  "VALUES (:coke_conf_id, :logic_id, "
35  ":m1, :m2, :m3, :m4, :m5, :m6, :m7, :m8, :m9, :m10, :m11, :m12, :m13, :m14, :m15, :m16, :m17, :m18, :m19 )");
36  } catch (SQLException& e) {
37  throw cms::Exception("SQLException") << "FEConfigCokeDat::prepareWrite(): " << e.getMessage();
38  }
39 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:23
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
std::string getTable() override

◆ setCombCumulDetect()

void FEConfigCokeDat::setCombCumulDetect ( int  x)
inline

Definition at line 42 of file FEConfigCokeDat.h.

References m_comb_cumul_det, and x.

◆ setCombiMode()

void FEConfigCokeDat::setCombiMode ( int  x)
inline

Definition at line 36 of file FEConfigCokeDat.h.

References m_combi_mode, and x.

◆ setCombSuccDetect()

void FEConfigCokeDat::setCombSuccDetect ( int  x)
inline

Definition at line 40 of file FEConfigCokeDat.h.

References m_comb_succ_det, and x.

◆ setCumDetectEnable()

void FEConfigCokeDat::setCumDetectEnable ( int  x)
inline

Definition at line 28 of file FEConfigCokeDat.h.

References m_cum_det_en, and x.

◆ setCumul1Detect()

void FEConfigCokeDat::setCumul1Detect ( int  x)
inline

Definition at line 46 of file FEConfigCokeDat.h.

References m_cum1_det, and x.

◆ setCumul1EventLimit()

void FEConfigCokeDat::setCumul1EventLimit ( int  x)
inline

Definition at line 34 of file FEConfigCokeDat.h.

References m_cum1_ev_lim, and x.

◆ setCumul2Limit()

void FEConfigCokeDat::setCumul2Limit ( int  x)
inline

Definition at line 54 of file FEConfigCokeDat.h.

References m_cum2_lim, and x.

◆ setCumulEventLimit()

void FEConfigCokeDat::setCumulEventLimit ( int  x)
inline

Definition at line 24 of file FEConfigCokeDat.h.

References m_cum_ev_lim, and x.

◆ setOccDetect()

void FEConfigCokeDat::setOccDetect ( int  x)
inline

Definition at line 44 of file FEConfigCokeDat.h.

References m_occ_det, and x.

◆ setOccLimit()

void FEConfigCokeDat::setOccLimit ( int  x)
inline

Definition at line 50 of file FEConfigCokeDat.h.

References m_occ_lim, and x.

◆ setOccMode()

void FEConfigCokeDat::setOccMode ( int  x)
inline

Definition at line 38 of file FEConfigCokeDat.h.

References m_occ_mode, and x.

◆ setPar1()

void FEConfigCokeDat::setPar1 ( int  x)
inline

Definition at line 59 of file FEConfigCokeDat.h.

References m_thre, and x.

Referenced by fetchData().

◆ setPar10()

void FEConfigCokeDat::setPar10 ( int  x)
inline

Definition at line 77 of file FEConfigCokeDat.h.

References m_occ_mode, and x.

Referenced by fetchData().

◆ setPar11()

void FEConfigCokeDat::setPar11 ( int  x)
inline

Definition at line 79 of file FEConfigCokeDat.h.

References m_comb_succ_det, and x.

Referenced by fetchData().

◆ setPar12()

void FEConfigCokeDat::setPar12 ( int  x)
inline

Definition at line 81 of file FEConfigCokeDat.h.

References m_comb_cumul_det, and x.

Referenced by fetchData().

◆ setPar13()

void FEConfigCokeDat::setPar13 ( int  x)
inline

Definition at line 83 of file FEConfigCokeDat.h.

References m_occ_det, and x.

Referenced by fetchData().

◆ setPar14()

void FEConfigCokeDat::setPar14 ( int  x)
inline

Definition at line 85 of file FEConfigCokeDat.h.

References m_cum1_det, and x.

Referenced by fetchData().

◆ setPar15()

void FEConfigCokeDat::setPar15 ( int  x)
inline

Definition at line 87 of file FEConfigCokeDat.h.

References m_thre2, and x.

Referenced by fetchData().

◆ setPar16()

void FEConfigCokeDat::setPar16 ( int  x)
inline

Definition at line 89 of file FEConfigCokeDat.h.

References m_occ_lim, and x.

Referenced by fetchData().

◆ setPar17()

void FEConfigCokeDat::setPar17 ( int  x)
inline

Definition at line 91 of file FEConfigCokeDat.h.

References m_thre3, and x.

Referenced by fetchData().

◆ setPar18()

void FEConfigCokeDat::setPar18 ( int  x)
inline

Definition at line 93 of file FEConfigCokeDat.h.

References m_cum2_lim, and x.

Referenced by fetchData().

◆ setPar19()

void FEConfigCokeDat::setPar19 ( int  x)
inline

Definition at line 95 of file FEConfigCokeDat.h.

References m_stop_bufw, and x.

Referenced by fetchData().

◆ setPar2()

void FEConfigCokeDat::setPar2 ( int  x)
inline

Definition at line 61 of file FEConfigCokeDat.h.

References m_succ_ev_lim, and x.

Referenced by fetchData().

◆ setPar3()

void FEConfigCokeDat::setPar3 ( int  x)
inline

Definition at line 63 of file FEConfigCokeDat.h.

References m_cum_ev_lim, and x.

Referenced by fetchData().

◆ setPar4()

void FEConfigCokeDat::setPar4 ( int  x)
inline

Definition at line 65 of file FEConfigCokeDat.h.

References m_succ_det_en, and x.

Referenced by fetchData().

◆ setPar5()

void FEConfigCokeDat::setPar5 ( int  x)
inline

Definition at line 67 of file FEConfigCokeDat.h.

References m_cum_det_en, and x.

Referenced by fetchData().

◆ setPar6()

void FEConfigCokeDat::setPar6 ( int  x)
inline

Definition at line 69 of file FEConfigCokeDat.h.

References m_thre1, and x.

Referenced by fetchData().

◆ setPar7()

void FEConfigCokeDat::setPar7 ( int  x)
inline

Definition at line 71 of file FEConfigCokeDat.h.

References m_succ1_ev_lim, and x.

Referenced by fetchData().

◆ setPar8()

void FEConfigCokeDat::setPar8 ( int  x)
inline

Definition at line 73 of file FEConfigCokeDat.h.

References m_cum1_ev_lim, and x.

Referenced by fetchData().

◆ setPar9()

void FEConfigCokeDat::setPar9 ( int  x)
inline

Definition at line 75 of file FEConfigCokeDat.h.

References m_combi_mode, and x.

Referenced by fetchData().

◆ setStopBufW()

void FEConfigCokeDat::setStopBufW ( int  x)
inline

Definition at line 56 of file FEConfigCokeDat.h.

References m_stop_bufw, and x.

◆ setSucc1EventLimit()

void FEConfigCokeDat::setSucc1EventLimit ( int  x)
inline

Definition at line 32 of file FEConfigCokeDat.h.

References m_succ1_ev_lim, and x.

◆ setSuccDetectEnable()

void FEConfigCokeDat::setSuccDetectEnable ( int  x)
inline

Definition at line 26 of file FEConfigCokeDat.h.

References m_succ_det_en, and x.

◆ setSuccEventLimit()

void FEConfigCokeDat::setSuccEventLimit ( int  x)
inline

Definition at line 22 of file FEConfigCokeDat.h.

References m_succ_ev_lim, and x.

◆ setThreshold()

void FEConfigCokeDat::setThreshold ( int  x)
inline

Definition at line 20 of file FEConfigCokeDat.h.

References m_thre, and x.

◆ setThreshold1()

void FEConfigCokeDat::setThreshold1 ( int  x)
inline

Definition at line 30 of file FEConfigCokeDat.h.

References m_thre1, and x.

◆ setThreshold2()

void FEConfigCokeDat::setThreshold2 ( int  x)
inline

Definition at line 48 of file FEConfigCokeDat.h.

References m_thre2, and x.

◆ setThreshold3()

void FEConfigCokeDat::setThreshold3 ( int  x)
inline

Definition at line 52 of file FEConfigCokeDat.h.

References m_thre3, and x.

◆ writeArrayDB()

void FEConfigCokeDat::writeArrayDB ( const std::map< EcalLogicID, FEConfigCokeDat > *  data,
FEConfigCokeInfo iconf 
)
privatenoexcept

Definition at line 150 of file FEConfigCokeDat.cc.

References submitPVResolutionJobs::count, data, MillePedeFileConverter_cfg::e, Exception, EcalLogicID::getLogicID(), getPar1(), getPar10(), getPar11(), getPar12(), getPar13(), getPar14(), getPar15(), getPar16(), getPar17(), getPar18(), getPar19(), getPar2(), getPar3(), getPar4(), getPar5(), getPar6(), getPar7(), getPar8(), getPar9(), and AlCaHLTBitMon_ParallelJobs::p.

151  {
152  this->checkConnection();
153  this->checkPrepare();
154 
155  int iconfID = iconf->fetchID();
156  if (!iconfID) {
157  throw(std::runtime_error("FEConfigCokeDat::writeArrayDB: ICONF not in DB"));
158  }
159 
160  int nrows = data->size();
161  int* ids = new int[nrows];
162  int* iconfid_vec = new int[nrows];
163  int* xx1 = new int[nrows];
164  int* xx2 = new int[nrows];
165  int* xx3 = new int[nrows];
166  int* xx4 = new int[nrows];
167  int* xx5 = new int[nrows];
168  int* xx6 = new int[nrows];
169  int* xx7 = new int[nrows];
170  int* xx8 = new int[nrows];
171  int* xx9 = new int[nrows];
172  int* xx10 = new int[nrows];
173  int* xx11 = new int[nrows];
174  int* xx12 = new int[nrows];
175  int* xx13 = new int[nrows];
176  int* xx14 = new int[nrows];
177  int* xx15 = new int[nrows];
178  int* xx16 = new int[nrows];
179  int* xx17 = new int[nrows];
180  int* xx18 = new int[nrows];
181  int* xx19 = new int[nrows];
182 
183  ub2* ids_len = new ub2[nrows];
184  ub2* iconf_len = new ub2[nrows];
185  ub2* x1_len = new ub2[nrows];
186  ub2* x2_len = new ub2[nrows];
187  ub2* x3_len = new ub2[nrows];
188  ub2* x4_len = new ub2[nrows];
189  ub2* x5_len = new ub2[nrows];
190  ub2* x6_len = new ub2[nrows];
191  ub2* x7_len = new ub2[nrows];
192  ub2* x8_len = new ub2[nrows];
193  ub2* x9_len = new ub2[nrows];
194  ub2* x10_len = new ub2[nrows];
195  ub2* x11_len = new ub2[nrows];
196  ub2* x12_len = new ub2[nrows];
197  ub2* x13_len = new ub2[nrows];
198  ub2* x14_len = new ub2[nrows];
199  ub2* x15_len = new ub2[nrows];
200  ub2* x16_len = new ub2[nrows];
201  ub2* x17_len = new ub2[nrows];
202  ub2* x18_len = new ub2[nrows];
203  ub2* x19_len = new ub2[nrows];
204 
205  const EcalLogicID* channel;
206  const FEConfigCokeDat* dataitem;
207  int count = 0;
208  typedef map<EcalLogicID, FEConfigCokeDat>::const_iterator CI;
209  for (CI p = data->begin(); p != data->end(); ++p) {
210  channel = &(p->first);
211  int logicID = channel->getLogicID();
212  if (!logicID) {
213  throw(std::runtime_error("FEConfigCokeDat::writeArrayDB: Bad EcalLogicID"));
214  }
215  ids[count] = logicID;
216  iconfid_vec[count] = iconfID;
217 
218  dataitem = &(p->second);
219 
220  xx1[count] = dataitem->getPar1();
221  xx2[count] = dataitem->getPar2();
222  xx3[count] = dataitem->getPar3();
223  xx4[count] = dataitem->getPar4();
224  xx5[count] = dataitem->getPar5();
225  xx6[count] = dataitem->getPar6();
226  xx7[count] = dataitem->getPar7();
227  xx8[count] = dataitem->getPar8();
228  xx9[count] = dataitem->getPar9();
229  xx10[count] = dataitem->getPar10();
230  xx11[count] = dataitem->getPar11();
231  xx12[count] = dataitem->getPar12();
232  xx13[count] = dataitem->getPar13();
233  xx14[count] = dataitem->getPar14();
234  xx15[count] = dataitem->getPar15();
235  xx16[count] = dataitem->getPar16();
236  xx17[count] = dataitem->getPar17();
237  xx18[count] = dataitem->getPar18();
238  xx19[count] = dataitem->getPar19();
239 
240  ids_len[count] = sizeof(ids[count]);
241  iconf_len[count] = sizeof(iconfid_vec[count]);
242 
243  x1_len[count] = sizeof(xx1[count]);
244  x2_len[count] = sizeof(xx2[count]);
245  x3_len[count] = sizeof(xx3[count]);
246  x4_len[count] = sizeof(xx4[count]);
247  x5_len[count] = sizeof(xx5[count]);
248  x6_len[count] = sizeof(xx6[count]);
249  x7_len[count] = sizeof(xx7[count]);
250  x8_len[count] = sizeof(xx8[count]);
251  x9_len[count] = sizeof(xx9[count]);
252  x10_len[count] = sizeof(xx10[count]);
253  x11_len[count] = sizeof(xx11[count]);
254  x12_len[count] = sizeof(xx12[count]);
255  x13_len[count] = sizeof(xx13[count]);
256  x14_len[count] = sizeof(xx14[count]);
257  x15_len[count] = sizeof(xx15[count]);
258  x16_len[count] = sizeof(xx16[count]);
259  x17_len[count] = sizeof(xx17[count]);
260  x18_len[count] = sizeof(xx18[count]);
261  x19_len[count] = sizeof(xx19[count]);
262 
263  count++;
264  }
265 
266  try {
267  m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT, sizeof(iconfid_vec[0]), iconf_len);
268  m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT, sizeof(ids[0]), ids_len);
269  m_writeStmt->setDataBuffer(3, (dvoid*)xx1, OCCIINT, sizeof(xx1[0]), x1_len);
270  m_writeStmt->setDataBuffer(4, (dvoid*)xx2, OCCIINT, sizeof(xx2[0]), x2_len);
271  m_writeStmt->setDataBuffer(5, (dvoid*)xx3, OCCIINT, sizeof(xx3[0]), x3_len);
272  m_writeStmt->setDataBuffer(6, (dvoid*)xx4, OCCIINT, sizeof(xx4[0]), x4_len);
273  m_writeStmt->setDataBuffer(7, (dvoid*)xx5, OCCIINT, sizeof(xx5[0]), x5_len);
274  m_writeStmt->setDataBuffer(8, (dvoid*)xx6, OCCIINT, sizeof(xx6[0]), x6_len);
275  m_writeStmt->setDataBuffer(9, (dvoid*)xx7, OCCIINT, sizeof(xx7[0]), x7_len);
276  m_writeStmt->setDataBuffer(10, (dvoid*)xx8, OCCIINT, sizeof(xx8[0]), x8_len);
277  m_writeStmt->setDataBuffer(11, (dvoid*)xx9, OCCIINT, sizeof(xx9[0]), x9_len);
278  m_writeStmt->setDataBuffer(12, (dvoid*)xx10, OCCIINT, sizeof(xx10[0]), x10_len);
279  m_writeStmt->setDataBuffer(13, (dvoid*)xx11, OCCIINT, sizeof(xx11[0]), x11_len);
280  m_writeStmt->setDataBuffer(14, (dvoid*)xx12, OCCIINT, sizeof(xx12[0]), x12_len);
281  m_writeStmt->setDataBuffer(15, (dvoid*)xx13, OCCIINT, sizeof(xx13[0]), x13_len);
282  m_writeStmt->setDataBuffer(16, (dvoid*)xx14, OCCIINT, sizeof(xx14[0]), x14_len);
283  m_writeStmt->setDataBuffer(17, (dvoid*)xx15, OCCIINT, sizeof(xx15[0]), x15_len);
284  m_writeStmt->setDataBuffer(18, (dvoid*)xx16, OCCIINT, sizeof(xx16[0]), x16_len);
285  m_writeStmt->setDataBuffer(19, (dvoid*)xx17, OCCIINT, sizeof(xx17[0]), x17_len);
286  m_writeStmt->setDataBuffer(20, (dvoid*)xx18, OCCIINT, sizeof(xx18[0]), x18_len);
287  m_writeStmt->setDataBuffer(21, (dvoid*)xx19, OCCIINT, sizeof(xx19[0]), x19_len);
288 
289  m_writeStmt->executeArrayUpdate(nrows);
290 
291  delete[] ids;
292  delete[] iconfid_vec;
293  delete[] xx1;
294  delete[] xx2;
295  delete[] xx3;
296  delete[] xx4;
297  delete[] xx5;
298  delete[] xx6;
299  delete[] xx7;
300  delete[] xx8;
301  delete[] xx9;
302  delete[] xx10;
303  delete[] xx11;
304  delete[] xx12;
305  delete[] xx13;
306  delete[] xx14;
307  delete[] xx15;
308  delete[] xx16;
309  delete[] xx17;
310  delete[] xx18;
311  delete[] xx19;
312 
313  delete[] ids_len;
314  delete[] iconf_len;
315  delete[] x1_len;
316  delete[] x2_len;
317  delete[] x3_len;
318  delete[] x4_len;
319  delete[] x5_len;
320  delete[] x6_len;
321  delete[] x7_len;
322  delete[] x8_len;
323  delete[] x9_len;
324  delete[] x10_len;
325  delete[] x11_len;
326  delete[] x12_len;
327  delete[] x13_len;
328  delete[] x14_len;
329  delete[] x15_len;
330  delete[] x16_len;
331  delete[] x17_len;
332  delete[] x18_len;
333  delete[] x19_len;
334 
335  } catch (SQLException& e) {
336  throw cms::Exception("SQLException") << "FEConfigCokeDat::writeArrayDB(): " << e.getMessage();
337  }
338 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:23
int getPar6() const
int getPar3() const
int getPar12() const
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
int getPar13() const
int getPar9() const
void checkPrepare() noexcept(false)
Definition: IDataItem.h:26
int getPar19() const
int getPar15() const
int fetchID() noexcept(false)
int getLogicID() const
Definition: EcalLogicID.cc:28
int getPar5() const
int getPar2() const
int getPar8() const
int getPar18() const
int getPar7() const
int getPar4() const
int getPar14() const
int getPar17() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
int getPar16() const
int getPar11() const
int getPar10() const
int getPar1() const

◆ writeDB()

void FEConfigCokeDat::writeDB ( const EcalLogicID ecid,
const FEConfigCokeDat item,
FEConfigCokeInfo iconf 
)
privatenoexcept

Definition at line 41 of file FEConfigCokeDat.cc.

References MillePedeFileConverter_cfg::e, Exception, and B2GTnPMonitor_cfi::item.

43  {
44  this->checkConnection();
45  this->checkPrepare();
46 
47  int iconfID = iconf->fetchID();
48  if (!iconfID) {
49  throw(std::runtime_error("FEConfigCokeDat::writeDB: ICONF not in DB"));
50  }
51 
52  int logicID = ecid->getLogicID();
53  if (!logicID) {
54  throw(std::runtime_error("FEConfigCokeDat::writeDB: Bad EcalLogicID"));
55  }
56 
57  try {
58  m_writeStmt->setInt(1, iconfID);
59  m_writeStmt->setInt(2, logicID);
60  m_writeStmt->setInt(3, item->getPar1());
61  m_writeStmt->setInt(4, item->getPar2());
62  m_writeStmt->setInt(5, item->getPar3());
63  m_writeStmt->setInt(6, item->getPar4());
64  m_writeStmt->setInt(7, item->getPar5());
65  m_writeStmt->setInt(8, item->getPar6());
66  m_writeStmt->setInt(9, item->getPar7());
67  m_writeStmt->setInt(10, item->getPar8());
68  m_writeStmt->setInt(11, item->getPar9());
69  m_writeStmt->setInt(12, item->getPar10());
70  m_writeStmt->setInt(13, item->getPar11());
71  m_writeStmt->setInt(14, item->getPar12());
72  m_writeStmt->setInt(15, item->getPar13());
73  m_writeStmt->setInt(16, item->getPar14());
74  m_writeStmt->setInt(17, item->getPar15());
75  m_writeStmt->setInt(18, item->getPar16());
76  m_writeStmt->setInt(19, item->getPar17());
77  m_writeStmt->setInt(20, item->getPar18());
78  m_writeStmt->setInt(21, item->getPar19());
79 
80  m_writeStmt->executeUpdate();
81  } catch (SQLException& e) {
82  throw cms::Exception("SQLException") << "FEConfigCokeDat::writeDB(): " << e.getMessage();
83  }
84 }
oracle::occi::Statement * m_writeStmt
Definition: IDataItem.h:23
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
void checkPrepare() noexcept(false)
Definition: IDataItem.h:26
int fetchID() noexcept(false)
int getLogicID() const
Definition: EcalLogicID.cc:28

Friends And Related Function Documentation

◆ EcalCondDBInterface

friend class EcalCondDBInterface
friend

Definition at line 13 of file FEConfigCokeDat.h.

Member Data Documentation

◆ m_comb_cumul_det

int FEConfigCokeDat::m_comb_cumul_det
private

Definition at line 137 of file FEConfigCokeDat.h.

Referenced by clear(), getCombCumulDetect(), getPar12(), setCombCumulDetect(), and setPar12().

◆ m_comb_succ_det

int FEConfigCokeDat::m_comb_succ_det
private

Definition at line 136 of file FEConfigCokeDat.h.

Referenced by clear(), getCombSuccDetect(), getPar11(), setCombSuccDetect(), and setPar11().

◆ m_combi_mode

int FEConfigCokeDat::m_combi_mode
private

Definition at line 134 of file FEConfigCokeDat.h.

Referenced by clear(), getCombiMode(), getPar9(), setCombiMode(), and setPar9().

◆ m_cum1_det

int FEConfigCokeDat::m_cum1_det
private

Definition at line 139 of file FEConfigCokeDat.h.

Referenced by clear(), getCumul1Detect(), getPar14(), setCumul1Detect(), and setPar14().

◆ m_cum1_ev_lim

int FEConfigCokeDat::m_cum1_ev_lim
private

Definition at line 133 of file FEConfigCokeDat.h.

Referenced by clear(), getCumul1EventLimit(), getPar8(), setCumul1EventLimit(), and setPar8().

◆ m_cum2_lim

int FEConfigCokeDat::m_cum2_lim
private

Definition at line 143 of file FEConfigCokeDat.h.

Referenced by clear(), getCumul2Limit(), getPar18(), setCumul2Limit(), and setPar18().

◆ m_cum_det_en

int FEConfigCokeDat::m_cum_det_en
private

Definition at line 130 of file FEConfigCokeDat.h.

Referenced by clear(), getCumDetectEnable(), getPar5(), setCumDetectEnable(), and setPar5().

◆ m_cum_ev_lim

int FEConfigCokeDat::m_cum_ev_lim
private

Definition at line 128 of file FEConfigCokeDat.h.

Referenced by clear(), getCumulEventLimit(), getPar3(), setCumulEventLimit(), and setPar3().

◆ m_occ_det

int FEConfigCokeDat::m_occ_det
private

Definition at line 138 of file FEConfigCokeDat.h.

Referenced by clear(), getOccDetect(), getPar13(), setOccDetect(), and setPar13().

◆ m_occ_lim

int FEConfigCokeDat::m_occ_lim
private

Definition at line 141 of file FEConfigCokeDat.h.

Referenced by clear(), getOccLimit(), getPar16(), setOccLimit(), and setPar16().

◆ m_occ_mode

int FEConfigCokeDat::m_occ_mode
private

Definition at line 135 of file FEConfigCokeDat.h.

Referenced by clear(), getOccMode(), getPar10(), setOccMode(), and setPar10().

◆ m_stop_bufw

int FEConfigCokeDat::m_stop_bufw
private

Definition at line 144 of file FEConfigCokeDat.h.

Referenced by clear(), getPar19(), getStopBufW(), setPar19(), and setStopBufW().

◆ m_succ1_ev_lim

int FEConfigCokeDat::m_succ1_ev_lim
private

Definition at line 132 of file FEConfigCokeDat.h.

Referenced by clear(), getPar7(), getSucc1EventLimit(), setPar7(), and setSucc1EventLimit().

◆ m_succ_det_en

int FEConfigCokeDat::m_succ_det_en
private

Definition at line 129 of file FEConfigCokeDat.h.

Referenced by clear(), getPar4(), getSuccDetectEnable(), setPar4(), and setSuccDetectEnable().

◆ m_succ_ev_lim

int FEConfigCokeDat::m_succ_ev_lim
private

Definition at line 127 of file FEConfigCokeDat.h.

Referenced by clear(), getPar2(), getSuccEventLimit(), setPar2(), and setSuccEventLimit().

◆ m_thre

int FEConfigCokeDat::m_thre
private

Definition at line 126 of file FEConfigCokeDat.h.

Referenced by clear(), getPar1(), getThreshold(), setPar1(), and setThreshold().

◆ m_thre1

int FEConfigCokeDat::m_thre1
private

Definition at line 131 of file FEConfigCokeDat.h.

Referenced by clear(), getPar6(), getThreshold1(), setPar6(), and setThreshold1().

◆ m_thre2

int FEConfigCokeDat::m_thre2
private

Definition at line 140 of file FEConfigCokeDat.h.

Referenced by clear(), getPar15(), getThreshold2(), setPar15(), and setThreshold2().

◆ m_thre3

int FEConfigCokeDat::m_thre3
private

Definition at line 142 of file FEConfigCokeDat.h.

Referenced by clear(), getPar17(), getThreshold3(), setPar17(), and setThreshold3().