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.
1 // #include <stdio.h>
2 // #include <stdlib.h>
3 // #include <iostream>
4 // #include <string>
5 // #include <map>
6 
7 
8 //#include <DataFormats/MuonDetId/interface/RPCDetId.h>
10 //#include <DQM/RPCMonitorDigi/interface/RPCBookFolderStructure.h>
11 //#include "DQMServices/Core/interface/MonitorElement.h"
12 
13 void RPCEfficiency::bookDetUnitSeg(RPCDetId & detId,int nstrips,std::string folder, std::map<std::string, MonitorElement*> & meMap) {
14 
15  //std::map<std::string, MonitorElement*> meMap;
16 
17  dbe->setCurrentFolder(folder);
18 
19  char meId [128];
20  char meTitle [128];
21 
22  int rawId = detId.rawId();
23 
24  //Begin booking DT
25  if(detId.region()==0) {
26 
27  sprintf(meId,"ExpectedOccupancyFromDT_%d",rawId);
28  sprintf(meTitle,"ExpectedOccupancyFromDT_for_%d",rawId);
29  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
30 
31  sprintf(meId,"RPCDataOccupancyFromDT_%d",rawId);
32  sprintf(meTitle,"RPCDataOccupancyFromDT_for_%d",rawId);
33  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
34 
35  // sprintf(meId,"BXDistribution_%d",rawId);
36 // sprintf(meTitle,"BXDistribution_for_%d",rawId);
37 // meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
38  }else{
39  //std::cout<<"Booking for the EndCap"<<detUnitLabel<<std::endl;
40 
41  sprintf(meId,"ExpectedOccupancyFromCSC_%d",rawId);
42  sprintf(meTitle,"ExpectedOccupancyFromCSC_for_%d",rawId);
43  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
44 
45  sprintf(meId,"RPCDataOccupancyFromCSC_%d",rawId);
46  sprintf(meTitle,"RPCDataOccupancyFromCSC_for_%d",rawId);
47  meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
48 
49  // sprintf(meId,"BXDistribution_%d",rawId);
50 // sprintf(meTitle,"BXDistribution_for_%d",rawId);
51 // meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
52  }
53  //return meMap;
54 }
55 
56 
57 
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
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:429
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:67