CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCEfficiencyBook.cc
Go to the documentation of this file.
2 
3 
4 void RPCEfficiency::bookDetUnitSeg(RPCDetId & detId,int nstrips,std::string folder, std::map<std::string, MonitorElement*> & meMap) {
5 
6  dbe->setCurrentFolder(folder);
7 
8  char meId [128];
9  char meTitle [128];
10 
11  int rawId = detId.rawId();
12 
13  //Begin booking DT
14  if(detId.region()==0) {
15 
16  sprintf(meId,"ExpectedOccupancyFromDT_%d",rawId);
17  sprintf(meTitle,"ExpectedOccupancyFromDT_for_%d",rawId);
18  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
19 
20  sprintf(meId,"RPCDataOccupancyFromDT_%d",rawId);
21  sprintf(meTitle,"RPCDataOccupancyFromDT_for_%d",rawId);
22  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
23 
24  // sprintf(meId,"BXDistribution_%d",rawId);
25 // sprintf(meTitle,"BXDistribution_for_%d",rawId);
26 // meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
27  }else{
28 
29  sprintf(meId,"ExpectedOccupancyFromCSC_%d",rawId);
30  sprintf(meTitle,"ExpectedOccupancyFromCSC_for_%d",rawId);
31  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
32 
33  sprintf(meId,"RPCDataOccupancyFromCSC_%d",rawId);
34  sprintf(meTitle,"RPCDataOccupancyFromCSC_for_%d",rawId);
35  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
36 
37  // sprintf(meId,"BXDistribution_%d",rawId);
38 // sprintf(meTitle,"BXDistribution_for_%d",rawId);
39 // meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
40  }
41  //return meMap;
42 }
43 
44 
45 
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:873
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
DQMStore * dbe
void bookDetUnitSeg(RPCDetId &detId, int nstrips, std::string folder, std::map< std::string, MonitorElement * > &)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63