CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GeometryHelper.h
Go to the documentation of this file.
1 #ifndef DQM_ECALCOMMON_GeomHelperFunctions_H
2 #define DQM_ECALCOMMON_GeomHelperFunctions_H
3 
10 #include <string>
11 #include <map>
12 
13 class DQMStore;
14 class MonitorElement;
15 class EEDetId;
16 class EcalScDetId;
17 class EcalTrigTowerDetId;
18 
19 namespace ecaldqm {
20 
21  enum ObjectType {
28  };
29 
30  enum BinningType {
34  };
35 
36  struct MeInfo {
39  int ism;
40  };
41 
42  class MeInfoMap {
43 
44  public:
45  static void set(MonitorElement *me, ObjectType otype, BinningType btype, int ism);
46  static const MeInfo *get(MonitorElement *me);
47 
48  private:
49  static std::map<std::string, MeInfo> infos;
50  };
51 
52  // dqmStore must be cd'ed to the desired directory before passing
53  MonitorElement *bookME(DQMStore *dqmStore, const std::string &name, const std::string &title, const std::string &className, ObjectType otype, BinningType btype = kCrystal, int ism = 0, double lowZ = 0., double highZ = 0., const char *option = "s");
54 
55  void fillME(MonitorElement *me, const EEDetId &id, double wz = 1., double wprof = 1.);
56  void fillME(MonitorElement *me, const EcalScDetId &id, double wz = 1., double wprof = 1.);
57  void fillME(MonitorElement *me, const EcalTrigTowerDetId &id, double wz = 1., double wprof = 1.);
58 
59  int getBinME(MonitorElement *me, const EEDetId &id);
60  int getBinME(MonitorElement *me, const EcalScDetId &id);
61  int getBinME(MonitorElement *me, const EcalTrigTowerDetId &id);
62 
63  double getBinContentME(MonitorElement *me, const EEDetId &id);
64  double getBinContentME(MonitorElement *me, const EcalScDetId &id);
65  double getBinContentME(MonitorElement *me, const EcalTrigTowerDetId &id);
66 
67  double getBinErrorME(MonitorElement *me, const EEDetId &id);
68  double getBinErrorME(MonitorElement *me, const EcalScDetId &id);
69  double getBinErrorME(MonitorElement *me, const EcalTrigTowerDetId &id);
70 
71  double getBinEntriesME(MonitorElement *me, const EEDetId &id);
72  double getBinEntriesME(MonitorElement *me, const EcalScDetId &id);
73  double getBinEntriesME(MonitorElement *me, const EcalTrigTowerDetId &id);
74 
75  void setBinContentME(MonitorElement *me, const EEDetId &id, double content);
76  void setBinContentME(MonitorElement *me, const EcalScDetId &id, double content);
77  void setBinContentME(MonitorElement *me, const EcalTrigTowerDetId &id, double content);
78 
79  void setBinErrorME(MonitorElement *me, const EEDetId &id, double error);
80  void setBinErrorME(MonitorElement *me, const EcalScDetId &id, double error);
81  void setBinErrorME(MonitorElement *me, const EcalTrigTowerDetId &id, double error);
82 
83  void setBinEntriesME(MonitorElement *me, const EEDetId &id, double entries);
84  void setBinEntriesME(MonitorElement *me, const EcalScDetId &id, double entries);
85  void setBinEntriesME(MonitorElement *me, const EcalTrigTowerDetId &id, double entries);
86 
87 }
88 
89 #endif
void fillME(MonitorElement *me, const EEDetId &id, double wz=1., double wprof=1.)
int getBinME(MonitorElement *me, const EEDetId &id)
BinningType btype
ObjectType otype
void setBinEntriesME(MonitorElement *me, const EEDetId &id, double entries)
void setBinContentME(MonitorElement *me, const EEDetId &id, double content)
double getBinErrorME(MonitorElement *me, const EEDetId &id)
void setBinErrorME(MonitorElement *me, const EEDetId &id, double error)
MonitorElement * bookME(DQMStore *dqmStore, const std::string &name, const std::string &title, const std::string &className, ObjectType otype, BinningType btype=kCrystal, int ism=0, double lowZ=0., double highZ=0., const char *option="s")
double getBinContentME(MonitorElement *me, const EEDetId &id)
static void set(MonitorElement *me, ObjectType otype, BinningType btype, int ism)
double getBinEntriesME(MonitorElement *me, const EEDetId &id)
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
static std::map< std::string, MeInfo > infos
std::string className(const T &t)
Definition: ClassName.h:30