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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 HcalMonitorModule (const edm::ParameterSet &ps)
 
 ~HcalMonitorModule ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void CheckSubdetectorStatus (const edm::Handle< FEDRawDataCollection > &rawraw, HcalSubdetector subdet, const HcalElectronicsMap &emap)
 
void cleanup (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 (DQMStore::IBooker &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

EtaPhiHists ChannelStatus
 
int debug_
 
const HcalElectronicsMapeMap_
 
bool enableCleanup_
 
edm::EventNumber_t evtNumber_
 
edm::InputTag FEDRawDataCollection_
 
bool fedsListed_
 
int HBpresent_
 
int HEpresent_
 
int HFpresent_
 
int HOpresent_
 
int ievt_
 
edm::InputTag inputLabelReport_
 
MonitorElementmeCalibType_
 
MonitorElementmeCurrentCalibType_
 
MonitorElementmeEvt_
 
MonitorElementmeEvtsVsLS_
 
MonitorElementmeFEDS_
 
MonitorElementmeHB_
 
MonitorElementmeHE_
 
MonitorElementmeHF_
 
MonitorElementmeHO_
 
MonitorElementmeIevt_
 
MonitorElementmeIevtHist_
 
MonitorElementmeOnline_
 
MonitorElementmeProcessedEndLumi_
 
bool mergeRuns_
 
MonitorElementmeRun_
 
MonitorElementmeStatus_
 
MonitorElementmeUTCAFEDS_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
edm::RunNumber_t runNumber_
 
edm::EDGetTokenT
< FEDRawDataCollection
tok_raw_
 
edm::EDGetTokenT
< HcalUnpackerReport
tok_report_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 28 of file HcalMonitorModule.h.

Constructor & Destructor Documentation

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

Definition at line 55 of file HcalMonitorModule.cc.

References debug_, eMap_, enableCleanup_, FEDRawDataCollection_, fedsListed_, edm::ParameterSet::getUntrackedParameter(), HBpresent_, HEpresent_, HFpresent_, HOpresent_, ievt_, inputLabelReport_, meCalibType_, meEvtsVsLS_, meFEDS_, meHB_, meHE_, meHF_, meHO_, meIevt_, meIevtHist_, meProcessedEndLumi_, mergeRuns_, meUTCAFEDS_, NLumiBlocks_, Online_, prefixME_, AlCaHLTBitMon_QueryRunRegistry::string, tok_raw_, and tok_report_.

56 { // Set initial values
57 
58  // get ps objects
59  Online_ = ps.getUntrackedParameter<bool>("online",false);
60  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
61  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
62  debug_ = ps.getUntrackedParameter<int>("debug",0);
63 
64  FEDRawDataCollection_ = ps.getUntrackedParameter<edm::InputTag>("FEDRawDataCollection");
65  tok_raw_ = consumes<FEDRawDataCollection>(FEDRawDataCollection_);
66 
68  tok_report_ = consumes<HcalUnpackerReport>(inputLabelReport_);
69 
70  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
71  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
72  prefixME_.append("/");
73 
74  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
75 
76  // beginJob contents
77  // set default values
78  ievt_=0;
79  fedsListed_=false;
80  HBpresent_=0;
81  HEpresent_=0;
82  HOpresent_=0;
83  HFpresent_=0;
84  // Set pointers to null
85  meCalibType_=0;
86  meFEDS_=0;
87  meUTCAFEDS_=0;
88  meIevt_=0;
89  meIevtHist_=0;
90  meEvtsVsLS_=0;
92  meHB_=0;
93  meHE_=0;
94  meHO_=0;
95  meHF_=0;
96  eMap_=0;
97 
98 } // HcalMonitorModule::HcalMonitorModule
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag inputLabelReport_
MonitorElement * meHB_
edm::InputTag FEDRawDataCollection_
MonitorElement * meHO_
MonitorElement * meProcessedEndLumi_
const HcalElectronicsMap * eMap_
MonitorElement * meCalibType_
MonitorElement * meFEDS_
MonitorElement * meUTCAFEDS_
MonitorElement * meHE_
MonitorElement * meIevt_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
MonitorElement * meIevtHist_
MonitorElement * meHF_
edm::EDGetTokenT< HcalUnpackerReport > tok_report_
MonitorElement * meEvtsVsLS_
HcalMonitorModule::~HcalMonitorModule ( )

Definition at line 102 of file HcalMonitorModule.cc.

103 {
104 
105 } //HcalMonitorModule::~HcalMonitorModule()

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 243 of file HcalMonitorModule.cc.

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

244 {
245 
246  LogDebug("HcalMonitorModule")<<"processing event "<<ievt_;
247 
248  // Fill Monitor Elements with run, evt, processed event info
249  ++ievt_;
250  runNumber_=e.id().run();
251  evtNumber_=e.id().event();
252  if (meRun_) meRun_->Fill(runNumber_);
253  if (meEvt_) meEvt_->Fill(evtNumber_);
254  if (meIevt_) meIevt_->Fill(ievt_);
255  if (meIevtHist_) meIevtHist_->Fill(1);
257  if (ievt_==1)
258  {
259  LogDebug("HcalMonitorModule") << "processing run " << runNumber_;
260  // begin-of-run
261  if ( meStatus_ ) meStatus_->Fill(0);
262  }
263  else
264  {
265  // running
266  if ( meStatus_ ) meStatus_->Fill(1);
267  }
268 
269  // Try to get raw data
271  if (!(e.getByToken(tok_raw_,rawraw)))
272  {
273  edm::LogWarning("HcalMonitorModule")<<" raw data with label "<<FEDRawDataCollection_ <<" not available";
274  return;
275  }
276 
277  // Get Event Calibration Type -- copy of Bryan Dahmes' filter
278  int calibType=-1;
279  int numEmptyFEDs = 0 ;
280  std::vector<int> calibTypeCounter(8,0) ;
281  for(int i = FEDNumbering::MINHCALFEDID;
283  {
285  continue;
286 
287  if (debug_>0)
288  std::cout << "### Processin FED: " << i << std::endl;
289 
290  const FEDRawData& fedData = rawraw->FEDData(i) ;
291 
292  if ( fedData.size() < 24 ) numEmptyFEDs++ ;
293  if ( fedData.size() < 24 ) continue;
294 
295  int value = (int)((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
296  if (debug_>0)
297  std::cout << "### FED: " << i << " CalibType: " << value
298  << std::endl;
299 
300  if(value>7)
301  {
302  edm::LogWarning("HcalMonitorModule::CalibTypeFilter") << "Unexpected Calibration type: "<< value << " in FED: "<< i <<" (should be 0-7). I am bailing out...";
303  return;
304  }
305 
306  calibTypeCounter.at(value)++ ; // increment the counter for this calib type
307  } // for (int i = FEDNumbering::MINHCALFEDID; ...)
308 
309  int maxCount = 0;
310  int numberOfFEDIds = (FEDNumbering::MAXHCALFEDID-FEDNumbering::MINHCALFEDID+1) +
312  if (debug_>0)
313  std::cout << "numberOfFEDIds=" << numberOfFEDIds << std::endl
314  << "number of emptyFEDs=" << numEmptyFEDs << std::endl;
315  for (unsigned int i=0; i<calibTypeCounter.size(); i++) {
316  if ( calibTypeCounter.at(i) > maxCount )
317  { calibType = i ; maxCount = calibTypeCounter.at(i) ; }
318  if ( maxCount == numberOfFEDIds ) break ;
319  }
320 
321  if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
322  edm::LogWarning("HcalMonitorModule::CalibTypeFilter") << "Conflicting calibration types found. Assigning type "
323  << calibType ;
324  LogDebug("HcalMonitorModule::CalibTypeFilter") << "Calibration type is: " << calibType ;
325  // Fill histogram of calibration types, as well as integer to keep track of current value
326  if (meCalibType_) meCalibType_->Fill(calibType);
329 
330  if (debug_>2) std::cout <<"\t<HcalMonitorModule> ievt = "<<ievt_<<" calibration type = "<<calibType<<std::endl;
331 
332  // Check to see which subdetectors are present.
333  // May only need to do this on first event? Subdets don't appear during a run?
334  if (HBpresent_==0)
336  if (HEpresent_==0)
338  if (HOpresent_==0)
340  if (HFpresent_==0)
342 
343  // Here, we do need this information each event
345 // edm::Handle<HcalUnpackerReport> reportUTCA;
346 /* if (!(e.getByToken(tok_reportUTCA_, reportUTCA)));
347  {
348  edm::LogWarning("HcalMonitorModule") << "uTCA Unpacker Report "
349  << inputLabelReportUTCA_ << " not availalbe";
350  return;
351  }*/
352  if (!(e.getByToken(tok_report_,report)))
353  {
354  edm::LogWarning("HcalMonitorModule")<<" Unpacker Report "<<inputLabelReport_<<" not available";
355  return;
356  }
357 
358  if (!fedsListed_)
359  {
360  const std::vector<int> feds = (*report).getFedsUnpacked();
361  for(unsigned int f=0; f<feds.size(); ++f)
362  if (feds[f]<1118)
363  meFEDS_->Fill(feds[f]);
364  else
365  meUTCAFEDS_->Fill(feds[f]);
366  fedsListed_ = true;
367  } // if (!fedsListed_)
368 
369 } // void HcalMonitorModule::analyze(...)
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:39
EventNumber_t event() const
Definition: EventID.h:41
int i
Definition: DBlmapReader.cc:9
MonitorElement * meStatus_
edm::InputTag inputLabelReport_
edm::InputTag FEDRawDataCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
tuple calibType
Definition: diJetCalib.py:20
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:62
edm::EventNumber_t evtNumber_
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:47
const HcalElectronicsMap * eMap_
void Fill(long long x)
MonitorElement * meCalibType_
tuple report
Definition: zeeHLT_cff.py:9
MonitorElement * meFEDS_
double f[11][100]
MonitorElement * meUTCAFEDS_
MonitorElement * meIevt_
edm::RunNumber_t runNumber_
MonitorElement * meRun_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
edm::EventID id() const
Definition: EventBase.h:59
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:145
edm::EDGetTokenT< HcalUnpackerReport > tok_report_
MonitorElement * meEvtsVsLS_
void HcalMonitorModule::bookHistograms ( DQMStore::IBooker ib,
edm::Run const &  r,
edm::EventSetup const &  c 
)
virtual

Implements DQMEDAnalyzer.

Definition at line 126 of file HcalMonitorModule.cc.

References setup().

127 {
128  this->setup(ib);
129 } //HcalMonitorModule::beginRun(....)
void setup(DQMStore::IBooker &)
void HcalMonitorModule::CheckSubdetectorStatus ( const edm::Handle< FEDRawDataCollection > &  rawraw,
HcalSubdetector  subdet,
const HcalElectronicsMap emap 
)
protected

Definition at line 373 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, FEDNumbering::MAXHCALuTCAFEDID, meHB_, meHE_, meHF_, meHO_, FEDNumbering::MINHCALFEDID, FEDNumbering::MINHCALuTCAFEDID, DetId::null(), HcalHTRData::readoutVMECrateId(), HcalElectronicsId::setHTR(), FEDRawData::size(), HcalDCCHeader::SPIGOT_COUNT, and DetId::subdetId().

Referenced by analyze().

376 {
377 
378  std::vector<int> fedUnpackList;
379  for (int i=FEDNumbering::MINHCALFEDID;
381  i++)
382  {
384  continue;
385  fedUnpackList.push_back(i);
386  }
387 
388 
389  if (debug_>1) std::cout <<"<HcalMonitorModule::CheckSubdetectorStatus> Checking subdetector "<<subdet<<std::endl;
390  for (std::vector<int>::const_iterator i=fedUnpackList.begin();
391  i!=fedUnpackList.end();
392  ++i)
393  {
394  if (debug_>2) std::cout <<"\t<HcalMonitorModule::CheckSubdetectorStatus> FED = "<<*i<<std::endl;
395  const FEDRawData& fed =(*rawraw).FEDData(*i);
396  if (fed.size()<12) continue; // Was 16. How do such tiny events even get here?
397 
398  // get the DCC header
399  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fed.data());
400  if (!dccHeader) return;
401  int dccid=dccHeader->getSourceId();
402  // check for HF
403 // if (subdet == HcalForward && dccid>717 && dccid<724)
404  if (subdet==HcalForward && ((dccid>=1118 && dccid<=1122) ||
405  (dccid>=718 && dccid<=723)))
406  {
407  HFpresent_=1;
409  return;
410  }
411  else if (subdet==HcalOuter && dccid>723)
412  {
413  HOpresent_=1;
415  return;
416  }
417  else if (dccid<718 && (subdet==HcalBarrel || subdet==HcalEndcap))
418  {
419  HcalHTRData htr;
420  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++)
421  {
422  if (!dccHeader->getSpigotPresent(spigot)) continue;
423 
424  // Load the given decoder with the pointer and length from this spigot.
425  dccHeader->getSpigotData(spigot,htr, fed.size());
426 
427  // check min length, correct wordcount, empty event, or total length if histo event.
428  if (!htr.check()) continue;
429  if (htr.isHistogramEvent()) continue;
430 
431  int firstFED = FEDNumbering::MINHCALFEDID;
432 
433  // Tease out HB and HE, which share HTRs in HBHE
434  for(int fchan=0; fchan<3; ++fchan) //0,1,2 are valid
435  {
436  for(int fib=1; fib<9; ++fib) //1...8 are valid
437  {
438  HcalElectronicsId eid(fchan,fib,spigot,dccid-firstFED);
439  eid.setHTR(htr.readoutVMECrateId(),
440  htr.htrSlot(),htr.htrTopBottom());
441 
442  DetId did=emap.lookup(eid);
443  if (!did.null())
444  {
445 
446  if ((HcalSubdetector)did.subdetId()==subdet)
447  {
448  if (subdet==HcalBarrel)
449  {
450  HBpresent_=1;
452  return;
453  }
454  else if (subdet==HcalEndcap)
455  {
456  HEpresent_=1;
458  return;
459  }
460  } // if ((HcalSubdetector)did.subdetId()==subdet)
461  } // if (!did.null())
462  } // for (int fib=1;fib<9;...)
463  } // for (int fchan=0; fchan<3;...)
464  } // for (int spigot=0;spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++)
465  } //else if (dcc<718 && (subdet...))
466  } // loop over fedUnpackList
467 
468 
469 } // 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:62
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
Definition: HcalHTRData.cc:342
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:47
void Fill(long long x)
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
Definition: HcalHTRData.cc:338
HcalSubdetector
Definition: HcalAssistant.h:31
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:37
MonitorElement * meHE_
int getSourceId() const
Definition: HcalDCCHeader.h:32
Definition: DetId.h:18
bool null() const
is this a null id ?
Definition: DetId.h:45
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
Definition: HcalHTRData.cc:346
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:19
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
tuple cout
Definition: gather_cfg.py:145
MonitorElement * meHF_
Readout chain identification for Hcal.
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:385
void HcalMonitorModule::cleanup ( void  )
protected

Definition at line 217 of file HcalMonitorModule.cc.

References gather_cfg::cout, debug_, enableCleanup_, fedsListed_, HBpresent_, HEpresent_, HFpresent_, and HOpresent_.

Referenced by esMonitoring.FDJsonServer::handle_close().

218 {
219  if (debug_>0) std::cout <<"HcalMonitorModule::cleanup"<<std::endl;
220  if (!enableCleanup_) return;
221  // Removed calls to dbe_->RemoveElement
222 
223  fedsListed_=false;
224  HBpresent_=0;
225  HEpresent_=0;
226  HOpresent_=0;
227  HFpresent_=0;
228 
229 } // void HcalMonitorModule::cleanup(void)
tuple cout
Definition: gather_cfg.py:145
void HcalMonitorModule::dqmBeginRun ( edm::Run const &  run,
edm::EventSetup const &  es 
)
virtual

Reimplemented from DQMEDAnalyzer.

Definition at line 107 of file HcalMonitorModule.cc.

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

108 {
109 
110  if ( debug_>0 ) std::cout << "HcalMonitorModule: dqmBeginRun" << std::endl;
111  // reset histograms & counters on a new run, unless merging allowed
112 
113  if (eMap_==0) //eMap_ not created yet
114  {
115  if (debug_>1) std::cout <<"\t<HcalMonitorModule::bookHistograms> Getting Emap!"<<std::endl;
117  es.get<HcalDbRecord>().get( pSetup );
118  eMap_=pSetup->getHcalMapping();
119  }
120  if (mergeRuns_) return;
121  this->reset();
122 
123 }
const HcalElectronicsMap * eMap_
tuple cout
Definition: gather_cfg.py:145
void HcalMonitorModule::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 233 of file HcalMonitorModule.cc.

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

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 132 of file HcalMonitorModule.cc.

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

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

Definition at line 143 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_, meUTCAFEDS_, and MonitorElement::Reset().

Referenced by dqmBeginRun().

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

Definition at line 166 of file HcalMonitorModule.cc.

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

Referenced by bookHistograms().

167 {
168  // Run this on first event in run; set up all necessary monitor elements
169  if (debug_>0) std::cout <<"HcalMonitorModule::setup"<<std::endl;
170  ib.setCurrentFolder(prefixME_+"HcalInfo");
171  meStatus_ = ib.bookInt("STATUS");
172  if (meStatus_) meStatus_->Fill(-1);
173  meRun_ = ib.bookInt("RUN");
174  if (meRun_) meRun_->Fill(-1);
175  meEvt_ = ib.bookInt("EVT");
176  if (meEvt_) meEvt_->Fill(-1);
177  meIevt_ = ib.bookInt("EventsProcessed");
178  if (meIevt_) meIevt_->Fill(-1);
179  meIevtHist_ = ib.book1D("EventsInHcalMonitorModule","Events Seen by HcalMonitorModule",1,0.5,1.5);
180  meIevtHist_->setBinLabel(1,"Nevents",1);
181  meEvtsVsLS_ = ib.book1D("EventsVsLS","Events vs. Luminosity Section;LS;# events",NLumiBlocks_,0.5,NLumiBlocks_+0.5);
182  meOnline_ = ib.bookInt("Online");
183  meOnline_->Fill((int)Online_);
184  meProcessedEndLumi_ = ib.bookInt("EndLumiBlock_MonitorModule");
186  meCurrentCalibType_= ib.bookInt("CURRENT_EVENT_TYPE");
188 
189  meHB_ = ib.bookInt("HBpresent");
190  meHE_ = ib.bookInt("HEpresent");
191  meHO_ = ib.bookInt("HOpresent");
192  meHF_ = ib.bookInt("HFpresent");
193  if (meHB_) meHB_->Fill(-1);
194  if (meHE_) meHE_->Fill(-1);
195  if (meHO_) meHO_->Fill(-1);
196  if (meHF_) meHF_->Fill(-1);
197 
198  meFEDS_ = ib.book1D("FEDs Unpacked","FEDs Unpacked; Hcal FEDs 700-731",1+(FEDNumbering::MAXHCALFEDID-FEDNumbering::MINHCALFEDID),FEDNumbering::MINHCALFEDID-0.5,FEDNumbering::MAXHCALFEDID+0.5);
199  meUTCAFEDS_ = ib.book1D("uTCA FEDs Unpacked",
200  "uTCA FEDs Unpacked; Hcal uTCA FEDs 1118, 1120, 1122",
201  5, 1117.5, 1122.5);
202 
203  meCalibType_ = ib.book1D("CalibrationType","Calibration Type",9,-0.5,8.5);
204  meCalibType_->setBinLabel(1,"Normal",1);
205  meCalibType_->setBinLabel(2,"Ped",1);
206  meCalibType_->setBinLabel(3,"RADDAM",1);
207  meCalibType_->setBinLabel(4,"HBHEHPD",1);
208  meCalibType_->setBinLabel(5,"HOHPD",1);
209  meCalibType_->setBinLabel(6,"HFPMT",1);
210  meCalibType_->setBinLabel(7,"ZDC",1);
211  meCalibType_->setBinLabel(8,"CASTOR",1);
212 
213  return;
214 } // void HcalMonitorModule::setup(void)
MonitorElement * meStatus_
MonitorElement * meHB_
MonitorElement * bookInt(Args &&...args)
Definition: DQMStore.h:103
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 * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * meUTCAFEDS_
MonitorElement * meHE_
MonitorElement * meIevt_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * meRun_
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:145
MonitorElement * meHF_
MonitorElement * meOnline_
MonitorElement * meEvtsVsLS_

Member Data Documentation

EtaPhiHists HcalMonitorModule::ChannelStatus
private

Definition at line 110 of file HcalMonitorModule.h.

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

Definition at line 109 of file HcalMonitorModule.h.

Referenced by analyze(), dqmBeginRun(), and HcalMonitorModule().

bool HcalMonitorModule::enableCleanup_
private

Definition at line 95 of file HcalMonitorModule.h.

Referenced by cleanup(), and HcalMonitorModule().

edm::EventNumber_t HcalMonitorModule::evtNumber_
private

Definition at line 72 of file HcalMonitorModule.h.

Referenced by analyze(), and endRun().

edm::InputTag HcalMonitorModule::FEDRawDataCollection_
private

Definition at line 97 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

bool HcalMonitorModule::fedsListed_
private

Definition at line 91 of file HcalMonitorModule.h.

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

int HcalMonitorModule::HBpresent_
private
int HcalMonitorModule::HEpresent_
private
int HcalMonitorModule::HFpresent_
private
int HcalMonitorModule::HOpresent_
private
int HcalMonitorModule::ievt_
private

Definition at line 70 of file HcalMonitorModule.h.

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

edm::InputTag HcalMonitorModule::inputLabelReport_
private

Definition at line 98 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

MonitorElement* HcalMonitorModule::meCalibType_
private

Definition at line 79 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meCurrentCalibType_
private

Definition at line 80 of file HcalMonitorModule.h.

Referenced by analyze(), and setup().

MonitorElement* HcalMonitorModule::meEvt_
private

Definition at line 76 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meEvtsVsLS_
private

Definition at line 87 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meFEDS_
private

Definition at line 77 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meHB_
private

Definition at line 81 of file HcalMonitorModule.h.

Referenced by CheckSubdetectorStatus(), HcalMonitorModule(), reset(), and setup().

MonitorElement* HcalMonitorModule::meHE_
private

Definition at line 82 of file HcalMonitorModule.h.

Referenced by CheckSubdetectorStatus(), HcalMonitorModule(), reset(), and setup().

MonitorElement* HcalMonitorModule::meHF_
private

Definition at line 84 of file HcalMonitorModule.h.

Referenced by CheckSubdetectorStatus(), HcalMonitorModule(), reset(), and setup().

MonitorElement* HcalMonitorModule::meHO_
private

Definition at line 83 of file HcalMonitorModule.h.

Referenced by CheckSubdetectorStatus(), HcalMonitorModule(), reset(), and setup().

MonitorElement* HcalMonitorModule::meIevt_
private

Definition at line 85 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meIevtHist_
private

Definition at line 86 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meOnline_
private

Definition at line 89 of file HcalMonitorModule.h.

Referenced by setup().

MonitorElement* HcalMonitorModule::meProcessedEndLumi_
private

Definition at line 88 of file HcalMonitorModule.h.

Referenced by endLuminosityBlock(), HcalMonitorModule(), reset(), and setup().

bool HcalMonitorModule::mergeRuns_
private

Definition at line 94 of file HcalMonitorModule.h.

Referenced by dqmBeginRun(), and HcalMonitorModule().

MonitorElement* HcalMonitorModule::meRun_
private

Definition at line 75 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meStatus_
private

Definition at line 74 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meUTCAFEDS_
private

Definition at line 78 of file HcalMonitorModule.h.

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

int HcalMonitorModule::NLumiBlocks_
private

Definition at line 101 of file HcalMonitorModule.h.

Referenced by HcalMonitorModule(), and setup().

bool HcalMonitorModule::Online_
private

Definition at line 93 of file HcalMonitorModule.h.

Referenced by HcalMonitorModule(), and setup().

std::string HcalMonitorModule::prefixME_
private

Definition at line 100 of file HcalMonitorModule.h.

Referenced by HcalMonitorModule(), and setup().

edm::RunNumber_t HcalMonitorModule::runNumber_
private

Definition at line 71 of file HcalMonitorModule.h.

Referenced by analyze(), and endRun().

edm::EDGetTokenT<FEDRawDataCollection> HcalMonitorModule::tok_raw_
private

Definition at line 103 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

edm::EDGetTokenT<HcalUnpackerReport> HcalMonitorModule::tok_report_
private

Definition at line 104 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().