CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CastorMonitorModule.cc
Go to the documentation of this file.
6 
7 //**************************************************************//
8 //***************** CastorMonitorModule ******************//
9 //***************** Author: Dmytro Volyanskyy ******************//
10 //***************** Date : 22.11.2008 (first version) *********//
11 //**************************************************************//
15 
16 //==================================================================//
17 //======================= Constructor ==============================//
18 //==================================================================//
20 
21 
22 
23 
25  inputLabelRaw_ = ps.getParameter<edm::InputTag>("rawLabel");
26  inputLabelDigi_ = ps.getParameter<edm::InputTag>("digiLabel");
27  inputLabelRecHitCASTOR_ = ps.getParameter<edm::InputTag>("CastorRecHitLabel");
28  fVerbosity = ps.getUntrackedParameter<int>("debug", 0); //-- show debug
29  showTiming_ = ps.getUntrackedParameter<bool>("showTiming", false); //-- show CPU time
30  dump2database_ = ps.getUntrackedParameter<bool>("dump2database",false); //-- dumps output to database file
31  EDMonOn_= ps.getUntrackedParameter<bool>("EDMonitor", false);
32 
33  if(fVerbosity>0) std::cout << "CastorMonitorModule Constructor (start)" << std::endl;
34 
36  irun_=0;
37  ilumisec_=0;
38  ievent_=0;
39  itime_=0;
40  ibunch_=0;
41  actonLS_=false;
42 
43  meStatus_=0; meRunType_=0;
44  meEvtMask_=0; meFEDS_=0;
46  fedsListed_ = false;
47 
48  RecHitMon_ = NULL;
49  DigiMon_ = NULL;
50  LedMon_ = NULL;
51  PSMon_ = NULL;
52  CQMon_ = NULL;
53  EDMon_ = NULL;
54  HIMon_ = NULL;
55 
58 
61 
62 
63  //---------------------- DigiMonitor ----------------------//
64  if ( ps.getUntrackedParameter<bool>("DigiMonitor", false) ) {
65  if(fVerbosity>0) std::cout << "CastorMonitorModule: Digi monitor flag is on...." << std::endl;
67  DigiMon_->setup(ps, dbe_);
68  }
69  //------------------------------------------------------------//
70 
72  if ( ps.getUntrackedParameter<bool>("RecHitMonitor", false) ) {
73  if(fVerbosity>0) std::cout << "CastorMonitorModule: RecHit monitor flag is on...." << std::endl;
75  RecHitMon_->setup(ps, dbe_);
76  }
77  //-------------------------------------------------------------//
78 
79 
81  if ( ps.getUntrackedParameter<bool>("HIMonitor", false) ) {
82  if(fVerbosity>0) std::cout << "CastorMonitorModule: HI monitor flag is on...." << std::endl;
83  HIMon_ = new CastorHIMonitor();
84  HIMon_->setup(ps, dbe_);
85  }
86  //-------------------------------------------------------------//
87 
89  if ( ps.getUntrackedParameter<bool>("ChannelQualityMonitor", false) ) {
90  if(fVerbosity>0) std::cout << "CastorChannelQualityMonitor: CQ monitor flag is on...." << std::endl;
92  CQMon_->setup(ps, dbe_);
93  }
94  //-------------------------------------------------------------//
95  /* // take it away for the time being
97  if ( ps.getUntrackedParameter<bool>("LEDMonitor", false) ) {
98  if(fVerbosity>0) std::cout << "CastorMonitorModule: LED monitor flag is on...." << std::endl;
99  LedMon_ = new CastorLEDMonitor();
100  LedMon_->setup(ps, dbe_);
101  }
102  //-------------------------------------------------------------//
103  */
104  //---------------------- PSMonitor ----------------------//
105  if ( ps.getUntrackedParameter<bool>("PSMonitor", false) ) {
106  if(fVerbosity>0) std::cout << "CastorMonitorModule: PS monitor flag is on...." << std::endl;
107  PSMon_ = new CastorPSMonitor();
108  PSMon_->setup(ps, dbe_);
109  }
110  //------------------------------------------------------------//
111 
112  //---------------------- EDMonitor ----------------------//
113  if ( ps.getUntrackedParameter<bool>("EDMonitor", false) ) {
114  if(fVerbosity>0) std::cout << "CastorMonitorModule: ED monitor flag is on...." << std::endl;
115  EDMon_ = new CastorEventDisplay();
116  EDMon_->setup(ps, dbe_);
117  }
118  //------------------------------------------------------------//
119 
120 
121 
122 
123 
125 
127  prescaleEvt_ = ps.getUntrackedParameter<int>("diagnosticPrescaleEvt", -1);
128  if(fVerbosity>0) std::cout << "===>CastorMonitor event prescale = " << prescaleEvt_ << " event(s)"<< std::endl;
129 
130  prescaleLS_ = ps.getUntrackedParameter<int>("diagnosticPrescaleLS", -1);
131  if(fVerbosity>0) std::cout << "===>CastorMonitor lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< std::endl;
132  if (prescaleLS_>0) actonLS_=true;
133 
134  prescaleUpdate_ = ps.getUntrackedParameter<int>("diagnosticPrescaleUpdate", -1);
135  if(fVerbosity>0) std::cout << "===>CastorMonitor update prescale = " << prescaleUpdate_ << " update(s)"<< std::endl;
136 
137  prescaleTime_ = ps.getUntrackedParameter<int>("diagnosticPrescaleTime", -1);
138  if(fVerbosity>1) std::cout << "===>CastorMonitor time prescale = " << prescaleTime_ << " minute(s)"<< std::endl;
139 
141  std::string subsystemname = ps.getUntrackedParameter<std::string>("subSystemFolder", "Castor") ;
142  if(fVerbosity>0) std::cout << "===>CastorMonitor name = " << subsystemname << std::endl;
143  rootFolder_ = subsystemname + "/";
144 
145  if ( dbe_ != NULL ){
147  }
148 
149 
150  gettimeofday(&psTime_.updateTV,NULL);
152  psTime_.updateTime = (psTime_.updateTV.tv_sec*1000.0+psTime_.updateTV.tv_usec/1000.0);
153  psTime_.updateTime /= 1000.0;
154  psTime_.elapsedTime=0;
155  psTime_.vetoTime=psTime_.updateTime;
156 
157  if(fVerbosity>0) std::cout << "CastorMonitorModule Constructor (end)" << std::endl;
158 
159 }
160 
161 
162 //==================================================================//
163 //======================= Destructor ===============================//
164 //==================================================================//
166 
167 // if (dbe_){
168 // if(DigiMon_!=NULL) { DigiMon_->clearME();}
169 // if(RecHitMon_!=NULL) { RecHitMon_->clearME();}
170 // if(LedMon_!=NULL) { LedMon_->clearME();}
171 // if(PSMon_!=NULL) { LedMon_->clearME();}
172 // if(HIMon_!=NULL) { HIMon_->clearME();}
173 // dbe_->setCurrentFolder(rootFolder_);
174 // dbe_->removeContents();
175 // }
176 //
177 // if(DigiMon_!=NULL) { delete DigiMon_; DigiMon_=NULL; }
178 // if(RecHitMon_!=NULL) { delete RecHitMon_; RecHitMon_=NULL; }
179 // if(HIMon_!=NULL) { delete HIMon_; HIMon_=NULL; }
180 // if(LedMon_!=NULL) { delete LedMon_; LedMon_=NULL; }
181 // delete evtSel_; evtSel_ = NULL;
182 
183 }
184 
185 
186 //=================================================================//
187 //========================== beginJob =============================//
188 //================================================================//
190  ievt_ = 0;
191  ievt_pre_=0;
192 
193  if(fVerbosity>0) std::cout << "CastorMonitorModule::beginJob (start)" << std::endl;
194 
195  if ( dbe_ != NULL ){
196 
197 
199  dbe_->setCurrentFolder(rootFolder_+"CastorEventProducts");
200  meEVT_ = dbe_->bookInt("Event Number");
201  CastorEventProduct =dbe_->book2D("CastorEventProduct","CastorEventProduct",3,0,3,1,0,1);
202  TH2F* hCastorEventProduct =CastorEventProduct->getTH2F();
203  hCastorEventProduct->GetXaxis()->SetBinLabel(1,"RawData");
204  hCastorEventProduct->GetXaxis()->SetBinLabel(2,"CastorDigi");
205  hCastorEventProduct->GetXaxis()->SetBinLabel(3,"CastorRecHits");
206  hCastorEventProduct->GetYaxis()->SetBinLabel(1,"Status");
207  hCastorEventProduct->SetBinContent(1,1,-1);
208  hCastorEventProduct->SetBinContent(2,1,-1);
209  hCastorEventProduct->SetBinContent(3,1,-1);
210  hCastorEventProduct->SetOption("textcolz");
211 
212 
213  dbe_->setCurrentFolder(rootFolder_+"DQM Job Status" );
214  meStatus_ = dbe_->bookInt("STATUS");
215  meRunType_ = dbe_->bookInt("RUN TYPE");
216  meEvtMask_ = dbe_->bookInt("EVT MASK");
217  meFEDS_ = dbe_->book1D("FEDs Unpacked","FEDs Unpacked",100,660,759);
218  meCASTOR_ = dbe_->bookInt("CASTORpresent");
220  meLatency_ = dbe_->book1D("Process Latency","Process Latency",2000,0,10);
221  meQuality_ = dbe_->book1D("Quality Status","Quality Status",100,0,1);
222  meStatus_->Fill(0);
223  meRunType_->Fill(-1);
224  meEvtMask_->Fill(-1);
226  meCASTOR_->Fill(0);
227  }
228  else{
229  if(fVerbosity>0) std::cout << "CastorMonitorModule::beginJob - NO DQMStore service" << std::endl;
230  }
231 
232  if(fVerbosity>0) std::cout << "CastorMonitorModule::beginJob (end)" << std::endl;
233 
234  return;
235 }
236 
237 
238 //=================================================================//
239 //========================== beginRun =============================//
240 //================================================================//
241 void CastorMonitorModule::beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
242 
243  fedsListed_ = false;
244  reset();
245 
247  iSetup.get<CastorDbRecord>().get(conditions_);
248 
250  iSetup.get<CastorPedestalsRcd>().get(dbPedestals);
251  if(!dbPedestals.isValid() && fVerbosity>0) std::cout << "CASTOR has no CastorPedestals in the CondDB !!!" << std::endl;
252 
254  float sigma_averaged;
255  unsigned int iChannel = 0;
256  std::vector<DetId> channels = dbPedestals->getAllChannels();
257 
259  for (std::vector<DetId>::iterator ch=channels.begin(); ch!=channels.end(); ch++) {
260  const CastorPedestal * pedestals_mean = dbPedestals->getValues(*ch);
261  sigma_averaged = 0.;
262 
264  for (short unsigned int iCapId = 0; iCapId < 4; iCapId++){
265  sigma_averaged += sqrt(pedestals_mean->getWidth(iCapId));
266  };
267 
269  fPedestalNSigmaAverage[HcalCastorDetId(*ch).module()-1][HcalCastorDetId(*ch).sector()-1] = sigma_averaged/4;
270  iChannel++;
271  };
272 
273  if(iChannel<224 && fVerbosity>0) std::cout << "There are less that 224 channels in CastorPedestalsRcd record !!!" << std::endl;
274 
275  return;
276 }
277 
278 //=================================================================//
279 //========================== beginLuminosityBlock ================//
280 //================================================================//
282  const edm::EventSetup& context) {
283 
284  if(actonLS_ && !prescale()){
286  }
287 }
288 
289 
290 //================================================================//
291 //========================== endLuminosityBlock ==================//
292 //================================================================//
294  const edm::EventSetup& context) {
295  if(actonLS_ && !prescale()){
297  }
298 }
299 
300 //=================================================================//
301 //========================== endRun ===============================//
302 //=================================================================//
304 {
305  if (fVerbosity>0) std::cout <<"CastorMonitorModule::endRun(...) "<<std::endl;
307  if (DigiMon_!=NULL) //************ DigiMon_->fillPedestalHistos(); //FIX
308  return;
309 }
310 
311 //=================================================================//
312 //========================== endJob ===============================//
313 //=================================================================//
315 
316  //if ( meStatus_ ) meStatus_->Fill(2);
317 
318  if(RecHitMon_!=NULL) RecHitMon_->done();
319  if(DigiMon_!=NULL) DigiMon_->done();
320  if(LedMon_!=NULL) LedMon_->done();
321  if(CQMon_!=NULL) CQMon_->done();
322  if(PSMon_!=NULL) PSMon_->done();
323  if(EDMon_!=NULL) EDMon_->done();
324  if(HIMon_!=NULL) RecHitMon_->done();
325 
326  /* LEAVE IT OUT FOR THE MOMENT
327  // TO DUMP THE OUTPUT TO DATABASE FILE
328  if (dump2database_){
329 
330  }
331  */
332  return;
333 }
334 
335 
336 //=================================================================//
337 //========================== reset ===============================//
338 //=================================================================//
340 
341  if(DigiMon_!=NULL) DigiMon_->reset();
343  if(LedMon_!=NULL) LedMon_->reset();
344  if(CQMon_!=NULL) CQMon_->reset();
345  if(PSMon_!=NULL) PSMon_->reset();
346  if(EDMon_!=NULL) EDMon_->reset();
347  if(HIMon_!=NULL) HIMon_->reset();
348 
349 }
350 
351 
352 //=================================================================//
353 //========================== analyze ===============================//
354 //=================================================================//
356 
357  using namespace edm;
358 
359 
361  irun_ = iEvent.id().run();
362  ilumisec_ = iEvent.luminosityBlock();
363  ievent_ = iEvent.id().event();
364  itime_ = iEvent.time().value();
365  ibunch_ = iEvent.bunchCrossing();
366 
367 
368  if (fVerbosity>0) {
369  std::cout << "==> CastorMonitorModule: evts: "<< nevt_ << ", run: " << irun_ << ", LS: " << ilumisec_ << std::endl;
370  std::cout << " evt: " << ievent_ << ", time: " << itime_ <<"\t counter = "<< ievt_pre_<< "\t total count = "<<ievt_<<std::endl;
371  }
372 
374  ievt_++;
375 
377  ievt_pre_++; // need to increment counter before calling prescale
378  if(prescale()) return;
379 
380 
381  meLatency_->Fill(psTime_.elapsedTime);
382 
383 
385  // add in DO_HCAL_TPMON, DO_HCAL_CTMON ?(in CastorMonitorSelector.h)
386  /* FIX
387  // int trigMask=0;
388  if(mtccMon_==NULL){
389  evtSel_->processEvent(e);
390  evtMask = evtSel_->getEventMask();
391  // trigMask = evtSel_->getTriggerMask();
392  }
393  */
394  if ( dbe_ ){
395  meStatus_->Fill(1);
396  meEvtMask_->Fill(evtMask);
397  }
398 
400  bool rawOK_ = true;
401  bool digiOK_ = true;
402  bool rechitOK_ = true;
403 
404  //-- TAKE IT AWAY for the time being
406  //edm::Handle<FEDRawDataCollection> RawData;
407  //iEvent.getByLabel(inputLabelRaw_,RawData);
408  //if (!RawData.isValid()) {
409  // rawOK_=false;
410  //}
411 
412  /*
413  edm::Handle<HcalUnpackerReport> report;
414  iEvent.getByType(report);
415  if (!report.isValid()) {
416  rawOK_=false;
417  }
418  else
419  {
420  if(!fedsListed_){
421  const std::vector<int> feds = (*report).getFedsUnpacked();
422  for(unsigned int f=0; f<feds.size(); f++){
423  meFEDS_->Fill(feds[f]);
424  }
425  fedsListed_ = true;
426  }
427  }
428  */
429  //---------------------------------------------------------------//
430  //------------------- try to get digis ------------------------//
431  //---------------------------------------------------------------//
432 
434  iEvent.getByLabel(inputLabelDigi_,CastorDigi);
435  if (!CastorDigi.isValid()) {
436  digiOK_=false;
437  }
438 
439 
440 
443  //if ( checkCASTOR_ )
444  // CheckCastorStatus(*RawData,*report,*readoutMap_,*CastorDigi);
445 
446 
447  //---------------------------------------------------------------//
448  //------------------- try to get RecHits ------------------------//
449  //---------------------------------------------------------------//
451  iEvent.getByLabel(inputLabelRecHitCASTOR_,CastorHits);
452  if (!CastorHits.isValid()) {
453  rechitOK_ = false;
454  }
455 
456 
458  if(ievt_%10 == 0) {
459 
460  TH2F* hCastorEventProduct=CastorEventProduct->getTH2F();
461  hCastorEventProduct->SetBinContent(1,1,int(rawOK_));
462  hCastorEventProduct->SetBinContent(2,1,int(digiOK_));
463  hCastorEventProduct->SetBinContent(3,1,int(rechitOK_));
464 
465  if(fVerbosity>0) {
466  std::cout << " RAW Data ==> " << rawOK_<< std::endl;
467  std::cout << " Digis ==> " << digiOK_<< std::endl;
468  std::cout << " RecHits ==> " << rechitOK_<< std::endl;
469  }
470 
471  }
472 
473  //------------------------------------------------------------//
474  //---------------- Run the configured tasks ------------------//
475  //-------------- protect against missing products -----------//
476  //-----------------------------------------------------------//
477 
478  if (showTiming_){
480  }
481 
482  //----------------- Digi monitor task ------------------//
483  // if((DigiMon_!=NULL) && (evtMask&DO_CASTOR_PED_CALIBMON) && digiOK_)
484  if(digiOK_) DigiMon_->processEvent(*CastorDigi,*conditions_);
485  if (showTiming_){
486  cpu_timer.stop();
487  if (DigiMon_!=NULL) std::cout <<"TIMER:: DIGI MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
489  }
490 
491 
492  //----------------- Rec Hit monitor task -------------------------//
493  // if((RecHitMon_ != NULL) && (evtMask&DO_CASTOR_RECHITMON) && rechitOK_)
494  if(rechitOK_) RecHitMon_->processEvent(*CastorHits);
495  if (showTiming_){
496  cpu_timer.stop();
497  if (RecHitMon_!=NULL) std::cout <<"TIMER:: RECHIT MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
499  }
500 
501  //----------------- Channel Quality Monitor task -------------------------//
502  if(rechitOK_) CQMon_->processEvent(*CastorHits);
503  if (showTiming_){
504  cpu_timer.stop();
505  if (CQMon_!=NULL) std::cout <<"TIMER:: CHANNELQUALITY MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
507  }
508 
510  /*
511  //---------------- LED monitor task ------------------------//
512  // if((LedMon_!=NULL) && (evtMask&DO_HCAL_LED_CALIBMON) && digiOK_)
513  if(digiOK_) LedMon_->processEvent(*CastorDigi,*conditions_);
514  if (showTiming_){
515  cpu_timer.stop();
516  if (LedMon_!=NULL) std::cout <<"TIMER:: LED MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
517  cpu_timer.reset(); cpu_timer.start();
518  }
519  */
520  //---------------- Pulse Shape monitor task ------------------------//
522 
524  eventSetup.get<CastorElectronicsMapRcd>().get(refEMap);
525  const CastorElectronicsMap* myRefEMap = refEMap.product();
526  listEMap = myRefEMap->allPrecisionId();
527  if(digiOK_) PSMon_->processEvent(*CastorDigi,*conditions_, listEMap, ibunch_, fPedestalNSigmaAverage);
528  if (showTiming_) {
529  cpu_timer.stop();
530  if (PSMon_!=NULL) std::cout <<"TIMER:: PULSE SHAPE ->"<<cpu_timer.cpuTime()<<std::endl;
532  }
533 
534 
535  //---------------- EventDisplay monitor task ------------------------//
537  edm::ESHandle<CaloGeometry> caloGeometry;
538  eventSetup.get<CaloGeometryRecord>().get(caloGeometry);
539 
540  if(rechitOK_ && EDMonOn_) EDMon_->processEvent(*CastorHits, *caloGeometry);
541  if (showTiming_){
542  cpu_timer.stop();
543  if (EDMon_!=NULL) std::cout <<"TIMER:: EVENTDISPLAY MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
545  }
546 
547 //----------------- Heavy Ion monitor task -------------------------//
548  if(rechitOK_ && digiOK_ ) HIMon_->processEvent(*CastorHits, *CastorDigi, *conditions_);
549  if (showTiming_){
550  cpu_timer.stop();
551  if (HIMon_!=NULL) std::cout <<"TIMER:: HI MONITOR ->"<<cpu_timer.cpuTime()<<std::endl;
553  }
554 
555 
556  if(fVerbosity>0 && ievt_%100 == 0)
557  std::cout << "CastorMonitorModule: processed " << ievt_ << " events" << std::endl;
558 
559 
561  meEVT_->Fill(ievt_);
562 
563 
564 
565  return;
566 }
567 
568 
569 
570 
571 //=====================================================================//
572 //========================== prescale ===============================//
573 //===================================================================//
577 {
578  if (fVerbosity>0) std::cout <<"CastorMonitorModule::prescale"<<std::endl;
579 
580  gettimeofday(&psTime_.updateTV,NULL);
581  double time = (psTime_.updateTV.tv_sec*1000.0+psTime_.updateTV.tv_usec/1000.0);
582  time/= (1000.0);
583  psTime_.elapsedTime = time - psTime_.updateTime;
584  psTime_.updateTime = time;
586  bool evtPS = prescaleEvt_>0;
587  bool lsPS = prescaleLS_>0;
588  bool timePS = prescaleTime_>0;
589  bool updatePS = prescaleUpdate_>0;
590 
592  if(!evtPS && !lsPS && !timePS && !updatePS)
593  {
594  return false;
595  }
597  if(lsPS && (ilumisec_%prescaleLS_)!=0) lsPS = false; //-- LS veto
598  //if(evtPS && (ievent_%prescaleEvt_)!=0) evtPS = false; //evt # veto
599  if (evtPS && (ievt_pre_%prescaleEvt_)!=0) evtPS = false;
600  if(timePS)
601  {
602  double elapsed = (psTime_.updateTime - psTime_.vetoTime)/60.0;
603  if(elapsed<prescaleTime_){
604  timePS = false; //-- timestamp veto
605  psTime_.vetoTime = psTime_.updateTime;
606  }
607  }
608 
609  // if(prescaleUpdate_>0 && (nupdates_%prescaleUpdate_)==0) updatePS=false; ///need to define what "updates" means
610 
611  if (fVerbosity>0)
612  {
613  std::cout<<"CastorMonitorModule::prescale evt: "<<ievent_<<"/"<<evtPS<<", ";
614  std::cout <<"ls: "<<ilumisec_<<"/"<<lsPS<<",";
615  std::cout <<"time: "<<psTime_.updateTime - psTime_.vetoTime<<"/"<<timePS<<std::endl;
616  }
618  if(evtPS || lsPS || timePS) return false;
619  return true;
620 }
621 
622 
623 
624 //====================================================================//
625 //=================== CheckCastorStatus =============================//
626 //====================================================================//
629 
631  const HcalUnpackerReport& report,
632  const CastorElectronicsMap& emap,
633  const CastorDigiCollection& CastorDigi
634  )
635 {
636 
638  //vector<int> fedUnpackList;
640  // for (int i=FEDNumbering::getHcalFEDIds().first; i<=FEDNumbering::getHcalFEDIds().second; i++)
641  // {
642  // fedUnpackList.push_back(i);
643  // }
644  // for (std::vector<int>::const_iterator i=fedUnpackList.begin(); i!=fedUnpackList.end();++i)
645  // {
646  // const FEDRawData& fed = RawData.FEDData(*i);
647  // if (fed.size()<12) continue; //-- Was 16 !
649  // const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fed.data());
650  // if (!dccHeader) return;
651  // int dccid=dccHeader->getSourceId();
652 
654  // ////---- Castor FED numbering of DCCs= [690 -693]
655  // if (dccid >= 690 && dccid <=693){
656  // if ( CastorDigi.size()>0){
657  // meCASTOR_->Fill(1);
658  // }
659  // else {meCASTOR_->Fill(0); }
660  // }
661  // else{ meCASTOR_->Fill(-1); }
662  // }
663  return;
664 }
665 
669 
RunNumber_t run() const
Definition: EventID.h:42
T getParameter(std::string const &) const
EventNumber_t event() const
Definition: EventID.h:44
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * meCASTOR_
MonitorElement * meQuality_
void processEvent(const CastorRecHitCollection &castorHits, const CastorDigiCollection &cast, const CastorDbService &cond)
void endRun(const edm::Run &run, const edm::EventSetup &eventSetup)
void start()
Definition: CPUTimer.cc:74
int sector() const
get the sector (1-16)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
void analyze(const edm::Event &iEvent, const edm::EventSetup &eventSetup)
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &eventSetup)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
edm::ESHandle< CastorDbService > conditions_
int bunchCrossing() const
Definition: EventBase.h:62
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
CastorLEDMonitor * LedMon_
void reset()
Definition: CPUTimer.cc:107
#define NULL
Definition: scimark2.h:8
void beginRun(const edm::Run &iRun, const edm::EventSetup &eventSetup)
MonitorElement * meRunType_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
int module() const
get the module (1-2 for EM, 1-12 for HAD)
MonitorElement * meLatency_
edm::ESHandle< CastorPedestals > dbPedestals
float getWidth(int fCapId) const
get width for capId = 0..3
struct CastorMonitorModule::@163 psTime_
void Fill(long long x)
edm::InputTag inputLabelRaw_
tuple report
Definition: zeeHLT_cff.py:9
static const int DO_CASTOR_RECHITMON
edm::InputTag inputLabelDigi_
int iEvent
Definition: GenABIO.cc:243
std::vector< HcalGenericDetId > listEMap
CastorMonitorModule(const edm::ParameterSet &ps)
edm::InputTag inputLabelRecHitCASTOR_
T sqrt(T t)
Definition: SSEVec.h:28
CastorEventDisplay * EDMon_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
CastorMonitorSelector * evtSel_
CastorDigiMonitor * DigiMon_
Times stop()
Definition: CPUTimer.cc:94
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
MonitorElement * meFEDS_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
MonitorElement * meEvtMask_
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
void CheckCastorStatus(const FEDRawDataCollection &rawraw, const HcalUnpackerReport &report, const CastorElectronicsMap &emap, const CastorDigiCollection &castordigi)
MonitorElement * meStatus_
TimeValue_t value() const
Definition: Timestamp.cc:72
double cpuTime() const
Definition: CPUTimer.cc:157
void processEvent(const CastorRecHitCollection &castorHits)
const T & get() const
Definition: EventSetup.h:55
static const int DO_CASTOR_PED_CALIBMON
MonitorElement * CastorEventProduct
edm::EventID id() const
Definition: EventBase.h:56
CastorPSMonitor * PSMon_
CastorChannelQualityMonitor * CQMon_
void processEvent(const CastorRecHitCollection &castorHits, const CaloGeometry &caloGeometry)
void processEvent(const CastorDigiCollection &cast, const CastorDbService &cond)
float fPedestalNSigmaAverage[14][16]
CastorRecHitMonitor * RecHitMon_
tuple cout
Definition: gather_cfg.py:41
void processEvent(const CastorRecHitCollection &castorHits)
virtual void done()
void setup(const edm::ParameterSet &ps, DQMStore *dbe)
TH2F * getTH2F(void) const
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &eventSetup)
bool isValid() const
Definition: ESHandle.h:37
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:426
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
CastorHIMonitor * HIMon_
edm::Timestamp time() const
Definition: EventBase.h:57
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
void processEvent(const CastorDigiCollection &castorDigis, const CastorDbService &conditions, std::vector< HcalGenericDetId > listEMap, int iBunch, float PedSigmaInChannel[14][16])
Definition: Run.h:31
MonitorElement * meEVT_