30 std::stringstream htit;
31 htit<<
"Synchronization offset - "<<
title;
38 std::stringstream htit;
39 htit<<
"Synchronization offset - "<<
title;
46 std::stringstream htit;
47 htit<<
"Synchronization width - "<<
title;
54 std::stringstream htit;
55 htit<<
"Synchronization width - "<<
title;
75 dbe->showDirStructure();
87 std::map<std::string, MonitorElement*> meMap;
88 std::string regionName;
96 if(detId.
region() == -1) regionName=
"Encap-";
97 if(detId.
region() == 1) regionName=
"Encap+";
101 sprintf(folder,
"%s/%s_%d/station_%d/sector_%d",regionName.c_str(),ringType.c_str(),
107 char detUnitLabel[128];
108 char layerLabel[128];
109 sprintf(detUnitLabel ,
"%d",detId());
110 sprintf(layerLabel ,
"layer%d_subsector%d_roll%d",detId.
layer(),detId.
subsector(),detId.
roll());
115 sprintf(meId,
"Sync_%s",detUnitLabel);
116 sprintf(meTitle,
"Sychronization_for_%s",layerLabel);
117 meMap[meId] =
dbe->
book1D(meId, meTitle, 9, -4.5, 4.5);
127 int station_map[8]={1,2,3,4,5,0,6,0};
153 std::map <uint32_t,timing>::const_iterator ci;
158 uint32_t
id = ci->first;
161 offset = ci->second.offset();
162 width = ci->second.width();
169 xf=station_map[detId.
station()*2+detId.
layer()-3]+((float)(detId.
roll()-0.5)/3.);
174 if (detId.
ring()==1) hOffsetMBp1->
Fill(xf,yf,offset);
175 if (detId.
ring()==2) hOffsetMBp2->
Fill(xf,yf,offset);
176 if (detId.
ring()==-1) hOffsetMBm1->
Fill(xf,yf,offset);
177 if (detId.
ring()==-2) hOffsetMBm2->
Fill(xf,yf,offset);
178 if (detId.
ring()==0) hOffsetMB0->
Fill(xf,yf,offset);
179 if (detId.
ring()==1) hWidthMBp1->
Fill(xf,yf,width);
180 if (detId.
ring()==2) hWidthMBp2->
Fill(xf,yf,width);
181 if (detId.
ring()==-1) hWidthMBm1->
Fill(xf,yf,width);
182 if (detId.
ring()==-2) hWidthMBm2->
Fill(xf,yf,width);
183 if (detId.
ring()==0) hWidthMB0->
Fill(xf,yf,width);
186 xf=detId.
ring() +((float)(detId.
roll()-0.5)/4.);
190 if (detId.
station()==1) hOffsetMEp1->
Fill(xf,yf,offset);
191 if (detId.
station()==2) hOffsetMEp2->
Fill(xf,yf,offset);
192 if (detId.
station()==3) hOffsetMEp3->
Fill(xf,yf,offset);
193 if (detId.
station()==1) hWidthMEp1->
Fill(xf,yf,width);
194 if (detId.
station()==2) hWidthMEp2->
Fill(xf,yf,width);
195 if (detId.
station()==3) hWidthMEp3->
Fill(xf,yf,width);
198 if (detId.
station()==1) hOffsetMEm1->
Fill(xf,yf,offset);
199 if (detId.
station()==2) hOffsetMEm2->
Fill(xf,yf,offset);
200 if (detId.
station()==3) hOffsetMEm3->
Fill(xf,yf,offset);
201 if (detId.
station()==1) hWidthMEm1->
Fill(xf,yf,width);
202 if (detId.
station()==2) hWidthMEm2->
Fill(xf,yf,width);
203 if (detId.
station()==3) hWidthMEm3->
Fill(xf,yf,width);
221 for (
int i=0;
i<4;
i++) {
226 char detUnitLabel[128];
227 char layerLabel[128];
234 for(rpcDigiCI = rpcDigis->begin();rpcDigiCI!=rpcDigis->end();rpcDigiCI++){
239 sprintf(detUnitLabel ,
"%d",detId());
240 sprintf(layerLabel ,
"layer%d_subsector%d_roll%d",detId.
layer(),detId.
subsector(),detId.
roll());
242 std::map<uint32_t, std::map<std::string,MonitorElement*> >::iterator meItr =
meCollection.find(
id);
254 if( digiIt->bx()<aBX) aBX=digiIt->bx();
261 sprintf(meId,
"Sync_%s",detUnitLabel);
262 meMap[meId]->Fill(aBX);
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
MonitorElement * endcapOffsetHist(std::string name, std::string title)
void readRPCDAQStrips(const edm::Event &iEvent)
virtual void endJob(void)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
std::map< uint32_t, std::map< std::string, MonitorElement * > > meCollection
DQMStore * dbe
back-end interface
bool getByType(Handle< PROD > &result) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * endcapWidthHist(std::string name, std::string title)
RPCMonitorSync(const edm::ParameterSet &)
unsigned int offset(bool)
int saveRootFileEventsInterval
std::vector< DigiType >::const_iterator const_iterator
std::map< uint32_t, timing > synchroMap
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
std::pair< const_iterator, const_iterator > Range
MonitorElement * barrelWidthHist(std::string name, std::string title)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void setCurrentFolder(const std::string &fullpath)
MonitorElement * barrelOffsetHist(std::string name, std::string title)
Log messages.
std::map< std::string, MonitorElement * > bookDetUnitME(RPCDetId &detId)
Booking of MonitoringElemnt for one RPCDetId (= roll)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.