CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions
LMFClsDat Class Reference

#include <LMFClsDat.h>

Inheritance diagram for LMFClsDat:
LMFColoredTable LMFDat LMFUnique IUniqueDBObject IDBObject

Public Types

typedef oracle::occi::ResultSet ResultSet
 
typedef oracle::occi::Statement Statement
 
- Public Types inherited from LMFUnique
typedef oracle::occi::ResultSet ResultSet
 
typedef oracle::occi::Statement Statement
 

Public Member Functions

float getENorm (EcalLogicID &id)
 
int getFlag (EcalLogicID &id)
 
float getFlagNorm (EcalLogicID &id)
 
int getLMFRefRunIOVID (EcalLogicID &id)
 
float getMean (EcalLogicID &id)
 
int getNevt (EcalLogicID &id)
 
float getNorm (EcalLogicID &id)
 
float getRMS (EcalLogicID &id)
 
std::string getSystem () const override
 
std::string getTableName () const override
 
bool isValid () override
 
 LMFClsDat ()
 
 LMFClsDat (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
 LMFClsDat (EcalDBConnection *c)
 
 LMFClsDat (std::string color)
 
 LMFClsDat (int color)
 
 LMFClsDat (oracle::occi::Environment *env, oracle::occi::Connection *conn, std::string color)
 
 LMFClsDat (EcalDBConnection *c, std::string color)
 
 LMFClsDat (oracle::occi::Environment *env, oracle::occi::Connection *conn, int color)
 
 LMFClsDat (EcalDBConnection *c, int color)
 
LMFClsDatsetENorm (EcalLogicID &id, float v)
 
LMFClsDatsetFlag (EcalLogicID &id, int v)
 
LMFClsDatsetFlagNorm (EcalLogicID &id, float v)
 
LMFClsDatsetLMFRefRunIOVID (EcalLogicID &id, int v)
 
LMFClsDatsetMean (EcalLogicID &id, float v)
 
LMFClsDatsetNevt (EcalLogicID &id, int v)
 
LMFClsDatsetNorm (EcalLogicID &id, float v)
 
LMFClsDatsetRMS (EcalLogicID &id, float v)
 
LMFClsDatsetSystem (int system) override
 
LMFClsDatsetSystem (std::string system) override
 
 ~LMFClsDat () override
 
- Public Member Functions inherited from LMFColoredTable
std::string getColor () const
 
int getVmax (EcalLogicID &id)
 
int getVmin (EcalLogicID &id)
 
 LMFColoredTable ()
 
 LMFColoredTable (EcalDBConnection *c)
 
 LMFColoredTable (oracle::occi::Environment *env, oracle::occi::Connection *conn)
 
LMFColoredTablesetColor (int color)
 
LMFColoredTablesetColor (std::string color)
 
LMFColoredTablesetVersions (EcalLogicID &id, int vmin, int vmax)
 
LMFColoredTablesetVmax (EcalLogicID &id, int v)
 
LMFColoredTablesetVmin (EcalLogicID &id, int v)
 
int writeDB () noexcept(false) override
 
 ~LMFColoredTable () 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)
 
virtual std::string foreignKeyName () const
 
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)
 
virtual std::string getIovIdFieldName () const
 
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 ()
 

Additional Inherited Members

- 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 LMFColoredTable
int m_color
 
int m_system
 
- 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

LMF_CLS_XXXX_DAT interface ^ | _____ color

Definition at line 18 of file LMFClsDat.h.

Member Typedef Documentation

◆ ResultSet

typedef oracle::occi::ResultSet LMFClsDat::ResultSet

Definition at line 20 of file LMFClsDat.h.

◆ Statement

typedef oracle::occi::Statement LMFClsDat::Statement

Definition at line 21 of file LMFClsDat.h.

Constructor & Destructor Documentation

◆ LMFClsDat() [1/9]

LMFClsDat::LMFClsDat ( )

Definition at line 3 of file LMFClsDat.cc.

References init().

3 : LMFColoredTable() { init(); }
void init()
Definition: LMFClsDat.cc:43

◆ LMFClsDat() [2/9]

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

Definition at line 5 of file LMFClsDat.cc.

References init().

◆ LMFClsDat() [3/9]

LMFClsDat::LMFClsDat ( EcalDBConnection c)

Definition at line 9 of file LMFClsDat.cc.

References init().

◆ LMFClsDat() [4/9]

LMFClsDat::LMFClsDat ( std::string  color)

Definition at line 11 of file LMFClsDat.cc.

References init(), and LMFColoredTable::setColor().

11  : LMFColoredTable() {
12  init();
13  setColor(color);
14 }
void init()
Definition: LMFClsDat.cc:43
LMFColoredTable & setColor(int color)

◆ LMFClsDat() [5/9]

LMFClsDat::LMFClsDat ( int  color)

Definition at line 16 of file LMFClsDat.cc.

References init(), and LMFColoredTable::setColor().

16  : LMFColoredTable() {
17  init();
18  setColor(color);
19 }
void init()
Definition: LMFClsDat.cc:43
LMFColoredTable & setColor(int color)

◆ LMFClsDat() [6/9]

LMFClsDat::LMFClsDat ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn,
std::string  color 
)

Definition at line 21 of file LMFClsDat.cc.

References init(), and LMFColoredTable::setColor().

23  init();
24  setColor(color);
25 }
void init()
Definition: LMFClsDat.cc:43
LMFColoredTable & setColor(int color)

◆ LMFClsDat() [7/9]

LMFClsDat::LMFClsDat ( EcalDBConnection c,
std::string  color 
)

Definition at line 33 of file LMFClsDat.cc.

References init(), and LMFColoredTable::setColor().

33  : LMFColoredTable(c) {
34  init();
35  setColor(color);
36 }
void init()
Definition: LMFClsDat.cc:43
LMFColoredTable & setColor(int color)

◆ LMFClsDat() [8/9]

LMFClsDat::LMFClsDat ( oracle::occi::Environment *  env,
oracle::occi::Connection *  conn,
int  color 
)

Definition at line 27 of file LMFClsDat.cc.

References init(), and LMFColoredTable::setColor().

29  init();
30  setColor(color);
31 }
void init()
Definition: LMFClsDat.cc:43
LMFColoredTable & setColor(int color)

◆ LMFClsDat() [9/9]

LMFClsDat::LMFClsDat ( EcalDBConnection c,
int  color 
)

Definition at line 38 of file LMFClsDat.cc.

References init(), and LMFColoredTable::setColor().

38  : LMFColoredTable(c) {
39  init();
40  setColor(color);
41 }
void init()
Definition: LMFClsDat.cc:43
LMFColoredTable & setColor(int color)

◆ ~LMFClsDat()

LMFClsDat::~LMFClsDat ( )
inlineoverride

Definition at line 32 of file LMFClsDat.h.

32 {}

Member Function Documentation

◆ getENorm()

float LMFClsDat::getENorm ( EcalLogicID id)

Definition at line 117 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getFlag()

int LMFClsDat::getFlag ( EcalLogicID id)

Definition at line 123 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getFlagNorm()

float LMFClsDat::getFlagNorm ( EcalLogicID id)

Definition at line 125 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getLMFRefRunIOVID()

int LMFClsDat::getLMFRefRunIOVID ( EcalLogicID id)

Definition at line 111 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getMean()

float LMFClsDat::getMean ( EcalLogicID id)

Definition at line 113 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getNevt()

int LMFClsDat::getNevt ( EcalLogicID id)

Definition at line 121 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getNorm()

float LMFClsDat::getNorm ( EcalLogicID id)

Definition at line 115 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getRMS()

float LMFClsDat::getRMS ( EcalLogicID id)

Definition at line 119 of file LMFClsDat.cc.

References LMFDat::getData().

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

◆ getSystem()

std::string LMFClsDat::getSystem ( ) const
inlineoverridevirtual

Reimplemented from LMFColoredTable.

Definition at line 57 of file LMFClsDat.h.

57 { return ""; }

◆ getTableName()

std::string LMFClsDat::getTableName ( ) const
inlineoverridevirtual

Implements LMFColoredTable.

Definition at line 34 of file LMFClsDat.h.

References LMFColoredTable::getColor().

34 { return "LMF_CLS_" + getColor() + "_DAT"; }
std::string getColor() const

◆ init()

void LMFClsDat::init ( void  )
private

Definition at line 43 of file LMFClsDat.cc.

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

Referenced by LMFClsDat().

43  {
44  m_className = "LMFClsDat";
45  m_keys["LMF_IOV_ID_REF"] = 0;
46  m_keys["MEAN"] = 1;
47  m_keys["NORM"] = 2;
48  m_keys["RMS"] = 3;
49  m_keys["NEVT"] = 4;
50  m_keys["ENORM"] = 5;
51  m_keys["FLAG"] = 6;
52  m_keys["FLAGNORM"] = 7;
53  m_keys["VMIN"] = 8;
54  m_keys["VMAX"] = 9;
55  for (unsigned int i = 0; i < m_keys.size(); i++) {
56  m_type.push_back("NUMBER");
57  }
58  m_system = 0;
59  m_color = 0;
60 }
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

◆ isValid()

bool LMFClsDat::isValid ( void  )
overridevirtual

Reimplemented from LMFUnique.

Definition at line 62 of file LMFClsDat.cc.

References LMFColoredTable::getColor(), LMFDat::m_Error, and runTheMatrix::ret.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

62  {
63  bool ret = true;
64  if ((getColor() != "BLUE") && (getColor() != "IR")) {
65  m_Error += " Color not properly set [" + getColor() + "]";
66  ret = false;
67  }
68  return ret;
69 }
ret
prodAgent to be discontinued
std::string getColor() const
std::string m_Error
Definition: LMFDat.h:147

◆ setENorm()

LMFClsDat & LMFClsDat::setENorm ( EcalLogicID id,
float  v 
)

Definition at line 86 of file LMFClsDat.cc.

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

86  {
87  LMFDat::setData(id, "ENORM", v);
88  return *this;
89 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setFlag()

LMFClsDat & LMFClsDat::setFlag ( EcalLogicID id,
int  v 
)

Definition at line 101 of file LMFClsDat.cc.

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

101  {
102  LMFDat::setData(id, "FLAG", v);
103  return *this;
104 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setFlagNorm()

LMFClsDat & LMFClsDat::setFlagNorm ( EcalLogicID id,
float  v 
)

Definition at line 106 of file LMFClsDat.cc.

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

106  {
107  LMFDat::setData(id, "FLAGNORM", v);
108  return *this;
109 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setLMFRefRunIOVID()

LMFClsDat & LMFClsDat::setLMFRefRunIOVID ( EcalLogicID id,
int  v 
)

Definition at line 71 of file LMFClsDat.cc.

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

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

◆ setMean()

LMFClsDat & LMFClsDat::setMean ( EcalLogicID id,
float  v 
)

Definition at line 76 of file LMFClsDat.cc.

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

76  {
77  LMFDat::setData(id, "MEAN", v);
78  return *this;
79 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setNevt()

LMFClsDat & LMFClsDat::setNevt ( EcalLogicID id,
int  v 
)

Definition at line 96 of file LMFClsDat.cc.

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

96  {
97  LMFDat::setData(id, "NEVT", v);
98  return *this;
99 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setNorm()

LMFClsDat & LMFClsDat::setNorm ( EcalLogicID id,
float  v 
)

Definition at line 81 of file LMFClsDat.cc.

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

81  {
82  LMFDat::setData(id, "NORM", v);
83  return *this;
84 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setRMS()

LMFClsDat & LMFClsDat::setRMS ( EcalLogicID id,
float  v 
)

Definition at line 91 of file LMFClsDat.cc.

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

91  {
92  LMFDat::setData(id, "RMS", v);
93  return *this;
94 }
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:49

◆ setSystem() [1/2]

LMFClsDat& LMFClsDat::setSystem ( int  system)
inlineoverridevirtual

Reimplemented from LMFColoredTable.

Definition at line 36 of file LMFClsDat.h.

36 { return *this; }

◆ setSystem() [2/2]

LMFClsDat& LMFClsDat::setSystem ( std::string  system)
inlineoverridevirtual

Reimplemented from LMFColoredTable.

Definition at line 37 of file LMFClsDat.h.

37 { return *this; }