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(DQMStore::IBooker & ibooker, RPCDetId & detId,int nstrips,std::string folder, std::map<std::string, MonitorElement*> & meMap) {
5 
6  ibooker.setCurrentFolder(folder);
7 
8  char meId [128];
9  char meTitle [128];
10  int rawId = detId.rawId();
11 
12  //Begin booking DT
13  if(detId.region()==0) {
14 
15  sprintf(meId,"ExpectedOccupancyFromDT_%d",rawId);
16  sprintf(meTitle,"ExpectedOccupancyFromDT_for_%d",rawId);
17  meMap[meId] = ibooker.book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
18 
19  sprintf(meId,"RPCDataOccupancyFromDT_%d",rawId);
20  sprintf(meTitle,"RPCDataOccupancyFromDT_for_%d",rawId);
21  meMap[meId] = ibooker.book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
22 
23  }else{ //Begin booking CSC
24 
25  sprintf(meId,"ExpectedOccupancyFromCSC_%d",rawId);
26  sprintf(meTitle,"ExpectedOccupancyFromCSC_for_%d",rawId);
27  meMap[meId] = ibooker.book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
28 
29  sprintf(meId,"RPCDataOccupancyFromCSC_%d",rawId);
30  sprintf(meTitle,"RPCDataOccupancyFromCSC_for_%d",rawId);
31  meMap[meId] = ibooker.book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
32 
33  }
34 }
35 
36 
37 
void bookDetUnitSeg(DQMStore::IBooker &, RPCDetId &detId, int nstrips, std::string folder, std::map< std::string, MonitorElement * > &)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:63