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