#include <FEConfigFgrEEStripDat.h>
Public Member Functions | |
FEConfigFgrEEStripDat () | |
unsigned int | getLutFg () const |
unsigned int | getLUTFgr () const |
unsigned int | getLutFgr () const |
std::string | getTable () |
unsigned int | getThreshold () const |
void | setLutFg (unsigned int mean) |
void | setLutFgr (unsigned int mean) |
void | setLUTFgr (unsigned int mean) |
void | setThreshold (unsigned int mean) |
~FEConfigFgrEEStripDat () | |
Private Member Functions | |
void | fetchData (std::map< EcalLogicID, FEConfigFgrEEStripDat > *fillMap, FEConfigFgrInfo *iconf) throw (std::runtime_error) |
void | prepareWrite () throw (std::runtime_error) |
void | writeArrayDB (const std::map< EcalLogicID, FEConfigFgrEEStripDat > *data, FEConfigFgrInfo *iconf) throw (std::runtime_error) |
void | writeDB (const EcalLogicID *ecid, const FEConfigFgrEEStripDat *item, FEConfigFgrInfo *iconf) throw (std::runtime_error) |
Private Attributes | |
unsigned int | m_lut_fg |
unsigned int | m_thresh |
Friends | |
class | EcalCondDBInterface |
Definition at line 11 of file FEConfigFgrEEStripDat.h.
FEConfigFgrEEStripDat::FEConfigFgrEEStripDat | ( | ) |
Definition at line 11 of file FEConfigFgrEEStripDat.cc.
References NULL.
{ m_env = NULL; m_conn = NULL; m_writeStmt = NULL; m_readStmt = NULL; m_thresh = 0; m_lut_fg = 0; }
FEConfigFgrEEStripDat::~FEConfigFgrEEStripDat | ( | ) |
Definition at line 25 of file FEConfigFgrEEStripDat.cc.
{ }
void FEConfigFgrEEStripDat::fetchData | ( | std::map< EcalLogicID, FEConfigFgrEEStripDat > * | fillMap, |
FEConfigFgrInfo * | iconf | ||
) | throw (std::runtime_error) [private] |
unsigned int FEConfigFgrEEStripDat::getLutFg | ( | ) | const [inline] |
Definition at line 23 of file FEConfigFgrEEStripDat.h.
References m_lut_fg.
Referenced by writeArrayDB().
{ return m_lut_fg; }
unsigned int FEConfigFgrEEStripDat::getLutFgr | ( | ) | const [inline] |
unsigned int FEConfigFgrEEStripDat::getLUTFgr | ( | ) | const [inline] |
Definition at line 25 of file FEConfigFgrEEStripDat.h.
References m_lut_fg.
Referenced by popcon::EcalTPGFineGrainStripEEHandler::getNewObjects().
{ return m_lut_fg; }
std::string FEConfigFgrEEStripDat::getTable | ( | ) | [inline, virtual] |
Implements IDataItem.
Definition at line 18 of file FEConfigFgrEEStripDat.h.
{ return "FE_CONFIG_FGREEST_DAT"; }
unsigned int FEConfigFgrEEStripDat::getThreshold | ( | ) | const [inline] |
Definition at line 21 of file FEConfigFgrEEStripDat.h.
References m_thresh.
Referenced by popcon::EcalTPGFineGrainStripEEHandler::getNewObjects(), and writeArrayDB().
{ return m_thresh; }
void FEConfigFgrEEStripDat::prepareWrite | ( | ) | throw (std::runtime_error) [private, virtual] |
Implements IDataItem.
Definition at line 31 of file FEConfigFgrEEStripDat.cc.
References alignCSCRings::e.
{ this->checkConnection(); try { m_writeStmt = m_conn->createStatement(); m_writeStmt->setSQL("INSERT INTO "+getTable()+" (fgr_conf_id, logic_id, " "threshold, lut_fg ) " "VALUES (:fgr_conf_id, :logic_id, " ":threshold, :lut_fg )" ); } catch (SQLException &e) { throw(std::runtime_error("FEConfigFgrEEStripDat::prepareWrite(): "+e.getMessage())); } }
void FEConfigFgrEEStripDat::setLutFg | ( | unsigned int | mean | ) | [inline] |
Definition at line 22 of file FEConfigFgrEEStripDat.h.
References m_lut_fg, and timingPdfMaker::mean.
void FEConfigFgrEEStripDat::setLutFgr | ( | unsigned int | mean | ) | [inline] |
Definition at line 26 of file FEConfigFgrEEStripDat.h.
References m_lut_fg, and timingPdfMaker::mean.
Referenced by EcalTPGParamBuilder::analyze().
void FEConfigFgrEEStripDat::setLUTFgr | ( | unsigned int | mean | ) | [inline] |
Definition at line 24 of file FEConfigFgrEEStripDat.h.
References m_lut_fg, and timingPdfMaker::mean.
void FEConfigFgrEEStripDat::setThreshold | ( | unsigned int | mean | ) | [inline] |
Definition at line 20 of file FEConfigFgrEEStripDat.h.
References m_thresh, and timingPdfMaker::mean.
Referenced by EcalTPGParamBuilder::analyze().
void FEConfigFgrEEStripDat::writeArrayDB | ( | const std::map< EcalLogicID, FEConfigFgrEEStripDat > * | data, |
FEConfigFgrInfo * | iconf | ||
) | throw (std::runtime_error) [private] |
Definition at line 119 of file FEConfigFgrEEStripDat.cc.
References prof2calltree::count, data, EcalLogicID::getLogicID(), getLutFg(), getThreshold(), AlCaHLTBitMon_ParallelJobs::p, x, and detailsBasic3DVector::y.
{ this->checkConnection(); this->checkPrepare(); int iconfID = iconf->fetchID(); if (!iconfID) { throw(std::runtime_error("FEConfigFgrEEStripDat::writeArrayDB: ICONF not in DB")); } int nrows=data->size(); int* ids= new int[nrows]; int* iconfid_vec= new int[nrows]; unsigned int* xx= new unsigned int[nrows]; unsigned int* yy= new unsigned int[nrows]; ub2* ids_len= new ub2[nrows]; ub2* iconf_len= new ub2[nrows]; ub2* x_len= new ub2[nrows]; ub2* y_len= new ub2[nrows]; const EcalLogicID* channel; const FEConfigFgrEEStripDat* dataitem; int count=0; typedef map< EcalLogicID, FEConfigFgrEEStripDat >::const_iterator CI; for (CI p = data->begin(); p != data->end(); ++p) { channel = &(p->first); int logicID = channel->getLogicID(); if (!logicID) { throw(std::runtime_error("FEConfigFgrEEStripDat::writeArrayDB: Bad EcalLogicID")); } ids[count]=logicID; iconfid_vec[count]=iconfID; dataitem = &(p->second); // dataIface.writeDB( channel, dataitem, iconf); unsigned int x=dataitem->getThreshold(); unsigned int y=dataitem->getLutFg(); xx[count]=x; yy[count]=y; ids_len[count]=sizeof(ids[count]); iconf_len[count]=sizeof(iconfid_vec[count]); x_len[count]=sizeof(xx[count]); y_len[count]=sizeof(yy[count]); count++; } try { m_writeStmt->setDataBuffer(1, (dvoid*)iconfid_vec, OCCIINT, sizeof(iconfid_vec[0]),iconf_len); m_writeStmt->setDataBuffer(2, (dvoid*)ids, OCCIINT, sizeof(ids[0]), ids_len ); m_writeStmt->setDataBuffer(3, (dvoid*)xx, OCCIUNSIGNED_INT , sizeof(xx[0]), x_len ); m_writeStmt->setDataBuffer(4, (dvoid*)yy, OCCIUNSIGNED_INT , sizeof(yy[0]), y_len ); m_writeStmt->executeArrayUpdate(nrows); delete [] ids; delete [] iconfid_vec; delete [] xx; delete [] yy; delete [] ids_len; delete [] iconf_len; delete [] x_len; delete [] y_len; } catch (SQLException &e) { throw(std::runtime_error("FEConfigFgrEEStripDat::writeArrayDB(): "+e.getMessage())); } }
void FEConfigFgrEEStripDat::writeDB | ( | const EcalLogicID * | ecid, |
const FEConfigFgrEEStripDat * | item, | ||
FEConfigFgrInfo * | iconf | ||
) | throw (std::runtime_error) [private] |
Definition at line 49 of file FEConfigFgrEEStripDat.cc.
References alignCSCRings::e.
{ this->checkConnection(); this->checkPrepare(); int iconfID = iconf->fetchID(); if (!iconfID) { throw(std::runtime_error("FEConfigFgrEEStripDat::writeDB: ICONF not in DB")); } int logicID = ecid->getLogicID(); if (!logicID) { throw(std::runtime_error("FEConfigFgrEEStripDat::writeDB: Bad EcalLogicID")); } try { m_writeStmt->setInt(1, iconfID); m_writeStmt->setInt(2, logicID); m_writeStmt->setUInt(3, item->getThreshold()); m_writeStmt->setUInt(4, item->getLutFg()); m_writeStmt->executeUpdate(); } catch (SQLException &e) { throw(std::runtime_error("FEConfigFgrEEStripDat::writeDB(): "+e.getMessage())); } }
friend class EcalCondDBInterface [friend] |
Reimplemented from IDBObject.
Definition at line 13 of file FEConfigFgrEEStripDat.h.
unsigned int FEConfigFgrEEStripDat::m_lut_fg [private] |
Definition at line 46 of file FEConfigFgrEEStripDat.h.
Referenced by getLutFg(), getLUTFgr(), getLutFgr(), setLutFg(), setLUTFgr(), and setLutFgr().
unsigned int FEConfigFgrEEStripDat::m_thresh [private] |
Definition at line 45 of file FEConfigFgrEEStripDat.h.
Referenced by getThreshold(), and setThreshold().