CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
HcalMonitorModule Class Reference

#include <HcalMonitorModule.h>

Inheritance diagram for HcalMonitorModule:
edm::EDAnalyzer

Public Member Functions

 HcalMonitorModule (const edm::ParameterSet &ps)
 
 ~HcalMonitorModule ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob ()
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void CheckSubdetectorStatus (const edm::Handle< FEDRawDataCollection > &rawraw, HcalSubdetector subdet, const HcalElectronicsMap &emap)
 
void cleanup (void)
 
void endJob (void)
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 
void reset (void)
 
void setup (void)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

EtaPhiHists ChannelStatus
 
DQMStoredbe_
 
int debug_
 
const HcalElectronicsMapeMap_
 
bool enableCleanup_
 
int evtNumber_
 
edm::InputTag FEDRawDataCollection_
 
bool fedsListed_
 
int HBpresent_
 
int HEpresent_
 
int HFpresent_
 
int HOpresent_
 
int ievt_
 
bool init_
 
edm::InputTag inputLabelReport_
 
MonitorElementmeCalibType_
 
MonitorElementmeCurrentCalibType_
 
MonitorElementmeEvt_
 
MonitorElementmeEvtsVsLS_
 
MonitorElementmeFEDS_
 
MonitorElementmeHB_
 
MonitorElementmeHE_
 
MonitorElementmeHF_
 
MonitorElementmeHO_
 
MonitorElementmeIevt_
 
MonitorElementmeIevtHist_
 
MonitorElementmeOnline_
 
MonitorElementmeProcessedEndLumi_
 
bool mergeRuns_
 
MonitorElementmeRun_
 
MonitorElementmeStatus_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
int runNumber_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 28 of file HcalMonitorModule.h.

Constructor & Destructor Documentation

HcalMonitorModule::HcalMonitorModule ( const edm::ParameterSet ps)

Definition at line 59 of file HcalMonitorModule.cc.

References debug_, enableCleanup_, FEDRawDataCollection_, edm::ParameterSet::getUntrackedParameter(), init_, inputLabelReport_, mergeRuns_, NLumiBlocks_, Online_, and prefixME_.

60 { // Set initial values
61  init_=false; // first event sets up Monitor Elements and sets init_ to true
62 
63  // get ps objects
64  Online_ = ps.getUntrackedParameter<bool>("online",false);
65  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
66  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
67  debug_ = ps.getUntrackedParameter<int>("debug",0);
68 
69  FEDRawDataCollection_ = ps.getUntrackedParameter<edm::InputTag>("FEDRawDataCollection");
71 
72  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
73  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
74  prefixME_.append("/");
75 
76  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
77 
78 } // HcalMonitorModule::HcalMonitorModule
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag inputLabelReport_
edm::InputTag FEDRawDataCollection_
HcalMonitorModule::~HcalMonitorModule ( )

Definition at line 82 of file HcalMonitorModule.cc.

83 {
84 
85 } //HcalMonitorModule::~HcalMonitorModule()

Member Function Documentation

void HcalMonitorModule::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 314 of file HcalMonitorModule.cc.

References diJetCalib::calibType, CheckSubdetectorStatus(), gather_cfg::cout, FEDRawData::data(), debug_, eMap_, edm::EventID::event(), evtNumber_, f, FEDRawDataCollection_, fedsListed_, MonitorElement::Fill(), edm::Event::getByLabel(), HBpresent_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HEpresent_, HFpresent_, HOpresent_, i, edm::EventBase::id(), ievt_, init_, inputLabelReport_, LogDebug, edm::EventBase::luminosityBlock(), FEDNumbering::MAXHCALFEDID, meCalibType_, meCurrentCalibType_, meEvt_, meEvtsVsLS_, meFEDS_, meIevt_, meIevtHist_, meRun_, meStatus_, FEDNumbering::MINHCALFEDID, zeeHLT_cff::report, edm::EventID::run(), runNumber_, setup(), FEDRawData::size(), and relativeConstraints::value.

315 {
316  if (!init_) this->setup();
317 
318  LogDebug("HcalMonitorModule")<<"processing event "<<ievt_;
319 
320  // Fill Monitor Elements with run, evt, processed event info
321  ++ievt_;
322  runNumber_=e.id().run();
323  evtNumber_=e.id().event();
324  if (meRun_) meRun_->Fill(runNumber_);
325  if (meEvt_) meEvt_->Fill(evtNumber_);
326  if (meIevt_) meIevt_->Fill(ievt_);
327  if (meIevtHist_) meIevtHist_->Fill(1);
329  if (ievt_==1)
330  {
331  LogDebug("HcalMonitorModule") << "processing run " << runNumber_;
332  // begin-of-run
333  if ( meStatus_ ) meStatus_->Fill(0);
334  }
335  else
336  {
337  // running
338  if ( meStatus_ ) meStatus_->Fill(1);
339  }
340 
341  // Try to get raw data
343  if (!(e.getByLabel(FEDRawDataCollection_,rawraw)))
344  {
345  edm::LogWarning("HcalMonitorModule")<<" raw data with label "<<FEDRawDataCollection_ <<" not available";
346  return;
347  }
348 
349  // Get Event Calibration Type -- copy of Bryan Dahmes' filter
350  int calibType=-1;
351  int numEmptyFEDs = 0 ;
352  std::vector<int> calibTypeCounter(8,0) ;
354  {
355  const FEDRawData& fedData = rawraw->FEDData(i) ;
356 
357  if ( fedData.size() < 24 ) numEmptyFEDs++ ;
358  if ( fedData.size() < 24 ) continue;
359 
360  int value = (int)((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
361  if(value>7)
362  {
363  edm::LogWarning("HcalMonitorModule::CalibTypeFilter") << "Unexpected Calibration type: "<< value << " in FED: "<<i<<" (should be 0-7). I am bailing out...";
364  return;
365  }
366 
367  calibTypeCounter.at(value)++ ; // increment the counter for this calib type
368  } // for (int i = FEDNumbering::MINHCALFEDID; ...)
369 
370  int maxCount = 0;
371  int numberOfFEDIds = FEDNumbering::MAXHCALFEDID - FEDNumbering::MINHCALFEDID + 1 ;
372  for (unsigned int i=0; i<calibTypeCounter.size(); i++) {
373  if ( calibTypeCounter.at(i) > maxCount )
374  { calibType = i ; maxCount = calibTypeCounter.at(i) ; }
375  if ( maxCount == numberOfFEDIds ) break ;
376  }
377 
378  if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
379  edm::LogWarning("HcalMonitorModule::CalibTypeFilter") << "Conflicting calibration types found. Assigning type "
380  << calibType ;
381  LogDebug("HcalMonitorModule::CalibTypeFilter") << "Calibration type is: " << calibType ;
382  // Fill histogram of calibration types, as well as integer to keep track of current value
383  if (meCalibType_) meCalibType_->Fill(calibType);
386 
387  if (debug_>2) std::cout <<"\t<HcalMonitorModule> ievt = "<<ievt_<<" calibration type = "<<calibType<<std::endl;
388 
389  // Check to see which subdetectors are present.
390  // May only need to do this on first event? Subdets don't appear during a run?
391  if (HBpresent_==0)
393  if (HEpresent_==0)
395  if (HOpresent_==0)
397  if (HFpresent_==0)
399 
400  // Here, we do need this information each event
402  if (!(e.getByLabel(inputLabelReport_,report)))
403  {
404  edm::LogWarning("HcalMonitorModule")<<" Unpacker Report "<<inputLabelReport_<<" not available";
405  return;
406  }
407 
408  if (!fedsListed_)
409  {
410  const std::vector<int> feds = (*report).getFedsUnpacked();
411  for(unsigned int f=0; f<feds.size(); ++f)
412  meFEDS_->Fill(feds[f]);
413  fedsListed_ = true;
414  } // if (!fedsListed_)
415 
416 } // void HcalMonitorModule::analyze(...)
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
int i
Definition: DBlmapReader.cc:9
MonitorElement * meStatus_
edm::InputTag inputLabelReport_
edm::InputTag FEDRawDataCollection_
tuple calibType
Definition: diJetCalib.py:20
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
MonitorElement * meEvt_
void CheckSubdetectorStatus(const edm::Handle< FEDRawDataCollection > &rawraw, HcalSubdetector subdet, const HcalElectronicsMap &emap)
MonitorElement * meCurrentCalibType_
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
const HcalElectronicsMap * eMap_
void Fill(long long x)
MonitorElement * meCalibType_
tuple report
Definition: zeeHLT_cff.py:9
MonitorElement * meFEDS_
double f[11][100]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
MonitorElement * meIevt_
MonitorElement * meRun_
edm::EventID id() const
Definition: EventBase.h:56
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meEvtsVsLS_
void HcalMonitorModule::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 89 of file HcalMonitorModule.cc.

References gather_cfg::cout, dbe_, debug_, eMap_, fedsListed_, HBpresent_, HEpresent_, HFpresent_, HOpresent_, ievt_, meCalibType_, meEvtsVsLS_, meFEDS_, meHB_, meHE_, meHF_, meHO_, meIevt_, meIevtHist_, meProcessedEndLumi_, and cppFunctionSkipper::operator.

90 {
91  if (debug_>0) std::cout <<"HcalMonitorModule::beginJob()"<<std::endl;
92  // Get DQM service
94  // set default values
95  ievt_=0;
96  fedsListed_=false;
97  HBpresent_=0;
98  HEpresent_=0;
99  HOpresent_=0;
100  HFpresent_=0;
101  // Set pointers to null
102  meCalibType_=0;
103  meFEDS_=0;
104  meIevt_=0;
105  meIevtHist_=0;
106  meEvtsVsLS_=0;
108  meHB_=0;
109  meHE_=0;
110  meHO_=0;
111  meHF_=0;
112  eMap_=0;
113 }
MonitorElement * meHB_
MonitorElement * meHO_
MonitorElement * meProcessedEndLumi_
const HcalElectronicsMap * eMap_
MonitorElement * meCalibType_
MonitorElement * meFEDS_
MonitorElement * meHE_
MonitorElement * meIevt_
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meHF_
MonitorElement * meEvtsVsLS_
void HcalMonitorModule::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 279 of file HcalMonitorModule.cc.

References gather_cfg::cout, and debug_.

281 {
282  if (debug_>0) std::cout <<"HcalMonitorModule::beginLuminosityBlock"<<std::endl;
283 }// void HcalMonitorModule::beginLuminosityBlock(...)
tuple cout
Definition: gather_cfg.py:121
void HcalMonitorModule::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 115 of file HcalMonitorModule.cc.

References gather_cfg::cout, debug_, eMap_, edm::EventSetup::get(), mergeRuns_, reset(), and setup().

116 {
117  if ( debug_>0 ) std::cout << "HcalMonitorModule: beginRun" << std::endl;
118  // reset histograms & counters on a new run, unless merging allowed
119 
120  if (eMap_==0) //eMap_ not created yet
121  {
122  if (debug_>1) std::cout <<"\t<HcalMonitorModule::beginRun> Getting Emap!"<<std::endl;
124  c.get<HcalDbRecord>().get( pSetup );
125  eMap_=pSetup->getHcalMapping();
126  }
127  if (mergeRuns_) return;
128  this->setup();
129  this->reset();
130 
131 } //HcalMonitorModule::beginRun(....)
const HcalElectronicsMap * eMap_
const T & get() const
Definition: EventSetup.h:55
tuple cout
Definition: gather_cfg.py:121
void HcalMonitorModule::CheckSubdetectorStatus ( const edm::Handle< FEDRawDataCollection > &  rawraw,
HcalSubdetector  subdet,
const HcalElectronicsMap emap 
)
protected

Definition at line 420 of file HcalMonitorModule.cc.

References HcalHTRData::check(), gather_cfg::cout, FEDRawData::data(), debug_, MonitorElement::Fill(), HcalDCCHeader::getSourceId(), HcalDCCHeader::getSpigotData(), HcalDCCHeader::getSpigotPresent(), HBpresent_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HEpresent_, HFpresent_, HOpresent_, HcalHTRData::htrSlot(), HcalHTRData::htrTopBottom(), i, HcalHTRData::isHistogramEvent(), HcalElectronicsMap::lookup(), FEDNumbering::MAXHCALFEDID, meHB_, meHE_, meHF_, meHO_, FEDNumbering::MINHCALFEDID, DetId::null(), HcalHTRData::readoutVMECrateId(), HcalElectronicsId::setHTR(), FEDRawData::size(), HcalDCCHeader::SPIGOT_COUNT, and DetId::subdetId().

Referenced by analyze().

423 {
424 
425  std::vector<int> fedUnpackList;
426  for (int i=FEDNumbering::MINHCALFEDID;
428  i++)
429  fedUnpackList.push_back(i);
430 
431  if (debug_>1) std::cout <<"<HcalMonitorModule::CheckSubdetectorStatus> Checking subdetector "<<subdet<<std::endl;
432  for (std::vector<int>::const_iterator i=fedUnpackList.begin();
433  i!=fedUnpackList.end();
434  ++i)
435  {
436  if (debug_>2) std::cout <<"\t<HcalMonitorModule::CheckSubdetectorStatus> FED = "<<*i<<std::endl;
437  const FEDRawData& fed =(*rawraw).FEDData(*i);
438  if (fed.size()<12) continue; // Was 16. How do such tiny events even get here?
439 
440  // get the DCC header
441  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fed.data());
442  if (!dccHeader) return;
443  int dccid=dccHeader->getSourceId();
444  // check for HF
445  if (subdet == HcalForward && dccid>717 && dccid<724)
446  {
447  HFpresent_=1;
449  return;
450  }
451  else if (subdet==HcalOuter && dccid>723)
452  {
453  HOpresent_=1;
455  return;
456  }
457  else if (dccid<718 && (subdet==HcalBarrel || subdet==HcalEndcap))
458  {
459  HcalHTRData htr;
460  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++)
461  {
462  if (!dccHeader->getSpigotPresent(spigot)) continue;
463 
464  // Load the given decoder with the pointer and length from this spigot.
465  dccHeader->getSpigotData(spigot,htr, fed.size());
466 
467  // check min length, correct wordcount, empty event, or total length if histo event.
468  if (!htr.check()) continue;
469  if (htr.isHistogramEvent()) continue;
470 
471  int firstFED = FEDNumbering::MINHCALFEDID;
472 
473  // Tease out HB and HE, which share HTRs in HBHE
474  for(int fchan=0; fchan<3; ++fchan) //0,1,2 are valid
475  {
476  for(int fib=1; fib<9; ++fib) //1...8 are valid
477  {
478  HcalElectronicsId eid(fchan,fib,spigot,dccid-firstFED);
479  eid.setHTR(htr.readoutVMECrateId(),
480  htr.htrSlot(),htr.htrTopBottom());
481 
482  DetId did=emap.lookup(eid);
483  if (!did.null())
484  {
485 
486  if ((HcalSubdetector)did.subdetId()==subdet)
487  {
488  if (subdet==HcalBarrel)
489  {
490  HBpresent_=1;
492  return;
493  }
494  else if (subdet==HcalEndcap)
495  {
496  HEpresent_=1;
498  return;
499  }
500  } // if ((HcalSubdetector)did.subdetId()==subdet)
501  } // if (!did.null())
502  } // for (int fib=1;fib<9;...)
503  } // for (int fchan=0; fchan<3;...)
504  } // for (int spigot=0;spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++)
505  } //else if (dcc<718 && (subdet...))
506  } // loop over fedUnpackList
507 
508 
509 } // void HcalMonitorModule::CheckSubdetectorStatus(...)
int i
Definition: DBlmapReader.cc:9
MonitorElement * meHB_
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
Definition: HcalHTRData.cc:64
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
Definition: HcalHTRData.cc:344
MonitorElement * meHO_
int getSpigotData(int nspigot, HcalHTRData &decodeTool, int validSize) const
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:49
void Fill(long long x)
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
Definition: HcalHTRData.cc:340
HcalSubdetector
Definition: HcalAssistant.h:32
bool getSpigotPresent(unsigned int nspigot) const
Read the &quot;PRESENT&quot; bit for this spigot.
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
MonitorElement * meHE_
int getSourceId() const
Definition: HcalDCCHeader.h:34
Definition: DetId.h:20
bool null() const
is this a null id ?
Definition: DetId.h:47
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
Definition: HcalHTRData.cc:348
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:21
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meHF_
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
Definition: HcalHTRData.cc:387
void HcalMonitorModule::cleanup ( void  )
protected

Definition at line 219 of file HcalMonitorModule.cc.

References gather_cfg::cout, dbe_, debug_, enableCleanup_, fedsListed_, MonitorElement::getName(), HBpresent_, HEpresent_, HFpresent_, HOpresent_, init_, meCalibType_, meCurrentCalibType_, meEvt_, meFEDS_, meHB_, meHE_, meHF_, meHO_, meIevt_, meIevtHist_, meProcessedEndLumi_, meRun_, meStatus_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

220 {
221  if (debug_>0) std::cout <<"HcalMonitorModule::cleanup"<<std::endl;
222  if (!enableCleanup_) return;
223  if (dbe_)
224  {
225  dbe_->setCurrentFolder(prefixME_+"HcalInfo");
226  if ( meStatus_ )
228  meStatus_ = 0;
229  if ( meRun_ )
231  meRun_ = 0;
232  if ( meEvt_ )
234  meEvt_ = 0;
235  if (meIevt_)
237  meIevt_=0;
238  if (meIevtHist_)
240  meIevtHist_=0;
241  if (meFEDS_)
243  meFEDS_ = 0;
244  if (meCalibType_)
246  meCalibType_ = 0;
247  if (meCurrentCalibType_)
250  if (meProcessedEndLumi_)
253  if (meHB_)
255  meHB_=0;
256 
257  if (meHE_)
259  meHE_=0;
260  if (meHO_)
262  meHO_=0;
263  if (meHF_)
265  meHF_=0;
266  } // if (dbe_)
267 
268  fedsListed_=false;
269  HBpresent_=0;
270  HEpresent_=0;
271  HOpresent_=0;
272  HFpresent_=0;
273  init_=false;
274 
275 } // void HcalMonitorModule::cleanup(void)
const std::string & getName(void) const
get name of ME
MonitorElement * meStatus_
MonitorElement * meHB_
MonitorElement * meHO_
MonitorElement * meEvt_
MonitorElement * meProcessedEndLumi_
MonitorElement * meCurrentCalibType_
MonitorElement * meCalibType_
MonitorElement * meFEDS_
void removeElement(const std::string &name)
Definition: DQMStore.cc:2572
MonitorElement * meHE_
MonitorElement * meIevt_
MonitorElement * meRun_
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meHF_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void HcalMonitorModule::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 297 of file HcalMonitorModule.cc.

References cleanup(), gather_cfg::cout, dbe_, debug_, evtNumber_, MonitorElement::Fill(), DQMStore::get(), init_, meEvt_, meRun_, meStatus_, prefixME_, and runNumber_.

298 {
299  if (debug_>0) std::cout <<"HcalMonitorModule::endJob()"<<std::endl;
300  if (dbe_)
301  {
302  meStatus_ = dbe_->get(prefixME_ + "/EventInfo/STATUS");
303  meRun_ = dbe_->get(prefixME_ + "/EventInfo/RUN");
304  meEvt_ = dbe_->get(prefixME_ + "/EventInfo/EVT");
305  }
306  if (meStatus_) meStatus_->Fill(2);
307  if (meRun_) meRun_->Fill(runNumber_);
308  if (meEvt_) meEvt_->Fill(evtNumber_);
309  if (init_) this->cleanup();
310 } // void HcalMonitorModule::endJob(void)
MonitorElement * meStatus_
MonitorElement * meEvt_
void Fill(long long x)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1468
MonitorElement * meRun_
tuple cout
Definition: gather_cfg.py:121
void HcalMonitorModule::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 288 of file HcalMonitorModule.cc.

References gather_cfg::cout, debug_, MonitorElement::Fill(), edm::LuminosityBlockBase::luminosityBlock(), and meProcessedEndLumi_.

290 {
291  if (debug_>0) std::cout <<"HcalMonitorModule::endLuminosityBlock"<<std::endl;
293 }// void HcalMonitorModule::endLuminosityBlock(...)
MonitorElement * meProcessedEndLumi_
void Fill(long long x)
LuminosityBlockNumber_t luminosityBlock() const
tuple cout
Definition: gather_cfg.py:121
void HcalMonitorModule::endRun ( const edm::Run run,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 134 of file HcalMonitorModule.cc.

References gather_cfg::cout, debug_, evtNumber_, MonitorElement::Fill(), meEvt_, meRun_, meStatus_, and runNumber_.

134  {
135 
136  if ( debug_>0 ) std::cout << "HcalMonitorModule: endRun" << std::endl;
137 
138  // end-of-run
139  if ( meStatus_ ) meStatus_->Fill(2);
140 
141  if ( meRun_ ) meRun_->Fill(runNumber_);
142  if ( meEvt_ ) meEvt_->Fill(evtNumber_);
143 }
MonitorElement * meStatus_
MonitorElement * meEvt_
void Fill(long long x)
MonitorElement * meRun_
tuple cout
Definition: gather_cfg.py:121
void HcalMonitorModule::reset ( void  )
protected

Definition at line 145 of file HcalMonitorModule.cc.

References gather_cfg::cout, debug_, fedsListed_, MonitorElement::Fill(), HBpresent_, HEpresent_, HFpresent_, HOpresent_, ievt_, meCalibType_, meEvtsVsLS_, meFEDS_, meHB_, meHE_, meHF_, meHO_, meIevt_, meIevtHist_, meProcessedEndLumi_, and MonitorElement::Reset().

Referenced by beginRun().

146 {
147  if (debug_>0) std::cout <<"HcalMonitorModule::reset"<<std::endl;
148  // Call Reset() on all MonitorElement histograms
150  if (meFEDS_) meFEDS_->Reset();
151  if (meIevt_) meIevt_->Fill(0);
152  if (meIevtHist_) meIevtHist_->Reset();
153  if (meEvtsVsLS_) meEvtsVsLS_->Reset();
154  ievt_=0;
156  if (meHB_) meHB_->Fill(-1);
157  if (meHE_) meHE_->Fill(-1);
158  if (meHO_) meHO_->Fill(-1);
159  if (meHF_) meHF_->Fill(-1);
160  HBpresent_=0;
161  HEpresent_=0;
162  HOpresent_=0;
163  HFpresent_=0;
164  fedsListed_=false;
165 } // void HcalMonitorModule::reset(void)
MonitorElement * meHB_
MonitorElement * meHO_
MonitorElement * meProcessedEndLumi_
void Fill(long long x)
MonitorElement * meCalibType_
MonitorElement * meFEDS_
MonitorElement * meHE_
MonitorElement * meIevt_
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meHF_
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meEvtsVsLS_
void HcalMonitorModule::setup ( void  )
protected

Definition at line 167 of file HcalMonitorModule.cc.

References DQMStore::book1D(), DQMStore::bookInt(), gather_cfg::cout, dbe_, debug_, MonitorElement::Fill(), init_, FEDNumbering::MAXHCALFEDID, meCalibType_, meCurrentCalibType_, meEvt_, meEvtsVsLS_, meFEDS_, meHB_, meHE_, meHF_, meHO_, meIevt_, meIevtHist_, meOnline_, meProcessedEndLumi_, meRun_, meStatus_, FEDNumbering::MINHCALFEDID, NLumiBlocks_, Online_, prefixME_, MonitorElement::setBinLabel(), and DQMStore::setCurrentFolder().

Referenced by analyze(), and beginRun().

168 {
169  // Run this on first event in run; set up all necessary monitor elements
170  if (debug_>0) std::cout <<"HcalMonitorModule::setup"<<std::endl;
171  init_=true;
172  if (dbe_)
173  {
174  dbe_->setCurrentFolder(prefixME_+"HcalInfo");
175  meStatus_ = dbe_->bookInt("STATUS");
176  if (meStatus_) meStatus_->Fill(-1);
177  meRun_ = dbe_->bookInt("RUN");
178  if (meRun_) meRun_->Fill(-1);
179  meEvt_ = dbe_->bookInt("EVT");
180  if (meEvt_) meEvt_->Fill(-1);
181  meIevt_ = dbe_->bookInt("EventsProcessed");
182  if (meIevt_) meIevt_->Fill(-1);
183  meIevtHist_ = dbe_->book1D("EventsInHcalMonitorModule","Events Seen by HcalMonitorModule",1,0.5,1.5);
184  meIevtHist_->setBinLabel(1,"Nevents",1);
185  meEvtsVsLS_ = dbe_->book1D("EventsVsLS","Events vs. Luminosity Section;LS;# events",NLumiBlocks_,0.5,NLumiBlocks_+0.5);
186  meOnline_ = dbe_->bookInt("Online");
187  meOnline_->Fill((int)Online_);
188  meProcessedEndLumi_ = dbe_->bookInt("EndLumiBlock_MonitorModule");
190  meCurrentCalibType_= dbe_->bookInt("CURRENT_EVENT_TYPE");
192 
193  meHB_ = dbe_->bookInt("HBpresent");
194  meHE_ = dbe_->bookInt("HEpresent");
195  meHO_ = dbe_->bookInt("HOpresent");
196  meHF_ = dbe_->bookInt("HFpresent");
197  if (meHB_) meHB_->Fill(-1);
198  if (meHE_) meHE_->Fill(-1);
199  if (meHO_) meHO_->Fill(-1);
200  if (meHF_) meHF_->Fill(-1);
201 
202  meFEDS_ = dbe_->book1D("FEDs Unpacked","FEDs Unpacked; Hcal FEDs 700-731",1+(FEDNumbering::MAXHCALFEDID-FEDNumbering::MINHCALFEDID),FEDNumbering::MINHCALFEDID-0.5,FEDNumbering::MAXHCALFEDID+0.5);
203 
204  meCalibType_ = dbe_->book1D("CalibrationType","Calibration Type",9,-0.5,8.5);
205  meCalibType_->setBinLabel(1,"Normal",1);
206  meCalibType_->setBinLabel(2,"Ped",1);
207  meCalibType_->setBinLabel(3,"RADDAM",1);
208  meCalibType_->setBinLabel(4,"HBHEHPD",1);
209  meCalibType_->setBinLabel(5,"HOHPD",1);
210  meCalibType_->setBinLabel(6,"HFPMT",1);
211  meCalibType_->setBinLabel(7,"ZDC",1);
212  meCalibType_->setBinLabel(8,"CASTOR",1);
213 
214  } // if (dbe_)
215  return;
216 } // void HcalMonitorModule::setup(void)
MonitorElement * meStatus_
MonitorElement * meHB_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * meHO_
MonitorElement * meEvt_
MonitorElement * meProcessedEndLumi_
MonitorElement * meCurrentCalibType_
void Fill(long long x)
MonitorElement * meCalibType_
MonitorElement * meFEDS_
MonitorElement * meHE_
MonitorElement * meIevt_
MonitorElement * meRun_
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meHF_
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:624
MonitorElement * meOnline_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
MonitorElement * meEvtsVsLS_

Member Data Documentation

EtaPhiHists HcalMonitorModule::ChannelStatus
private

Definition at line 116 of file HcalMonitorModule.h.

DQMStore* HcalMonitorModule::dbe_
private

Definition at line 113 of file HcalMonitorModule.h.

Referenced by beginJob(), cleanup(), endJob(), and setup().

int HcalMonitorModule::debug_
private
const HcalElectronicsMap* HcalMonitorModule::eMap_
private

Definition at line 115 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), and beginRun().

bool HcalMonitorModule::enableCleanup_
private

Definition at line 104 of file HcalMonitorModule.h.

Referenced by cleanup(), and HcalMonitorModule().

int HcalMonitorModule::evtNumber_
private

Definition at line 82 of file HcalMonitorModule.h.

Referenced by analyze(), endJob(), and endRun().

edm::InputTag HcalMonitorModule::FEDRawDataCollection_
private

Definition at line 107 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

bool HcalMonitorModule::fedsListed_
private

Definition at line 100 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), cleanup(), and reset().

int HcalMonitorModule::HBpresent_
private

Definition at line 112 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), CheckSubdetectorStatus(), cleanup(), and reset().

int HcalMonitorModule::HEpresent_
private

Definition at line 112 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), CheckSubdetectorStatus(), cleanup(), and reset().

int HcalMonitorModule::HFpresent_
private

Definition at line 112 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), CheckSubdetectorStatus(), cleanup(), and reset().

int HcalMonitorModule::HOpresent_
private

Definition at line 112 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), CheckSubdetectorStatus(), cleanup(), and reset().

int HcalMonitorModule::ievt_
private

Definition at line 80 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), and reset().

bool HcalMonitorModule::init_
private

Definition at line 106 of file HcalMonitorModule.h.

Referenced by analyze(), cleanup(), endJob(), HcalMonitorModule(), and setup().

edm::InputTag HcalMonitorModule::inputLabelReport_
private

Definition at line 108 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

MonitorElement* HcalMonitorModule::meCalibType_
private

Definition at line 88 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meCurrentCalibType_
private

Definition at line 89 of file HcalMonitorModule.h.

Referenced by analyze(), cleanup(), and setup().

MonitorElement* HcalMonitorModule::meEvt_
private

Definition at line 86 of file HcalMonitorModule.h.

Referenced by analyze(), cleanup(), endJob(), endRun(), and setup().

MonitorElement* HcalMonitorModule::meEvtsVsLS_
private

Definition at line 96 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), reset(), and setup().

MonitorElement* HcalMonitorModule::meFEDS_
private

Definition at line 87 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meHB_
private

Definition at line 90 of file HcalMonitorModule.h.

Referenced by beginJob(), CheckSubdetectorStatus(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meHE_
private

Definition at line 91 of file HcalMonitorModule.h.

Referenced by beginJob(), CheckSubdetectorStatus(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meHF_
private

Definition at line 93 of file HcalMonitorModule.h.

Referenced by beginJob(), CheckSubdetectorStatus(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meHO_
private

Definition at line 92 of file HcalMonitorModule.h.

Referenced by beginJob(), CheckSubdetectorStatus(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meIevt_
private

Definition at line 94 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meIevtHist_
private

Definition at line 95 of file HcalMonitorModule.h.

Referenced by analyze(), beginJob(), cleanup(), reset(), and setup().

MonitorElement* HcalMonitorModule::meOnline_
private

Definition at line 98 of file HcalMonitorModule.h.

Referenced by setup().

MonitorElement* HcalMonitorModule::meProcessedEndLumi_
private

Definition at line 97 of file HcalMonitorModule.h.

Referenced by beginJob(), cleanup(), endLuminosityBlock(), reset(), and setup().

bool HcalMonitorModule::mergeRuns_
private

Definition at line 103 of file HcalMonitorModule.h.

Referenced by beginRun(), and HcalMonitorModule().

MonitorElement* HcalMonitorModule::meRun_
private

Definition at line 85 of file HcalMonitorModule.h.

Referenced by analyze(), cleanup(), endJob(), endRun(), and setup().

MonitorElement* HcalMonitorModule::meStatus_
private

Definition at line 84 of file HcalMonitorModule.h.

Referenced by analyze(), cleanup(), endJob(), endRun(), and setup().

int HcalMonitorModule::NLumiBlocks_
private

Definition at line 110 of file HcalMonitorModule.h.

Referenced by HcalMonitorModule(), and setup().

bool HcalMonitorModule::Online_
private

Definition at line 102 of file HcalMonitorModule.h.

Referenced by HcalMonitorModule(), and setup().

std::string HcalMonitorModule::prefixME_
private

Definition at line 109 of file HcalMonitorModule.h.

Referenced by cleanup(), endJob(), HcalMonitorModule(), and setup().

int HcalMonitorModule::runNumber_
private

Definition at line 81 of file HcalMonitorModule.h.

Referenced by analyze(), endJob(), and endRun().