CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DQM/RPCMonitorDigi/src/RPCEfficiencyBook.cc

Go to the documentation of this file.
00001 // #include <stdio.h>
00002 // #include <stdlib.h>
00003 // #include <iostream>
00004 // #include <string>
00005 // #include <map>
00006 
00007 
00008 //#include <DataFormats/MuonDetId/interface/RPCDetId.h>
00009 #include <DQM/RPCMonitorDigi/interface/RPCEfficiency.h>
00010 //#include <DQM/RPCMonitorDigi/interface/RPCBookFolderStructure.h>
00011 //#include "DQMServices/Core/interface/MonitorElement.h"
00012 
00013 void RPCEfficiency::bookDetUnitSeg(RPCDetId & detId,int nstrips,std::string folder, std::map<std::string, MonitorElement*> & meMap) {
00014   
00015   //std::map<std::string, MonitorElement*> meMap;
00016    
00017   dbe->setCurrentFolder(folder);
00018 
00019   char meId [128];
00020   char meTitle [128];
00021 
00022   int rawId = detId.rawId();
00023     
00024   //Begin booking DT
00025   if(detId.region()==0) {
00026     
00027     sprintf(meId,"ExpectedOccupancyFromDT_%d",rawId);
00028     sprintf(meTitle,"ExpectedOccupancyFromDT_for_%d",rawId);
00029     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00030     
00031     sprintf(meId,"RPCDataOccupancyFromDT_%d",rawId);
00032     sprintf(meTitle,"RPCDataOccupancyFromDT_for_%d",rawId);
00033     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00034     
00035   //   sprintf(meId,"BXDistribution_%d",rawId);
00036 //     sprintf(meTitle,"BXDistribution_for_%d",rawId);
00037 //     meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
00038   }else{
00039     //std::cout<<"Booking for the EndCap"<<detUnitLabel<<std::endl;
00040 
00041     sprintf(meId,"ExpectedOccupancyFromCSC_%d",rawId);
00042     sprintf(meTitle,"ExpectedOccupancyFromCSC_for_%d",rawId);
00043     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00044     
00045     sprintf(meId,"RPCDataOccupancyFromCSC_%d",rawId);
00046     sprintf(meTitle,"RPCDataOccupancyFromCSC_for_%d",rawId);
00047     meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00048     
00049    //  sprintf(meId,"BXDistribution_%d",rawId);
00050 //     sprintf(meTitle,"BXDistribution_for_%d",rawId);
00051 //     meMap[meId] = dbe->book1D(meId, meTitle, 11,-5.5, 5.5);
00052   }
00053   //return meMap;
00054 }
00055 
00056 
00057