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/RPCMonitorClient/interface/RPCEfficiencySecond.h>
00010 #include <DQM/RPCMonitorDigi/interface/RPCBookFolderStructure.h>
00011 #include "DQMServices/Core/interface/MonitorElement.h"
00012 #include "Geometry/RPCGeometry/interface/RPCGeomServ.h"
00013
00014 std::map<std::string, MonitorElement*> RPCEfficiencySecond::bookDetUnitSeg(RPCDetId & detId,int nstrips, std::string folderPath) {
00015
00016 std::map<std::string, MonitorElement*> meMap;
00017
00018 RPCBookFolderStructure * folderStr = new RPCBookFolderStructure();
00019
00020 std::string folder = folderPath+ "RollByRoll/" + folderStr->folderStructure(detId);
00021
00022 delete folderStr;
00023
00024 dbe->setCurrentFolder(folder);
00025
00026 RPCGeomServ RPCname(detId);
00027 std::string nameRoll = RPCname.name();
00028
00029 char detUnitLabel[128];
00030 char layerLabel[128];
00031
00032 sprintf(detUnitLabel ,"%s",nameRoll.c_str());
00033 sprintf(layerLabel ,"%s",nameRoll.c_str());
00034
00035 char meId [128];
00036 char meTitle [128];
00037
00038
00039 if(detId.region()==0) {
00040
00041
00042 sprintf(meId,"ExpectedOccupancyFromDT_%s",detUnitLabel);
00043 sprintf(meTitle,"ExpectedOccupancyFromDT_for_%s",layerLabel);
00044 meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00045
00046
00047 sprintf(meId,"RPCDataOccupancyFromDT_%s",detUnitLabel);
00048 sprintf(meTitle,"RPCDataOccupancyFromDT_for_%s",layerLabel);
00049 meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00050
00051 sprintf(meId,"Profile_%s",detUnitLabel);
00052 sprintf(meTitle,"Profile_for_%s",layerLabel);
00053 meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00054
00055
00056
00057
00058
00059
00060 }else{
00061
00062
00063
00064 sprintf(meId,"ExpectedOccupancyFromCSC_%s",detUnitLabel);
00065 sprintf(meTitle,"ExpectedOccupancyFromCSC_for_%s",layerLabel);
00066 meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00067
00068
00069 sprintf(meId,"RPCDataOccupancyFromCSC_%s",detUnitLabel);
00070 sprintf(meTitle,"RPCDataOccupancyFromCSC_for_%s",layerLabel);
00071 meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00072
00073
00074 sprintf(meId,"Profile_%s",detUnitLabel);
00075 sprintf(meTitle,"Profile_for_%s",layerLabel);
00076 meMap[meId] = dbe->book1D(meId, meTitle, nstrips, 0.5, nstrips+0.5);
00077
00078
00079
00080
00081
00082 }
00083 return meMap;
00084 }
00085
00086
00087