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)
 
virtual void getParameters (ResultSet *rset)
 
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 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 (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
 
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 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 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.

References init().

◆ LMFCorrCoefDatComponent() [2/3]

LMFCorrCoefDatComponent::LMFCorrCoefDatComponent ( EcalDBConnection c)

◆ LMFCorrCoefDatComponent() [3/3]

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

Definition at line 8 of file LMFCorrCoefDatComponent.cc.

References init().

9  : LMFDat(env, conn) {
10  init();
11 }
LMFDat()
Definition: LMFDat.cc:9
conn
Definition: getInfo.py:9

◆ ~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.

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

28 { return "lmfLmrSubIOV"; }

◆ getFlag()

int LMFCorrCoefDatComponent::getFlag ( const EcalLogicID id)

Definition at line 116 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData().

116 { return getData(id, "FLAG"); }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ 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.

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

76  {
78  iov.setByID(getInt(foreignKeyName()));
79  return iov;
80 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
int getInt(std::string fieldname) const
Definition: LMFUnique.cc:187
std::string foreignKeyName() const override

◆ getLMFLmrSubIOVID()

int LMFCorrCoefDatComponent::getLMFLmrSubIOVID ( ) const

Definition at line 82 of file LMFCorrCoefDatComponent.cc.

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

82 { return getInt(foreignKeyName()); }
int getInt(std::string fieldname) const
Definition: LMFUnique.cc:187
std::string foreignKeyName() const override

◆ getParameterErrors() [1/2]

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

Definition at line 100 of file LMFCorrCoefDatComponent.cc.

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

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 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ getParameterErrors() [2/2]

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

Definition at line 108 of file LMFCorrCoefDatComponent.cc.

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

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 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ getParameters() [1/3]

virtual void LMFUnique::getParameters
inline

Definition at line 94 of file LMFUnique.h.

94 {}

◆ getParameters() [2/3]

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

Definition at line 84 of file LMFCorrCoefDatComponent.cc.

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

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 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ getParameters() [3/3]

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

Definition at line 92 of file LMFCorrCoefDatComponent.cc.

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

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 }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ getSeqID() [1/2]

int LMFCorrCoefDatComponent::getSeqID ( const EcalLogicID id)

Definition at line 118 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData().

118 { return getData(id, "SEQ_ID"); }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ getSeqID() [2/2]

int LMFCorrCoefDatComponent::getSeqID ( int  id)

Definition at line 120 of file LMFCorrCoefDatComponent.cc.

References LMFDat::getData().

120 { return getData(id, "SEQ_ID"); }
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ getSequence()

LMFSeqDat LMFCorrCoefDatComponent::getSequence ( const EcalLogicID id)

Definition at line 122 of file LMFCorrCoefDatComponent.cc.

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

122  {
123  int seq_id = getData(id, "SEQ_ID");
125  seq.setByID(seq_id);
126  return seq;
127 }
oracle::occi::Environment * m_env
Definition: IDBObject.h:33
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:559

◆ 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.

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

Referenced by LMFCorrCoefDatComponent().

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 }
std::string m_className
Definition: LMFUnique.h:99
std::vector< std::string > m_type
Definition: LMFDat.h:140
std::map< std::string, unsigned int > m_keys
Definition: LMFDat.h:145

◆ setFlag()

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

Definition at line 61 of file LMFCorrCoefDatComponent.cc.

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

Referenced by LMFCorrCoefDat::setFlag().

61  {
62  LMFDat::setData(id, "FLAG", flag);
63  return *this;
64 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setLMFLmrSubIOV()

LMFCorrCoefDatComponent & LMFCorrCoefDatComponent::setLMFLmrSubIOV ( const LMFLmrSubIOV iov)

Definition at line 34 of file LMFCorrCoefDatComponent.cc.

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

34  {
35  setInt(foreignKeyName(), iov.getID());
36  attach(foreignKeyName(), (LMFUnique *)&iov);
37  return *this;
38 }
LMFUnique & setInt(std::string key, int value)
Definition: LMFUnique.cc:31
int getID() const
Definition: LMFUnique.h:58
std::string foreignKeyName() const override
void attach(std::string name, LMFUnique *u)
Definition: LMFUnique.cc:48

◆ setP123() [1/2]

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

Definition at line 40 of file LMFCorrCoefDatComponent.cc.

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

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

40  {
41  LMFDat::setData(id, "P1", p1);
42  LMFDat::setData(id, "P2", p2);
43  LMFDat::setData(id, "P3", p3);
44  return *this;
45 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ 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.

References LaserDQM_cfg::p1, SiStripOfflineCRack_cfg::p2, chargedHadronTrackResolutionFilter_cfi::p3, setP123(), and setP123Errors().

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

◆ setP123Errors()

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

Definition at line 54 of file LMFCorrCoefDatComponent.cc.

References LMFDat::setData().

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

54  {
55  LMFDat::setData(id, "P1E", p1e);
56  LMFDat::setData(id, "P2E", p2e);
57  LMFDat::setData(id, "P3E", p3e);
58  return *this;
59 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setSequence() [1/2]

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

Definition at line 66 of file LMFCorrCoefDatComponent.cc.

References LMFDat::setData().

Referenced by LMFCorrCoefDat::setSequence().

66  {
67  LMFDat::setData(id, "SEQ_ID", seq_id);
68  return *this;
69 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setSequence() [2/2]

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

Definition at line 71 of file LMFCorrCoefDatComponent.cc.

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

71  {
72  LMFDat::setData(id, "SEQ_ID", seq.getID());
73  return *this;
74 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ writeDB()

int LMFCorrCoefDatComponent::writeDB ( )
overridevirtualnoexcept

Reimplemented from LMFUnique.

Definition at line 129 of file LMFCorrCoefDatComponent.cc.

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

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 }
oracle::occi::Connection * m_conn
Definition: IDBObject.h:34
ret
prodAgent to be discontinued
int writeDB() noexcept(false) override
Definition: LMFDat.cc:337

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.