CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LMFColoredTable.h
Go to the documentation of this file.
1 #ifndef LMFCOLOREDTABLE_H
2 #define LMFCOLOREDTABLE_H
3 
4 /*
5  Last updated by Giovanni.Organtini@roma1.infn.it 2010
6  */
7 
9 #include <map>
10 
20 class LMFColoredTable : public LMFDat {
21  public:
24  LMFColoredTable(oracle::occi::Environment* env,
25  oracle::occi::Connection* conn);
27 
28  virtual std::string getTableName() const = 0;
29 
30  std::string getColor() const;
31  virtual std::string getSystem() const;
32 
34  if (COLOR.find(color) != COLOR.end()) {
35  m_color = color;
36  m_className += "/C=" + COLOR[color];
37  }
38  return *this;
39  }
40  LMFColoredTable& setColor(std::string color);
41  virtual LMFColoredTable& setSystem(int system) {
42  if (SYSTEM.find(system) != SYSTEM.end()) {
43  m_system = system;
44  m_className += "/S=" + SYSTEM[system];
45  }
46  return *this;
47  }
48  virtual LMFColoredTable& setSystem(std::string s);
50  setData(id, "VMIN", v);
51  return *this;
52  }
54  setData(id, "VMAX", v);
55  return *this;
56  }
57 
58  LMFColoredTable& setVersions(EcalLogicID &id, int vmin, int vmax) {
59  setData(id, "VMIN", vmin);
60  setData(id, "VMAX", vmax);
61  return *this;
62  }
63 
64  int getVmin(EcalLogicID &id) {
65  return getData(id, "VMIN");
66  }
67 
68  int getVmax(EcalLogicID &id) {
69  return getData(id, "VMAX");
70  }
71 
72  int writeDB() throw(std::runtime_error);
73 
74 
75  protected:
76  int m_color;
77  int m_system;
78 
79  private:
80  std::map<int, std::string> COLOR;
81  std::map<int, std::string> SYSTEM;
82 };
83 
84 #endif
std::string m_className
Definition: LMFUnique.h:99
LMFColoredTable & setVersions(EcalLogicID &id, int vmin, int vmax)
int getVmax(EcalLogicID &id)
LMFDat & setData(int logic_id, const std::vector< float > &data)
Definition: LMFDat.h:55
std::map< int, std::string > COLOR
std::string getColor() const
int getVmin(EcalLogicID &id)
Definition: LMFDat.h:19
LMFColoredTable & setColor(int color)
virtual std::string getTableName() const =0
std::map< int, std::vector< float > > getData()
Definition: LMFDat.cc:636
virtual LMFColoredTable & setSystem(int system)
#define private
Definition: FWFileEntry.h:18
LMFColoredTable & setVmax(EcalLogicID &id, int v)
std::map< int, std::string > SYSTEM
#define protected
Definition: FWEveView.cc:36
LMFColoredTable & setVmin(EcalLogicID &id, int v)
mathSSE::Vec4< T > v
tuple conn
Definition: results_mgr.py:53
virtual std::string getSystem() const