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)
 
virtual void getParameters (ResultSet *rset)
 
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, const LMFSeqDat &seq)
 
LMFCorrCoefDatComponentsetSequence (const EcalLogicID &id, int seq_id)
 
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 (const EcalLogicID &id) 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 (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)
 
std::map< int, std::vector< float > > fetchData () noexcept(false)
 
std::map< int, std::vector< float > > getData ()
 
std::vector< float > getData (const EcalLogicID &id)
 
float getData (const EcalLogicID &id, const std::string &key)
 
bool getData (const EcalLogicID &id, const std::string &key, float &ret)
 
bool getData (const EcalLogicID &id, std::vector< float > &ret)
 
float getData (const EcalLogicID &id, unsigned int k)
 
bool getData (const EcalLogicID &id, unsigned int k, float &ret)
 
std::vector< float > getData (int id)
 
float getData (int id, const std::string &key)
 
bool getData (int id, const std::string &key, float &ret)
 
bool getData (int id, std::vector< float > &ret)
 
float getData (int id, unsigned int k)
 
bool getData (int id, unsigned int k, 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 (const EcalLogicID &logic_id, const std::string &key, float v)
 
LMFDatsetData (const EcalLogicID &logic_id, const std::vector< float > &data)
 
LMFDatsetData (int logic_id, const std::vector< float > &data)
 
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 std::list< std::unique_ptr< LMFUnique > > fetchAll () 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 (EcalDBConnection *c)
 
 LMFUnique (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
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
 
class LMFUnique
 

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 const int 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 getParameters (ResultSet *rset)
 
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() [1/3]

LMFCorrCoefDatComponent::LMFCorrCoefDatComponent ( )

Definition at line 4 of file LMFCorrCoefDatComponent.cc.

4 : LMFDat() { init(); }

References init().

◆ LMFCorrCoefDatComponent() [2/3]

LMFCorrCoefDatComponent::LMFCorrCoefDatComponent ( EcalDBConnection c)

Definition at line 6 of file LMFCorrCoefDatComponent.cc.

6 : LMFDat(c) { init(); }

References init().

◆ LMFCorrCoefDatComponent() [3/3]

LMFCorrCoefDatComponent::LMFCorrCoefDatComponent ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn 
)

Definition at line 8 of file LMFCorrCoefDatComponent.cc.

9  : LMFDat(env, conn) {
10  init();
11 }

References init().

◆ ~LMFCorrCoefDatComponent()

LMFCorrCoefDatComponent::~LMFCorrCoefDatComponent ( )
inlineoverride

Definition at line 28 of file LMFCorrCoefDatComponent.h.

28 {};

Member Function Documentation

◆ foreignKeyName()

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

Reimplemented from LMFDat.

Definition at line 28 of file LMFCorrCoefDatComponent.cc.

28 { return "lmfLmrSubIOV"; }

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

◆ getFlag()

int LMFCorrCoefDatComponent::getFlag ( const EcalLogicID id)

Definition at line 116 of file LMFCorrCoefDatComponent.cc.

116 { return getData(id, "FLAG"); }

References LMFDat::getData().

◆ getIovIdFieldName()

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

Reimplemented from LMFDat.

Definition at line 32 of file LMFCorrCoefDatComponent.cc.

32 { return "LMR_SUB_IOV_ID"; }

◆ getLMFLmrSubIOV()

LMFLmrSubIOV LMFCorrCoefDatComponent::getLMFLmrSubIOV ( ) const

Definition at line 76 of file LMFCorrCoefDatComponent.cc.

76  {
78  iov.setByID(getInt(foreignKeyName()));
79  return iov;
80 }

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

◆ getLMFLmrSubIOVID()

int LMFCorrCoefDatComponent::getLMFLmrSubIOVID ( ) const

Definition at line 82 of file LMFCorrCoefDatComponent.cc.

82 { return getInt(foreignKeyName()); }

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

◆ getParameterErrors() [1/2]

std::vector< float > LMFCorrCoefDatComponent::getParameterErrors ( const EcalLogicID id)

Definition at line 100 of file LMFCorrCoefDatComponent.cc.

100  {
101  std::vector<float> v;
102  v.push_back(getData(id, "P1E"));
103  v.push_back(getData(id, "P2E"));
104  v.push_back(getData(id, "P3E"));
105  return v;
106 }

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

◆ getParameterErrors() [2/2]

std::vector< float > LMFCorrCoefDatComponent::getParameterErrors ( int  id)

Definition at line 108 of file LMFCorrCoefDatComponent.cc.

108  {
109  std::vector<float> v;
110  v.push_back(getData(id, "P1E"));
111  v.push_back(getData(id, "P2E"));
112  v.push_back(getData(id, "P3E"));
113  return v;
114 }

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

◆ getParameters() [1/3]

std::vector< float > LMFCorrCoefDatComponent::getParameters ( const EcalLogicID id)

Definition at line 84 of file LMFCorrCoefDatComponent.cc.

84  {
85  std::vector<float> v;
86  v.push_back(getData(id, "P1"));
87  v.push_back(getData(id, "P2"));
88  v.push_back(getData(id, "P3"));
89  return v;
90 }

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

◆ getParameters() [2/3]

std::vector< float > LMFCorrCoefDatComponent::getParameters ( int  id)

Definition at line 92 of file LMFCorrCoefDatComponent.cc.

92  {
93  std::vector<float> v;
94  v.push_back(getData(id, "P1"));
95  v.push_back(getData(id, "P2"));
96  v.push_back(getData(id, "P3"));
97  return v;
98 }

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

◆ getParameters() [3/3]

virtual void LMFUnique::getParameters
inline

Definition at line 94 of file LMFUnique.h.

94 {}

◆ getSeqID() [1/2]

int LMFCorrCoefDatComponent::getSeqID ( const EcalLogicID id)

Definition at line 118 of file LMFCorrCoefDatComponent.cc.

118 { return getData(id, "SEQ_ID"); }

References LMFDat::getData().

◆ getSeqID() [2/2]

int LMFCorrCoefDatComponent::getSeqID ( int  id)

Definition at line 120 of file LMFCorrCoefDatComponent.cc.

120 { return getData(id, "SEQ_ID"); }

References LMFDat::getData().

◆ getSequence()

LMFSeqDat LMFCorrCoefDatComponent::getSequence ( const EcalLogicID id)

Definition at line 122 of file LMFCorrCoefDatComponent.cc.

122  {
123  int seq_id = getData(id, "SEQ_ID");
125  seq.setByID(seq_id);
126  return seq;
127 }

References LMFDat::getData(), IDBObject::m_conn, IDBObject::m_env, and cmsswSequenceInfo::seq.

◆ getTableName()

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

Reimplemented from LMFDat.

Definition at line 30 of file LMFCorrCoefDatComponent.cc.

30 { return "LMF_CORR_COEF_DAT"; }

◆ init()

void LMFCorrCoefDatComponent::init ( void  )
private

Definition at line 13 of file LMFCorrCoefDatComponent.cc.

13  {
14  m_className = "LMFCorrCoefDatComponent";
15  m_keys["P1"] = 0;
16  m_keys["P2"] = 1;
17  m_keys["P3"] = 2;
18  m_keys["P1E"] = 3;
19  m_keys["P2E"] = 4;
20  m_keys["P3E"] = 5;
21  m_keys["FLAG"] = 6;
22  m_keys["SEQ_ID"] = 7;
23  for (unsigned int i = 0; i < m_keys.size(); i++) {
24  m_type.push_back("NUMBER");
25  }
26 }

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

Referenced by LMFCorrCoefDatComponent().

◆ setFlag()

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setFlag ( const EcalLogicID id,
int  flag 
)

Definition at line 61 of file LMFCorrCoefDatComponent.cc.

61  {
62  LMFDat::setData(id, "FLAG", flag);
63  return *this;
64 }

References RemoveAddSevLevel::flag, and LMFDat::setData().

Referenced by LMFCorrCoefDat::setFlag().

◆ setLMFLmrSubIOV()

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setLMFLmrSubIOV ( const LMFLmrSubIOV iov)

Definition at line 34 of file LMFCorrCoefDatComponent.cc.

34  {
35  setInt(foreignKeyName(), iov.getID());
36  attach(foreignKeyName(), (LMFUnique *)&iov);
37  return *this;
38 }

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

◆ setP123() [1/2]

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setP123 ( const EcalLogicID id,
float  p1,
float  p2,
float  p3 
)

Definition at line 40 of file LMFCorrCoefDatComponent.cc.

40  {
41  LMFDat::setData(id, "P1", p1);
42  LMFDat::setData(id, "P2", p2);
43  LMFDat::setData(id, "P3", p3);
44  return *this;
45 }

References p1, p2, p3, and LMFDat::setData().

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

◆ setP123() [2/2]

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setP123 ( const EcalLogicID id,
float  p1,
float  p2,
float  p3,
float  p1e,
float  p2e,
float  p3e 
)

Definition at line 47 of file LMFCorrCoefDatComponent.cc.

48  {
49  setP123(id, p1, p2, p3);
50  setP123Errors(id, p1e, p2e, p3e);
51  return *this;
52 }

References p1, p2, p3, setP123(), and setP123Errors().

◆ setP123Errors()

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setP123Errors ( const EcalLogicID id,
float  p1e,
float  p2e,
float  p3e 
)

Definition at line 54 of file LMFCorrCoefDatComponent.cc.

54  {
55  LMFDat::setData(id, "P1E", p1e);
56  LMFDat::setData(id, "P2E", p2e);
57  LMFDat::setData(id, "P3E", p3e);
58  return *this;
59 }

References LMFDat::setData().

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

◆ setSequence() [1/2]

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setSequence ( const EcalLogicID id,
const LMFSeqDat seq 
)

Definition at line 71 of file LMFCorrCoefDatComponent.cc.

71  {
72  LMFDat::setData(id, "SEQ_ID", seq.getID());
73  return *this;
74 }

References cmsswSequenceInfo::seq, and LMFDat::setData().

◆ setSequence() [2/2]

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setSequence ( const EcalLogicID id,
int  seq_id 
)

Definition at line 66 of file LMFCorrCoefDatComponent.cc.

66  {
67  LMFDat::setData(id, "SEQ_ID", seq_id);
68  return *this;
69 }

References LMFDat::setData().

Referenced by LMFCorrCoefDat::setSequence().

◆ writeDB()

int LMFCorrCoefDatComponent::writeDB ( )
overridevirtualnoexcept

Reimplemented from LMFUnique.

Definition at line 129 of file LMFCorrCoefDatComponent.cc.

129  {
130  int ret = 0;
131  try {
132  ret = LMFDat::writeDB();
133  } catch (std::runtime_error &e) {
134  m_conn->rollback();
135  throw(e);
136  }
137  return ret;
138 }

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

Friends And Related Function Documentation

◆ EcalCondDBInterface

friend class EcalCondDBInterface
friend

Definition at line 23 of file LMFCorrCoefDatComponent.h.

◆ LMFUnique

friend class LMFUnique
friend

Definition at line 40 of file LMFCorrCoefDatComponent.h.

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:542
LMFDat::getData
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559
mps_fire.i
i
Definition: mps_fire.py:428
cmsswSequenceInfo.seq
seq
Definition: cmsswSequenceInfo.py:539
LMFCorrCoefDatComponent::setP123Errors
LMFCorrCoefDatComponent & setP123Errors(const EcalLogicID &id, float p1e, float p2e, float p3e)
Definition: LMFCorrCoefDatComponent.cc:54
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
LMFUnique::m_className
std::string m_className
Definition: LMFUnique.h:99
LMFUnique::setInt
LMFUnique & setInt(std::string key, int value)
Definition: LMFUnique.cc:31
findQualityFiles.v
v
Definition: findQualityFiles.py:179
LMFUnique::getInt
int getInt(std::string fieldname) const
Definition: LMFUnique.cc:187
LMFCorrCoefDatComponent::init
void init()
Definition: LMFCorrCoefDatComponent.cc:13
IDBObject::m_conn
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
LMFLmrSubIOV
Definition: LMFLmrSubIOV.h:13
LMFDat::writeDB
int writeDB() noexcept(false) override
Definition: LMFDat.cc:337
p2
double p2[4]
Definition: TauolaWrapper.h:90
LMFDat::setData
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49
web.browse_db.env
env
Definition: browse_db.py:18
LMFCorrCoefDatComponent::setP123
LMFCorrCoefDatComponent & setP123(const EcalLogicID &id, float p1, float p2, float p3)
Definition: LMFCorrCoefDatComponent.cc:40
LMFDat::m_keys
std::map< std::string, unsigned int > m_keys
Definition: LMFDat.h:145
LMFUnique::attach
void attach(std::string name, LMFUnique *u)
Definition: LMFUnique.cc:48
p1
double p1[4]
Definition: TauolaWrapper.h:89
LMFSeqDat
Definition: LMFSeqDat.h:14
LMFUnique::getID
int getID() const
Definition: LMFUnique.h:58
p3
double p3[4]
Definition: TauolaWrapper.h:91
IDBObject::m_env
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
LMFDat::LMFDat
LMFDat()
Definition: LMFDat.cc:9
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
LMFUnique
Definition: LMFUnique.h:21
LMFCorrCoefDatComponent::foreignKeyName
std::string foreignKeyName() const override
Definition: LMFCorrCoefDatComponent.cc:28
LMFDat::m_type
std::vector< std::string > m_type
Definition: LMFDat.h:140
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37