CMS 3D CMS Logo

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

#include <LMFCorrCoefDatComponent.h>

Inheritance diagram for LMFCorrCoefDatComponent:
LMFDat LMFUnique IUniqueDBObject IDBObject

Public Member Functions

std::string foreignKeyName () const override
 
int getFlag (const EcalLogicID &id)
 
std::string getIovIdFieldName () const override
 
LMFLmrSubIOV getLMFLmrSubIOV () const
 
int getLMFLmrSubIOVID () const
 
std::vector< float > getParameterErrors (const EcalLogicID &id)
 
std::vector< float > getParameterErrors (int id)
 
std::vector< float > getParameters (const EcalLogicID &id)
 
std::vector< float > getParameters (int id)
 
int getSeqID (const EcalLogicID &id)
 
int getSeqID (int id)
 
LMFSeqDat getSequence (const EcalLogicID &id)
 
std::string getTableName () const override
 
 LMFCorrCoefDatComponent ()
 
 LMFCorrCoefDatComponent (EcalDBConnection *c)
 
 LMFCorrCoefDatComponent (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
LMFCorrCoefDatComponentsetFlag (const EcalLogicID &id, int flag)
 
LMFCorrCoefDatComponentsetLMFLmrSubIOV (const LMFLmrSubIOV &iov)
 
LMFCorrCoefDatComponentsetP123 (const EcalLogicID &id, float p1, float p2, float p3)
 
LMFCorrCoefDatComponentsetP123 (const EcalLogicID &id, float p1, float p2, float p3, float p1e, float p2e, float p3e)
 
LMFCorrCoefDatComponentsetP123Errors (const EcalLogicID &id, float p1e, float p2e, float p3e)
 
LMFCorrCoefDatComponentsetSequence (const EcalLogicID &id, int seq_id)
 
LMFCorrCoefDatComponentsetSequence (const EcalLogicID &id, const LMFSeqDat &seq)
 
int writeDB () noexcept(false) override
 
 ~LMFCorrCoefDatComponent () override
 
- Public Member Functions inherited from LMFDat
void dump () const override
 
void dump (int n) const override
 
virtual void dump (int n, int max) const
 
void fetch () noexcept(false)
 
void fetch (int logic_id) noexcept(false)
 
void fetch (int logic_id, const Tm &tm) noexcept(false)
 
void fetch (int logic_id, const Tm *timestamp, int dir) noexcept(false)
 
void fetch (const EcalLogicID &id, const Tm &tm) noexcept(false)
 
void fetch (const EcalLogicID &id, const Tm &tm, int dir) noexcept(false)
 
void fetch (const EcalLogicID &id) noexcept(false)
 
std::map< int, std::vector< float > > fetchData () noexcept(false)
 
std::vector< float > getData (int id)
 
std::vector< float > getData (const EcalLogicID &id)
 
bool getData (int id, std::vector< float > &ret)
 
bool getData (const EcalLogicID &id, std::vector< float > &ret)
 
std::map< int, std::vector< float > > getData ()
 
float getData (int id, unsigned int k)
 
float getData (const EcalLogicID &id, unsigned int k)
 
float getData (const EcalLogicID &id, const std::string &key)
 
float getData (int id, const std::string &key)
 
bool getData (int id, unsigned int k, float &ret)
 
bool getData (const EcalLogicID &id, unsigned int k, float &ret)
 
bool getData (int id, const std::string &key, float &ret)
 
bool getData (const EcalLogicID &id, const std::string &key, float &ret)
 
std::list< std::string > getKeyList ()
 
std::map< std::string, unsigned int > getKeys ()
 
LMFRunIOV getLMFRunIOV () const
 
int getLMFRunIOVID ()
 
std::list< int > getLogicIds ()
 
void getNext (LMFDat *dat) noexcept(false)
 
void getPrevious (LMFDat *dat) noexcept(false)
 
std::map< unsigned int, std::string > getReverseMap () const
 
Tm getSubrunStart () const
 
bool isValid () override
 
 LMFDat ()
 
 LMFDat (EcalDBConnection *c)
 
 LMFDat (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
std::vector< float > operator[] (int id)
 
LMFDatsetData (int logic_id, const std::vector< float > &data)
 
LMFDatsetData (const EcalLogicID &logic_id, const std::vector< float > &data)
 
LMFDatsetData (const EcalLogicID &logic_id, const std::string &key, float v)
 
LMFDatsetLMFRunIOV (const LMFRunIOV &iov)
 
LMFDatsetMaxDataToDump (int n)
 
void setWhereClause (std::string w)
 
void setWhereClause (std::string w, const std::vector< std::string > &p)
 
int size () const
 
 ~LMFDat () override
 
- Public Member Functions inherited from LMFUnique
void attach (std::string name, LMFUnique *u)
 
void debug ()
 
virtual bool exists ()
 
virtual boost::ptr_list< LMFUniquefetchAll () const noexcept(false)
 
int fetchID () noexcept(false) override
 
std::string getClassName ()
 
std::string getClassName () const
 
int getID () const
 
int getInt (std::string fieldname) const
 
std::string getString (std::string fieldname) const
 
virtual bool isValid () const
 
 LMFUnique ()
 
 LMFUnique (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
 LMFUnique (EcalDBConnection *c)
 
void nodebug ()
 
virtual bool operator< (const LMFUnique &r)
 
virtual bool operator<= (const LMFUnique &r)
 
std::string sequencePostfix (const Tm &t)
 
void setByID (int id) noexcept(false) override
 
LMFUniquesetInt (std::string key, int value)
 
LMFUniquesetString (std::string key, std::string value)
 
void startProfiling ()
 
void stopProfiling ()
 
 ~LMFUnique () override
 
- 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 init ()
 

Friends

class EcalCondDBInterface
 

Additional Inherited Members

- Public Types inherited from LMFUnique
typedef oracle::occi::ResultSet ResultSet
 
typedef oracle::occi::Statement Statement
 
- Static Public Attributes inherited from IDBObject
static int const ECALDB_NROWS =1024
 
- Protected Member Functions inherited from LMFDat
void adjustParameters (int n, std::string &sql, Statement *stmt)
 
std::string buildInsertSql ()
 
std::string buildSelectSql (int logic_id=0, int direction=0)
 
bool check ()
 
void getKeyTypes () noexcept(false)
 
void getNeighbour (LMFDat *dat, int which) noexcept(false)
 
int writeDB () noexcept(false) override
 
- Protected Member Functions inherited from LMFUnique
virtual void setClassName (std::string s)
 
virtual int writeForeignKeys () noexcept(false)
 
- Protected Member Functions inherited from IDBObject
void checkConnection () const noexcept(false)
 
- Protected Attributes inherited from LMFDat
std::string _where
 
std::vector< std::string > _wherePars
 
std::map< int, std::vector< float > > m_data
 
std::string m_Error
 
std::map< std::string, unsigned int > m_keys
 
int m_max
 
std::string m_tableName
 
std::vector< std::string > m_type
 
- Protected Attributes inherited from LMFUnique
bool _profiling
 
std::string m_className
 
char m_debug
 
std::map< std::string, LMFUnique * > m_foreignKeys
 
std::map< std::string, int > m_intFields
 
std::map< std::string, std::string > m_stringFields
 
- Protected Attributes inherited from IUniqueDBObject
int m_ID
 
- Protected Attributes inherited from IDBObject
oracle::occi::Connection * m_conn
 
oracle::occi::Environment * m_env
 

Detailed Description

Definition at line 21 of file LMFCorrCoefDatComponent.h.

Constructor & Destructor Documentation

LMFCorrCoefDatComponent::LMFCorrCoefDatComponent ( )

Definition at line 4 of file LMFCorrCoefDatComponent.cc.

References init().

4  : LMFDat() {
5  init();
6 }
LMFDat()
Definition: LMFDat.cc:9
LMFCorrCoefDatComponent::LMFCorrCoefDatComponent ( EcalDBConnection c)

Definition at line 8 of file LMFCorrCoefDatComponent.cc.

References init().

8  : LMFDat(c) {
9  init();
10 }
LMFDat()
Definition: LMFDat.cc:9
LMFCorrCoefDatComponent::LMFCorrCoefDatComponent ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn 
)

Definition at line 12 of file LMFCorrCoefDatComponent.cc.

References init().

13  :
14  LMFDat(env, conn) {
15  init();
16 }
LMFDat()
Definition: LMFDat.cc:9
LMFCorrCoefDatComponent::~LMFCorrCoefDatComponent ( )
inlineoverride

Member Function Documentation

std::string LMFCorrCoefDatComponent::foreignKeyName ( ) const
overridevirtual

Reimplemented from LMFDat.

Definition at line 33 of file LMFCorrCoefDatComponent.cc.

Referenced by getLMFLmrSubIOV(), getLMFLmrSubIOVID(), setLMFLmrSubIOV(), and ~LMFCorrCoefDatComponent().

33  {
34  return "lmfLmrSubIOV";
35 }
int LMFCorrCoefDatComponent::getFlag ( const EcalLogicID id)

Definition at line 134 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData().

Referenced by ~LMFCorrCoefDatComponent().

134  {
135  return getData(id, "FLAG");
136 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
std::string LMFCorrCoefDatComponent::getIovIdFieldName ( ) const
overridevirtual

Reimplemented from LMFDat.

Definition at line 41 of file LMFCorrCoefDatComponent.cc.

Referenced by ~LMFCorrCoefDatComponent().

41  {
42  return "LMR_SUB_IOV_ID";
43 }
LMFLmrSubIOV LMFCorrCoefDatComponent::getLMFLmrSubIOV ( ) const

Definition at line 92 of file LMFCorrCoefDatComponent.cc.

References foreignKeyName(), LMFUnique::getInt(), IDBObject::m_conn, IDBObject::m_env, and LMFUnique::setByID().

Referenced by ~LMFCorrCoefDatComponent().

92  {
94  iov.setByID(getInt(foreignKeyName()));
95  return iov;
96 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
int getInt(std::string fieldname) const
Definition: LMFUnique.cc:203
std::string foreignKeyName() const override
int LMFCorrCoefDatComponent::getLMFLmrSubIOVID ( ) const

Definition at line 98 of file LMFCorrCoefDatComponent.cc.

References foreignKeyName(), and LMFUnique::getInt().

Referenced by ~LMFCorrCoefDatComponent().

98  {
99  return getInt(foreignKeyName());
100 }
int getInt(std::string fieldname) const
Definition: LMFUnique.cc:203
std::string foreignKeyName() const override
std::vector< float > LMFCorrCoefDatComponent::getParameterErrors ( const EcalLogicID id)

Definition at line 118 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData(), and findQualityFiles::v.

Referenced by ~LMFCorrCoefDatComponent().

118  {
119  std::vector<float> v;
120  v.push_back(getData(id, "P1E"));
121  v.push_back(getData(id, "P2E"));
122  v.push_back(getData(id, "P3E"));
123  return v;
124 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
std::vector< float > LMFCorrCoefDatComponent::getParameterErrors ( int  id)

Definition at line 126 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData(), and findQualityFiles::v.

126  {
127  std::vector<float> v;
128  v.push_back(getData(id, "P1E"));
129  v.push_back(getData(id, "P2E"));
130  v.push_back(getData(id, "P3E"));
131  return v;
132 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
std::vector< float > LMFCorrCoefDatComponent::getParameters ( const EcalLogicID id)

Definition at line 102 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData(), and findQualityFiles::v.

Referenced by ~LMFCorrCoefDatComponent().

102  {
103  std::vector<float> v;
104  v.push_back(getData(id, "P1"));
105  v.push_back(getData(id, "P2"));
106  v.push_back(getData(id, "P3"));
107  return v;
108 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
std::vector< float > LMFCorrCoefDatComponent::getParameters ( int  id)

Definition at line 110 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData(), and findQualityFiles::v.

110  {
111  std::vector<float> v;
112  v.push_back(getData(id, "P1"));
113  v.push_back(getData(id, "P2"));
114  v.push_back(getData(id, "P3"));
115  return v;
116 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
int LMFCorrCoefDatComponent::getSeqID ( const EcalLogicID id)

Definition at line 138 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData().

Referenced by ~LMFCorrCoefDatComponent().

138  {
139  return getData(id, "SEQ_ID");
140 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
int LMFCorrCoefDatComponent::getSeqID ( int  id)

Definition at line 142 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData().

142  {
143  return getData(id, "SEQ_ID");
144 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
LMFSeqDat LMFCorrCoefDatComponent::getSequence ( const EcalLogicID id)

Definition at line 146 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData(), IDBObject::m_conn, IDBObject::m_env, and LMFUnique::setByID().

Referenced by ~LMFCorrCoefDatComponent().

146  {
147  int seq_id = getData(id, "SEQ_ID");
148  LMFSeqDat seq(m_env, m_conn);
149  seq.setByID(seq_id);
150  return seq;
151 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:38
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
std::string LMFCorrCoefDatComponent::getTableName ( ) const
overridevirtual

Reimplemented from LMFDat.

Definition at line 37 of file LMFCorrCoefDatComponent.cc.

Referenced by ~LMFCorrCoefDatComponent().

37  {
38  return "LMF_CORR_COEF_DAT";
39 }
void LMFCorrCoefDatComponent::init ( void  )
private

Definition at line 18 of file LMFCorrCoefDatComponent.cc.

References mps_fire::i, LMFUnique::m_className, LMFDat::m_keys, and LMFDat::m_type.

Referenced by LMFCorrCoefDatComponent(), and ~LMFCorrCoefDatComponent().

18  {
19  m_className = "LMFCorrCoefDatComponent";
20  m_keys["P1"] = 0;
21  m_keys["P2"] = 1;
22  m_keys["P3"] = 2;
23  m_keys["P1E"] = 3;
24  m_keys["P2E"] = 4;
25  m_keys["P3E"] = 5;
26  m_keys["FLAG"] = 6;
27  m_keys["SEQ_ID"] = 7;
28  for (unsigned int i = 0; i < m_keys.size(); i++) {
29  m_type.push_back("NUMBER");
30  }
31 }
std::string m_className
Definition: LMFUnique.h:98
std::vector< std::string > m_type
Definition: LMFDat.h:149
std::map< std::string, unsigned int > m_keys
Definition: LMFDat.h:154
LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setFlag ( const EcalLogicID id,
int  flag 
)

Definition at line 75 of file LMFCorrCoefDatComponent.cc.

References LMFDat::setData().

Referenced by LMFCorrCoefDat::setFlag(), and ~LMFCorrCoefDatComponent().

75  {
76  LMFDat::setData(id, "FLAG", flag);
77  return *this;
78 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:55
LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setLMFLmrSubIOV ( const LMFLmrSubIOV iov)

Definition at line 45 of file LMFCorrCoefDatComponent.cc.

References LMFUnique::attach(), foreignKeyName(), LMFUnique::getID(), and LMFUnique::setInt().

Referenced by LMFCorrCoefDat::fetch(), LMFCorrCoefDat::find(), and ~LMFCorrCoefDatComponent().

45  {
46  setInt(foreignKeyName(), iov.getID());
47  attach(foreignKeyName(), (LMFUnique*)&iov);
48  return *this;
49 }
LMFUnique & setInt(std::string key, int value)
Definition: LMFUnique.cc:33
int getID() const
Definition: LMFUnique.h:52
std::string foreignKeyName() const override
void attach(std::string name, LMFUnique *u)
Definition: LMFUnique.cc:50
LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setP123 ( const EcalLogicID id,
float  p1,
float  p2,
float  p3 
)

Definition at line 51 of file LMFCorrCoefDatComponent.cc.

References LMFDat::setData().

Referenced by LMFCorrCoefDat::setP123(), setP123(), and ~LMFCorrCoefDatComponent().

52  {
53  LMFDat::setData(id, "P1", p1);
54  LMFDat::setData(id, "P2", p2);
55  LMFDat::setData(id, "P3", p3);
56  return *this;
57 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:55
double p2[4]
Definition: TauolaWrapper.h:90
double p1[4]
Definition: TauolaWrapper.h:89
double p3[4]
Definition: TauolaWrapper.h:91
LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setP123 ( const EcalLogicID id,
float  p1,
float  p2,
float  p3,
float  p1e,
float  p2e,
float  p3e 
)

Definition at line 59 of file LMFCorrCoefDatComponent.cc.

References setP123(), and setP123Errors().

61  {
62  setP123(id, p1, p2, p3);
63  setP123Errors(id, p1e, p2e, p3e);
64  return *this;
65 }
LMFCorrCoefDatComponent & setP123Errors(const EcalLogicID &id, float p1e, float p2e, float p3e)
double p2[4]
Definition: TauolaWrapper.h:90
LMFCorrCoefDatComponent & setP123(const EcalLogicID &id, float p1, float p2, float p3)
double p1[4]
Definition: TauolaWrapper.h:89
double p3[4]
Definition: TauolaWrapper.h:91
LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setP123Errors ( const EcalLogicID id,
float  p1e,
float  p2e,
float  p3e 
)

Definition at line 67 of file LMFCorrCoefDatComponent.cc.

References LMFDat::setData().

Referenced by setP123(), LMFCorrCoefDat::setP123Errors(), and ~LMFCorrCoefDatComponent().

68  {
69  LMFDat::setData(id, "P1E", p1e);
70  LMFDat::setData(id, "P2E", p2e);
71  LMFDat::setData(id, "P3E", p3e);
72  return *this;
73 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:55
LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setSequence ( const EcalLogicID id,
int  seq_id 
)

Definition at line 80 of file LMFCorrCoefDatComponent.cc.

References LMFDat::setData().

Referenced by LMFCorrCoefDat::setSequence(), and ~LMFCorrCoefDatComponent().

81  {
82  LMFDat::setData(id, "SEQ_ID", seq_id);
83  return *this;
84 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:55
LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setSequence ( const EcalLogicID id,
const LMFSeqDat seq 
)

Definition at line 86 of file LMFCorrCoefDatComponent.cc.

References LMFUnique::getID(), and LMFDat::setData().

87  {
88  LMFDat::setData(id, "SEQ_ID", seq.getID());
89  return *this;
90 }
int getID() const
Definition: LMFUnique.h:52
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:55
int LMFCorrCoefDatComponent::writeDB ( )
overridevirtualnoexcept

Reimplemented from LMFUnique.

Definition at line 153 of file LMFCorrCoefDatComponent.cc.

References MillePedeFileConverter_cfg::e, IDBObject::m_conn, and LMFDat::writeDB().

Referenced by ~LMFCorrCoefDatComponent().

154  {
155  int ret = 0;
156  try {
157  ret = LMFDat::writeDB();
158  }
159  catch (std::runtime_error &e) {
160  m_conn->rollback();
161  throw(e);
162  }
163  return ret;
164 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:39
int writeDB() noexcept(false) override
Definition: LMFDat.cc:398

Friends And Related Function Documentation

friend class EcalCondDBInterface
friend

Definition at line 23 of file LMFCorrCoefDatComponent.h.