CMS 3D CMS Logo

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

#include <ODCCSConfig.h>

Inheritance diagram for ODCCSConfig:
IODConfig IDBObject

Public Member Functions

int fetchNextId () noexcept(false)
 
int getBC0Counter () const
 
int getBC0Delay () const
 
std::string getBGOSource () const
 
int getClock () const
 
int getDaccal () const
 
int getDAQBCIDPreset () const
 
int getDelay () const
 
std::string getGain () const
 
int getId () const
 
std::string getMemGain () const
 
int getOffsetHigh () const
 
int getOffsetLow () const
 
int getOffsetMid () const
 
std::string getTable () override
 
int getTEDelay () const
 
int getTrgBCIDPreset () const
 
std::string getTrgFilter () const
 
std::string getTrgMode () const
 
int getTTSMask () const
 
 ODCCSConfig ()
 
void setBC0Counter (int x)
 
void setBC0Delay (int x)
 
void setBGOSource (std::string x)
 
void setClock (int x)
 
void setDaccal (int x)
 
void setDAQBCIDPreset (int x)
 
void setDelay (int x)
 
void setGain (std::string x)
 
void setId (int id)
 
void setMemGain (std::string x)
 
void setOffsetHigh (int x)
 
void setOffsetLow (int x)
 
void setOffsetMid (int x)
 
void setParameters (const std::map< std::string, std::string > &my_keys_map)
 
void setTEDelay (int x)
 
void setTrgBCIDPreset (int x)
 
void setTrgFilter (std::string x)
 
void setTrgMode (std::string x)
 
void setTTSMask (int x)
 
 ~ODCCSConfig () override
 
- Public Member Functions inherited from IODConfig
std::string getConfigTag ()
 
void setConfigTag (std::string x)
 
- 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 clear ()
 
void fetchData (ODCCSConfig *result) noexcept(false)
 
int fetchID () noexcept(false)
 
void prepareWrite () noexcept(false) override
 
void writeDB () noexcept(false)
 

Private Attributes

int m_bc0
 
int m_bc0_delay
 
std::string m_bgo
 
int m_clock
 
int m_daccal
 
int m_daq
 
int m_delay
 
std::string m_gain
 
int m_ID
 
std::string m_memgain
 
int m_offset_high
 
int m_offset_low
 
int m_offset_mid
 
std::string m_pedestal_offset_release
 
std::string m_system
 
int m_te_delay
 
int m_trg
 
std::string m_trg_filter
 
std::string m_trg_mode
 
int m_tts_mask
 

Friends

class EcalCondDBInterface
 

Additional Inherited Members

- Public Types inherited from IODConfig
typedef oracle::occi::Clob Clob
 
typedef oracle::occi::SQLException SQLException
 
typedef oracle::occi::Statement Statement
 
typedef oracle::occi::Stream Stream
 
- Public Attributes inherited from IODConfig
std::string m_config_tag
 
- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS = 1024
 
- Protected Member Functions inherited from IODConfig
void checkPrepare () noexcept(false)
 
void createReadStatement () noexcept(false)
 
void populateClob (Clob &clob, std::string fname, unsigned int bufsize) noexcept(false)
 
unsigned char * readClob (Clob &clob, int size) 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 IODConfig
Statementm_readStmt
 
Statementm_writeStmt
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

Definition at line 9 of file ODCCSConfig.h.

Constructor & Destructor Documentation

◆ ODCCSConfig()

ODCCSConfig::ODCCSConfig ( )

Definition at line 29 of file ODCCSConfig.cc.

References l1ct::clear().

29  {
30  m_env = nullptr;
31  m_conn = nullptr;
32  m_writeStmt = nullptr;
33  m_readStmt = nullptr;
34  m_config_tag = "";
35  m_ID = 0;
36  clear();
37 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
Statement * m_writeStmt
Definition: IODConfig.h:33
std::string m_config_tag
Definition: IODConfig.h:25
Statement * m_readStmt
Definition: IODConfig.h:34
void clear()
Definition: ODCCSConfig.cc:39

◆ ~ODCCSConfig()

ODCCSConfig::~ODCCSConfig ( )
override

Definition at line 58 of file ODCCSConfig.cc.

58 {}

Member Function Documentation

◆ clear()

void ODCCSConfig::clear ( void  )
private

Definition at line 39 of file ODCCSConfig.cc.

References MY_NULL.

39  {
40  m_daccal = MY_NULL;
41  m_delay = MY_NULL;
42  m_gain = "";
43  m_memgain = "";
47  m_trg_mode = "";
48  m_trg_filter = "";
49  m_bgo = "";
51  m_daq = MY_NULL;
52  m_trg = MY_NULL;
53  m_bc0 = MY_NULL;
56 }
std::string m_bgo
Definition: ODCCSConfig.h:93
int m_tts_mask
Definition: ODCCSConfig.h:94
#define MY_NULL
Definition: ODCCSConfig.cc:12
int m_bc0_delay
Definition: ODCCSConfig.h:98
std::string m_memgain
Definition: ODCCSConfig.h:84
std::string m_trg_filter
Definition: ODCCSConfig.h:91
int m_offset_high
Definition: ODCCSConfig.h:85
std::string m_trg_mode
Definition: ODCCSConfig.h:90
int m_offset_low
Definition: ODCCSConfig.h:86
int m_te_delay
Definition: ODCCSConfig.h:99
int m_offset_mid
Definition: ODCCSConfig.h:87
std::string m_gain
Definition: ODCCSConfig.h:83

◆ fetchData()

void ODCCSConfig::fetchData ( ODCCSConfig result)
privatenoexcept

Definition at line 199 of file ODCCSConfig.cc.

References MillePedeFileConverter_cfg::e, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

199  {
200  this->checkConnection();
201  result->clear();
202  if (result->getId() == 0 && (result->getConfigTag().empty())) {
203  throw(std::runtime_error("ODCCSConfig::fetchData(): no Id defined for this ODCCSConfig "));
204  }
205 
206  try {
207  m_readStmt->setSQL(
208  "SELECT * "
209  "FROM ECAL_CCS_CONFIGURATION "
210  " where ( CCS_configuration_id = :1 or CCS_tag=:2 )");
211  m_readStmt->setInt(1, result->getId());
212  m_readStmt->setString(2, result->getConfigTag());
213  ResultSet* rset = m_readStmt->executeQuery();
214 
215  rset->next();
216 
217  // 1 is the id and 2 is the config tag
218 
219  result->setId(rset->getInt(1));
220  result->setConfigTag(rset->getString(2));
221 
222  result->setDaccal(rset->getInt(3));
223  result->setDelay(rset->getInt(4));
224  result->setGain(rset->getString(5));
225  result->setMemGain(rset->getString(6));
226  result->setOffsetHigh(rset->getInt(7));
227  result->setOffsetLow(rset->getInt(8));
228  result->setOffsetMid(rset->getInt(9));
229  result->setTrgMode(rset->getString(10));
230  result->setTrgFilter(rset->getString(11));
231  result->setClock(rset->getInt(12));
232  result->setBGOSource(rset->getString(13));
233  result->setTTSMask(rset->getInt(14));
234  result->setDAQBCIDPreset(rset->getInt(15));
235  result->setTrgBCIDPreset(rset->getInt(16));
236  result->setBC0Counter(rset->getInt(17));
237 
238  } catch (SQLException& e) {
239  throw(std::runtime_error(std::string("ODCCSConfig::fetchData(): ") + e.getMessage()));
240  }
241 }
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
Statement * m_readStmt
Definition: IODConfig.h:34
void clear()
Definition: ODCCSConfig.cc:39

◆ fetchID()

int ODCCSConfig::fetchID ( )
privatenoexcept

Definition at line 243 of file ODCCSConfig.cc.

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

243  {
244  // Return from memory if available
245  if (m_ID != 0) {
246  return m_ID;
247  }
248 
249  this->checkConnection();
250 
251  try {
252  Statement* stmt = m_conn->createStatement();
253  stmt->setSQL(
254  "SELECT ccs_configuration_id FROM ecal_ccs_configuration "
255  "WHERE ccs_tag=:ccs_tag ");
256 
257  stmt->setString(1, getConfigTag());
258 
259  ResultSet* rset = stmt->executeQuery();
260 
261  if (rset->next()) {
262  m_ID = rset->getInt(1);
263  } else {
264  m_ID = 0;
265  }
266  m_conn->terminateStatement(stmt);
267  } catch (SQLException& e) {
268  throw(std::runtime_error(std::string("ODCCSConfig::fetchID: ") + e.getMessage()));
269  }
270 
271  return m_ID;
272 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::Statement Statement
Definition: IODConfig.h:21
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
std::string getConfigTag()
Definition: IODConfig.h:30

◆ fetchNextId()

int ODCCSConfig::fetchNextId ( )
noexcept

Definition at line 60 of file ODCCSConfig.cc.

References MillePedeFileConverter_cfg::e, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

60  {
61  int result = 0;
62  try {
63  this->checkConnection();
64 
65  m_readStmt = m_conn->createStatement();
66  m_readStmt->setSQL("select ecal_CCS_config_sq.NextVal from dual");
67  ResultSet* rset = m_readStmt->executeQuery();
68  while (rset->next()) {
69  result = rset->getInt(1);
70  }
71  m_conn->terminateStatement(m_readStmt);
72  return result;
73 
74  } catch (SQLException& e) {
75  throw(std::runtime_error(std::string("ODCCSConfig::fetchNextId(): ") + e.getMessage()));
76  }
77 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
Statement * m_readStmt
Definition: IODConfig.h:34

◆ getBC0Counter()

int ODCCSConfig::getBC0Counter ( ) const
inline

Definition at line 59 of file ODCCSConfig.h.

References m_bc0.

59 { return m_bc0; }

◆ getBC0Delay()

int ODCCSConfig::getBC0Delay ( ) const
inline

Definition at line 60 of file ODCCSConfig.h.

References m_bc0_delay.

60 { return m_bc0_delay; }
int m_bc0_delay
Definition: ODCCSConfig.h:98

◆ getBGOSource()

std::string ODCCSConfig::getBGOSource ( ) const
inline

Definition at line 51 of file ODCCSConfig.h.

References m_bgo.

51 { return m_bgo; }
std::string m_bgo
Definition: ODCCSConfig.h:93

◆ getClock()

int ODCCSConfig::getClock ( ) const
inline

Definition at line 49 of file ODCCSConfig.h.

References m_clock.

49 { return m_clock; }

◆ getDaccal()

int ODCCSConfig::getDaccal ( ) const
inline

Definition at line 22 of file ODCCSConfig.h.

References m_daccal.

22 { return m_daccal; }

◆ getDAQBCIDPreset()

int ODCCSConfig::getDAQBCIDPreset ( ) const
inline

Definition at line 55 of file ODCCSConfig.h.

References m_daq.

55 { return m_daq; }

◆ getDelay()

int ODCCSConfig::getDelay ( ) const
inline

Definition at line 25 of file ODCCSConfig.h.

References m_delay.

25 { return m_delay; }

◆ getGain()

std::string ODCCSConfig::getGain ( ) const
inline

Definition at line 28 of file ODCCSConfig.h.

References m_gain.

28 { return m_gain; }
std::string m_gain
Definition: ODCCSConfig.h:83

◆ getId()

int ODCCSConfig::getId ( void  ) const
inline

Definition at line 19 of file ODCCSConfig.h.

References m_ID.

19 { return m_ID; }

◆ getMemGain()

std::string ODCCSConfig::getMemGain ( ) const
inline

Definition at line 31 of file ODCCSConfig.h.

References m_memgain.

31 { return m_memgain; }
std::string m_memgain
Definition: ODCCSConfig.h:84

◆ getOffsetHigh()

int ODCCSConfig::getOffsetHigh ( ) const
inline

Definition at line 34 of file ODCCSConfig.h.

References m_offset_high.

34 { return m_offset_high; }
int m_offset_high
Definition: ODCCSConfig.h:85

◆ getOffsetLow()

int ODCCSConfig::getOffsetLow ( ) const
inline

Definition at line 37 of file ODCCSConfig.h.

References m_offset_low.

37 { return m_offset_low; }
int m_offset_low
Definition: ODCCSConfig.h:86

◆ getOffsetMid()

int ODCCSConfig::getOffsetMid ( ) const
inline

Definition at line 40 of file ODCCSConfig.h.

References m_offset_mid.

40 { return m_offset_mid; }
int m_offset_mid
Definition: ODCCSConfig.h:87

◆ getTable()

std::string ODCCSConfig::getTable ( )
inlineoverridevirtual

Implements IODConfig.

Definition at line 16 of file ODCCSConfig.h.

16 { return "ECAL_CCS_CONFIGURATION"; }

◆ getTEDelay()

int ODCCSConfig::getTEDelay ( ) const
inline

Definition at line 62 of file ODCCSConfig.h.

References m_te_delay.

62 { return m_te_delay; }
int m_te_delay
Definition: ODCCSConfig.h:99

◆ getTrgBCIDPreset()

int ODCCSConfig::getTrgBCIDPreset ( ) const
inline

Definition at line 57 of file ODCCSConfig.h.

References m_trg.

57 { return m_trg; }

◆ getTrgFilter()

std::string ODCCSConfig::getTrgFilter ( ) const
inline

Definition at line 46 of file ODCCSConfig.h.

References m_trg_filter.

46 { return m_trg_filter; }
std::string m_trg_filter
Definition: ODCCSConfig.h:91

◆ getTrgMode()

std::string ODCCSConfig::getTrgMode ( ) const
inline

Definition at line 43 of file ODCCSConfig.h.

References m_trg_mode.

43 { return m_trg_mode; }
std::string m_trg_mode
Definition: ODCCSConfig.h:90

◆ getTTSMask()

int ODCCSConfig::getTTSMask ( ) const
inline

Definition at line 53 of file ODCCSConfig.h.

References m_tts_mask.

53 { return m_tts_mask; }
int m_tts_mask
Definition: ODCCSConfig.h:94

◆ prepareWrite()

void ODCCSConfig::prepareWrite ( )
overrideprivatevirtualnoexcept

Implements IODConfig.

Definition at line 79 of file ODCCSConfig.cc.

References MillePedeFileConverter_cfg::e, and AlCaHLTBitMon_QueryRunRegistry::string.

79  {
80  this->checkConnection();
81  int next_id = fetchNextId();
82 
83  try {
84  m_writeStmt = m_conn->createStatement();
85  m_writeStmt->setSQL(
86  "INSERT INTO ECAL_CCS_CONFIGURATION ( ccs_configuration_id, ccs_tag ,"
87  " daccal, delay, gain, memgain, offset_high,offset_low,offset_mid, trg_mode, trg_filter, "
88  " clock, BGO_SOURCE, TTS_MASK, DAQ_BCID_PRESET , TRIG_BCID_PRESET, BC0_COUNTER, BC0_DELAY, TE_DELAY ) "
89  "VALUES ( "
90  " :ccs_configuration_id, :ccs_tag, :daccal, :delay, :gain, :memgain, :offset_high,:offset_low,"
91  " :offset_mid, :trg_mode, :trg_filter, :clock, :BGO_SOURCE, :TTS_MASK, "
92  " :DAQ_BCID_PRESET , :TRIG_BCID_PRESET, :BC0_COUNTER, :BC0_DELAY, :TE_DELAY) ");
93 
94  m_writeStmt->setInt(1, next_id);
95  m_ID = next_id;
96 
97  } catch (SQLException& e) {
98  throw(std::runtime_error(std::string("ODCCSConfig::prepareWrite(): ") + e.getMessage()));
99  }
100 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
Statement * m_writeStmt
Definition: IODConfig.h:33
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
int fetchNextId() noexcept(false)
Definition: ODCCSConfig.cc:60
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20

◆ setBC0Counter()

void ODCCSConfig::setBC0Counter ( int  x)
inline

Definition at line 58 of file ODCCSConfig.h.

References m_bc0, and x.

58 { m_bc0 = x; }

◆ setBC0Delay()

void ODCCSConfig::setBC0Delay ( int  x)
inline

Definition at line 61 of file ODCCSConfig.h.

References m_bc0_delay, and x.

61 { m_bc0_delay = x; }
int m_bc0_delay
Definition: ODCCSConfig.h:98

◆ setBGOSource()

void ODCCSConfig::setBGOSource ( std::string  x)
inline

Definition at line 50 of file ODCCSConfig.h.

References m_bgo, and x.

50 { m_bgo = x; }
std::string m_bgo
Definition: ODCCSConfig.h:93

◆ setClock()

void ODCCSConfig::setClock ( int  x)
inline

Definition at line 48 of file ODCCSConfig.h.

References m_clock, and x.

48 { m_clock = x; }

◆ setDaccal()

void ODCCSConfig::setDaccal ( int  x)
inline

Definition at line 21 of file ODCCSConfig.h.

References m_daccal, and x.

21 { m_daccal = x; }

◆ setDAQBCIDPreset()

void ODCCSConfig::setDAQBCIDPreset ( int  x)
inline

Definition at line 54 of file ODCCSConfig.h.

References m_daq, and x.

54 { m_daq = x; }

◆ setDelay()

void ODCCSConfig::setDelay ( int  x)
inline

Definition at line 24 of file ODCCSConfig.h.

References m_delay, and x.

24 { m_delay = x; }

◆ setGain()

void ODCCSConfig::setGain ( std::string  x)
inline

Definition at line 27 of file ODCCSConfig.h.

References m_gain, and x.

27 { m_gain = x; }
std::string m_gain
Definition: ODCCSConfig.h:83

◆ setId()

void ODCCSConfig::setId ( int  id)
inline

Definition at line 18 of file ODCCSConfig.h.

References l1ctLayer2EG_cff::id, and m_ID.

◆ setMemGain()

void ODCCSConfig::setMemGain ( std::string  x)
inline

Definition at line 30 of file ODCCSConfig.h.

References m_memgain, and x.

30 { m_memgain = x; }
std::string m_memgain
Definition: ODCCSConfig.h:84

◆ setOffsetHigh()

void ODCCSConfig::setOffsetHigh ( int  x)
inline

Definition at line 33 of file ODCCSConfig.h.

References m_offset_high, and x.

33 { m_offset_high = x; }
int m_offset_high
Definition: ODCCSConfig.h:85

◆ setOffsetLow()

void ODCCSConfig::setOffsetLow ( int  x)
inline

Definition at line 36 of file ODCCSConfig.h.

References m_offset_low, and x.

36 { m_offset_low = x; }
int m_offset_low
Definition: ODCCSConfig.h:86

◆ setOffsetMid()

void ODCCSConfig::setOffsetMid ( int  x)
inline

Definition at line 39 of file ODCCSConfig.h.

References m_offset_mid, and x.

39 { m_offset_mid = x; }
int m_offset_mid
Definition: ODCCSConfig.h:87

◆ setParameters()

void ODCCSConfig::setParameters ( const std::map< std::string, std::string > &  my_keys_map)

Definition at line 102 of file ODCCSConfig.cc.

102  {
103  // parses the result of the XML parser that is a map of
104  // string string with variable name variable value
105 
106  for (std::map<std::string, std::string>::const_iterator ci = my_keys_map.begin(); ci != my_keys_map.end(); ci++) {
107  if (ci->first == "CCS_CONFIGURATION_ID")
108  setConfigTag(ci->second);
109  else if (ci->first == "DACCAL")
110  setDaccal(atoi(ci->second.c_str()));
111  else if (ci->first == "GAIN")
112  setGain(ci->second);
113  else if (ci->first == "MEMGAIN")
114  setMemGain(ci->second);
115  else if (ci->first == "OFFSET_HIGH")
116  setOffsetHigh(atoi(ci->second.c_str()));
117  else if (ci->first == "OFFSET_LOW")
118  setOffsetLow(atoi(ci->second.c_str()));
119  else if (ci->first == "OFFSET_MID")
120  setOffsetMid(atoi(ci->second.c_str()));
121  else if (ci->first == "TRG_MODE")
122  setTrgMode(ci->second);
123  else if (ci->first == "TRG_FILTER")
124  setTrgFilter(ci->second);
125  else if (ci->first == "CLOCK")
126  setClock(atoi(ci->second.c_str()));
127  else if (ci->first == "BGO_SOURCE")
128  setBGOSource(ci->second);
129  else if (ci->first == "TTS_MASK")
130  setTTSMask(atoi(ci->second.c_str()));
131  else if (ci->first == "DAQ_BCID_PRESET")
132  setDAQBCIDPreset(atoi(ci->second.c_str()));
133  else if (ci->first == "TRIG_BCID_PRESET")
134  setTrgBCIDPreset(atoi(ci->second.c_str()));
135  else if (ci->first == "BC0_COUNTER")
136  setBC0Counter(atoi(ci->second.c_str()));
137  else if (ci->first == "BC0_DELAY")
138  setBC0Delay(atoi(ci->second.c_str()));
139  else if (ci->first == "TE_DELAY")
140  setTEDelay(atoi(ci->second.c_str()));
141  else if (ci->first == "DELAY")
142  setDelay(atoi(ci->second.c_str()));
143  }
144 }
void setBC0Counter(int x)
Definition: ODCCSConfig.h:58
void setDelay(int x)
Definition: ODCCSConfig.h:24
void setClock(int x)
Definition: ODCCSConfig.h:48
void setOffsetLow(int x)
Definition: ODCCSConfig.h:36
void setOffsetMid(int x)
Definition: ODCCSConfig.h:39
void setTrgBCIDPreset(int x)
Definition: ODCCSConfig.h:56
void setOffsetHigh(int x)
Definition: ODCCSConfig.h:33
void setTrgFilter(std::string x)
Definition: ODCCSConfig.h:45
void setTrgMode(std::string x)
Definition: ODCCSConfig.h:42
void setDAQBCIDPreset(int x)
Definition: ODCCSConfig.h:54
void setBC0Delay(int x)
Definition: ODCCSConfig.h:61
void setTEDelay(int x)
Definition: ODCCSConfig.h:63
void setGain(std::string x)
Definition: ODCCSConfig.h:27
void setMemGain(std::string x)
Definition: ODCCSConfig.h:30
void setConfigTag(std::string x)
Definition: IODConfig.h:29
void setTTSMask(int x)
Definition: ODCCSConfig.h:52
void setDaccal(int x)
Definition: ODCCSConfig.h:21
void setBGOSource(std::string x)
Definition: ODCCSConfig.h:50

◆ setTEDelay()

void ODCCSConfig::setTEDelay ( int  x)
inline

Definition at line 63 of file ODCCSConfig.h.

References m_te_delay, and x.

63 { m_te_delay = x; }
int m_te_delay
Definition: ODCCSConfig.h:99

◆ setTrgBCIDPreset()

void ODCCSConfig::setTrgBCIDPreset ( int  x)
inline

Definition at line 56 of file ODCCSConfig.h.

References m_trg, and x.

56 { m_trg = x; }

◆ setTrgFilter()

void ODCCSConfig::setTrgFilter ( std::string  x)
inline

Definition at line 45 of file ODCCSConfig.h.

References m_trg_filter, and x.

45 { m_trg_filter = x; }
std::string m_trg_filter
Definition: ODCCSConfig.h:91

◆ setTrgMode()

void ODCCSConfig::setTrgMode ( std::string  x)
inline

Definition at line 42 of file ODCCSConfig.h.

References m_trg_mode, and x.

42 { m_trg_mode = x; }
std::string m_trg_mode
Definition: ODCCSConfig.h:90

◆ setTTSMask()

void ODCCSConfig::setTTSMask ( int  x)
inline

Definition at line 52 of file ODCCSConfig.h.

References m_tts_mask, and x.

52 { m_tts_mask = x; }
int m_tts_mask
Definition: ODCCSConfig.h:94

◆ writeDB()

void ODCCSConfig::writeDB ( )
privatenoexcept

Definition at line 146 of file ODCCSConfig.cc.

References MillePedeFileConverter_cfg::e, SET_INT, SET_STRING, and AlCaHLTBitMon_QueryRunRegistry::string.

146  {
147  this->checkConnection();
148  this->checkPrepare();
149 
150  try {
151  // number 1 is the id
152  // m_writeStmt->setString(2, this->getConfigTag());
153  // m_writeStmt->setInt(3, this->getDaccal());
154  // m_writeStmt->setInt(4, this->getDelay());
155  // m_writeStmt->setString(5, this->getGain());
156  // m_writeStmt->setString(6, this->getMemGain());
157  // m_writeStmt->setInt(7, this->getOffsetHigh());
158  // m_writeStmt->setInt(8, this->getOffsetLow());
159  // m_writeStmt->setInt(9, this->getOffsetMid());
160  // m_writeStmt->setString(10, this->getTrgMode() );
161  // m_writeStmt->setString(11, this->getTrgFilter() );
162  // m_writeStmt->setInt( 12, this->getClock() );
163  // m_writeStmt->setString(13, this->getBGOSource() );
164  // m_writeStmt->setInt(14, this->getTTSMask() );
165  // m_writeStmt->setInt(15, this->getDAQBCIDPreset() );
166  // m_writeStmt->setInt(16, this->getTrgBCIDPreset() );
167  // m_writeStmt->setInt(17, this->getBC0Counter() );
168 
169  SET_STRING(m_writeStmt, 2, this->getConfigTag());
170  SET_INT(m_writeStmt, 3, this->getDaccal());
171  SET_INT(m_writeStmt, 4, this->getDelay());
172  SET_STRING(m_writeStmt, 5, this->getGain());
173  SET_STRING(m_writeStmt, 6, this->getMemGain());
174  SET_INT(m_writeStmt, 7, this->getOffsetHigh());
175  SET_INT(m_writeStmt, 8, this->getOffsetLow());
176  SET_INT(m_writeStmt, 9, this->getOffsetMid());
177  SET_STRING(m_writeStmt, 10, this->getTrgMode());
178  SET_STRING(m_writeStmt, 11, this->getTrgFilter());
179  SET_INT(m_writeStmt, 12, this->getClock());
180  SET_STRING(m_writeStmt, 13, this->getBGOSource());
181  SET_INT(m_writeStmt, 14, this->getTTSMask());
182  SET_INT(m_writeStmt, 15, this->getDAQBCIDPreset());
183  SET_INT(m_writeStmt, 16, this->getTrgBCIDPreset());
184  SET_INT(m_writeStmt, 17, this->getBC0Counter());
185  SET_INT(m_writeStmt, 18, this->getBC0Delay());
186  SET_INT(m_writeStmt, 19, this->getTEDelay());
187 
188  m_writeStmt->executeUpdate();
189 
190  } catch (SQLException& e) {
191  throw(std::runtime_error(std::string("ODCCSConfig::writeDB(): ") + e.getMessage()));
192  }
193  // Now get the ID
194  if (!this->fetchID()) {
195  throw(std::runtime_error("ODCCSConfig::writeDB: Failed to write"));
196  }
197 }
int getBC0Counter() const
Definition: ODCCSConfig.h:59
int getOffsetMid() const
Definition: ODCCSConfig.h:40
Statement * m_writeStmt
Definition: IODConfig.h:33
int getClock() const
Definition: ODCCSConfig.h:49
int getTEDelay() const
Definition: ODCCSConfig.h:62
void checkConnection() const noexcept(false)
Definition: IDBObject.h:36
int fetchID() noexcept(false)
Definition: ODCCSConfig.cc:243
int getOffsetLow() const
Definition: ODCCSConfig.h:37
int getDelay() const
Definition: ODCCSConfig.h:25
std::string getTrgFilter() const
Definition: ODCCSConfig.h:46
#define SET_STRING(statement, paramNum, paramVal)
Definition: ODCCSConfig.cc:19
int getTTSMask() const
Definition: ODCCSConfig.h:53
int getTrgBCIDPreset() const
Definition: ODCCSConfig.h:57
int getOffsetHigh() const
Definition: ODCCSConfig.h:34
std::string getGain() const
Definition: ODCCSConfig.h:28
std::string getBGOSource() const
Definition: ODCCSConfig.h:51
std::string getTrgMode() const
Definition: ODCCSConfig.h:43
int getBC0Delay() const
Definition: ODCCSConfig.h:60
oracle::occi::SQLException SQLException
Definition: IODConfig.h:20
int getDaccal() const
Definition: ODCCSConfig.h:22
std::string getMemGain() const
Definition: ODCCSConfig.h:31
std::string getConfigTag()
Definition: IODConfig.h:30
#define SET_INT(statement, paramNum, paramVal)
Definition: ODCCSConfig.cc:13
void checkPrepare() noexcept(false)
Definition: IODConfig.h:36
int getDAQBCIDPreset() const
Definition: ODCCSConfig.h:55

Friends And Related Function Documentation

◆ EcalCondDBInterface

friend class EcalCondDBInterface
friend

Definition at line 11 of file ODCCSConfig.h.

Member Data Documentation

◆ m_bc0

int ODCCSConfig::m_bc0
private

Definition at line 97 of file ODCCSConfig.h.

Referenced by getBC0Counter(), and setBC0Counter().

◆ m_bc0_delay

int ODCCSConfig::m_bc0_delay
private

Definition at line 98 of file ODCCSConfig.h.

Referenced by getBC0Delay(), and setBC0Delay().

◆ m_bgo

std::string ODCCSConfig::m_bgo
private

Definition at line 93 of file ODCCSConfig.h.

Referenced by getBGOSource(), and setBGOSource().

◆ m_clock

int ODCCSConfig::m_clock
private

Definition at line 92 of file ODCCSConfig.h.

Referenced by getClock(), and setClock().

◆ m_daccal

int ODCCSConfig::m_daccal
private

Definition at line 81 of file ODCCSConfig.h.

Referenced by getDaccal(), and setDaccal().

◆ m_daq

int ODCCSConfig::m_daq
private

Definition at line 95 of file ODCCSConfig.h.

Referenced by getDAQBCIDPreset(), and setDAQBCIDPreset().

◆ m_delay

int ODCCSConfig::m_delay
private

Definition at line 82 of file ODCCSConfig.h.

Referenced by getDelay(), and setDelay().

◆ m_gain

std::string ODCCSConfig::m_gain
private

Definition at line 83 of file ODCCSConfig.h.

Referenced by getGain(), and setGain().

◆ m_ID

int ODCCSConfig::m_ID
private

Definition at line 80 of file ODCCSConfig.h.

Referenced by getId(), and setId().

◆ m_memgain

std::string ODCCSConfig::m_memgain
private

Definition at line 84 of file ODCCSConfig.h.

Referenced by getMemGain(), and setMemGain().

◆ m_offset_high

int ODCCSConfig::m_offset_high
private

Definition at line 85 of file ODCCSConfig.h.

Referenced by getOffsetHigh(), and setOffsetHigh().

◆ m_offset_low

int ODCCSConfig::m_offset_low
private

Definition at line 86 of file ODCCSConfig.h.

Referenced by getOffsetLow(), and setOffsetLow().

◆ m_offset_mid

int ODCCSConfig::m_offset_mid
private

Definition at line 87 of file ODCCSConfig.h.

Referenced by getOffsetMid(), and setOffsetMid().

◆ m_pedestal_offset_release

std::string ODCCSConfig::m_pedestal_offset_release
private

Definition at line 88 of file ODCCSConfig.h.

◆ m_system

std::string ODCCSConfig::m_system
private

Definition at line 89 of file ODCCSConfig.h.

◆ m_te_delay

int ODCCSConfig::m_te_delay
private

Definition at line 99 of file ODCCSConfig.h.

Referenced by getTEDelay(), and setTEDelay().

◆ m_trg

int ODCCSConfig::m_trg
private

Definition at line 96 of file ODCCSConfig.h.

Referenced by getTrgBCIDPreset(), and setTrgBCIDPreset().

◆ m_trg_filter

std::string ODCCSConfig::m_trg_filter
private

Definition at line 91 of file ODCCSConfig.h.

Referenced by getTrgFilter(), and setTrgFilter().

◆ m_trg_mode

std::string ODCCSConfig::m_trg_mode
private

Definition at line 90 of file ODCCSConfig.h.

Referenced by getTrgMode(), and setTrgMode().

◆ m_tts_mask

int ODCCSConfig::m_tts_mask
private

Definition at line 94 of file ODCCSConfig.h.

Referenced by getTTSMask(), and setTTSMask().