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 
12 #include <string>
13 #include <map>
14 
15 class DQMStore;
16 class MonitorElement;
17 class EEDetId;
18 class EcalScDetId;
19 class EcalTrigTowerDetId;
20 
21 namespace ecaldqm {
22 
23  enum ObjectType {
30  };
31 
32  enum BinningType {
36  };
37 
38  struct MeInfo {
41  int ism;
42  };
43 
44  class MeInfoMap {
45 
46  public:
47  static void set(MonitorElement *me, ObjectType otype, BinningType btype, int ism);
48  static const MeInfo *get(MonitorElement *me);
49 
50  private:
51  static std::map<std::string, MeInfo> infos;
52  };
53 
54  // dqmStore must be cd'ed to the desired directory before passing
55  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");
56 
57  void fillME(MonitorElement *me, const EEDetId &id, double wz = 1., double wprof = 1.);
58  void fillME(MonitorElement *me, const EcalScDetId &id, double wz = 1., double wprof = 1.);
59  void fillME(MonitorElement *me, const EcalTrigTowerDetId &id, double wz = 1., double wprof = 1.);
60 
61  int getBinME(MonitorElement *me, const EEDetId &id);
62  int getBinME(MonitorElement *me, const EcalScDetId &id);
63  int getBinME(MonitorElement *me, const EcalTrigTowerDetId &id);
64 
65  double getBinContentME(MonitorElement *me, const EEDetId &id);
66  double getBinContentME(MonitorElement *me, const EcalScDetId &id);
67  double getBinContentME(MonitorElement *me, const EcalTrigTowerDetId &id);
68 
69  double getBinErrorME(MonitorElement *me, const EEDetId &id);
70  double getBinErrorME(MonitorElement *me, const EcalScDetId &id);
71  double getBinErrorME(MonitorElement *me, const EcalTrigTowerDetId &id);
72 
73  double getBinEntriesME(MonitorElement *me, const EEDetId &id);
74  double getBinEntriesME(MonitorElement *me, const EcalScDetId &id);
75  double getBinEntriesME(MonitorElement *me, const EcalTrigTowerDetId &id);
76 
77  void setBinContentME(MonitorElement *me, const EEDetId &id, double content);
78  void setBinContentME(MonitorElement *me, const EcalScDetId &id, double content);
79  void setBinContentME(MonitorElement *me, const EcalTrigTowerDetId &id, double content);
80 
81  void setBinErrorME(MonitorElement *me, const EEDetId &id, double error);
82  void setBinErrorME(MonitorElement *me, const EcalScDetId &id, double error);
83  void setBinErrorME(MonitorElement *me, const EcalTrigTowerDetId &id, double error);
84 
85  void setBinEntriesME(MonitorElement *me, const EEDetId &id, double entries);
86  void setBinEntriesME(MonitorElement *me, const EcalScDetId &id, double entries);
87  void setBinEntriesME(MonitorElement *me, const EcalTrigTowerDetId &id, double entries);
88 
89 }
90 
91 #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