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
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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 (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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_
 
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
 
- 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_, 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  meIevt_=0;
88  meIevtHist_=0;
89  meEvtsVsLS_=0;
91  meHB_=0;
92  meHE_=0;
93  meHO_=0;
94  meHF_=0;
95  eMap_=0;
96 
97 } // 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 * meHE_
MonitorElement * meIevt_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
MonitorElement * meIevtHist_
MonitorElement * meHF_
edm::EDGetTokenT< HcalUnpackerReport > tok_report_
MonitorElement * meEvtsVsLS_
HcalMonitorModule::~HcalMonitorModule ( )

Definition at line 101 of file HcalMonitorModule.cc.

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

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 238 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::getByToken(), HBpresent_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HEpresent_, HFpresent_, HOpresent_, i, edm::EventBase::id(), ievt_, 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_, FEDRawData::size(), tok_raw_, tok_report_, and relativeConstraints::value.

239 {
240 
241  LogDebug("HcalMonitorModule")<<"processing event "<<ievt_;
242 
243  // Fill Monitor Elements with run, evt, processed event info
244  ++ievt_;
245  runNumber_=e.id().run();
246  evtNumber_=e.id().event();
247  if (meRun_) meRun_->Fill(runNumber_);
248  if (meEvt_) meEvt_->Fill(evtNumber_);
249  if (meIevt_) meIevt_->Fill(ievt_);
250  if (meIevtHist_) meIevtHist_->Fill(1);
252  if (ievt_==1)
253  {
254  LogDebug("HcalMonitorModule") << "processing run " << runNumber_;
255  // begin-of-run
256  if ( meStatus_ ) meStatus_->Fill(0);
257  }
258  else
259  {
260  // running
261  if ( meStatus_ ) meStatus_->Fill(1);
262  }
263 
264  // Try to get raw data
266  if (!(e.getByToken(tok_raw_,rawraw)))
267  {
268  edm::LogWarning("HcalMonitorModule")<<" raw data with label "<<FEDRawDataCollection_ <<" not available";
269  return;
270  }
271 
272  // Get Event Calibration Type -- copy of Bryan Dahmes' filter
273  int calibType=-1;
274  int numEmptyFEDs = 0 ;
275  std::vector<int> calibTypeCounter(8,0) ;
277  {
278  const FEDRawData& fedData = rawraw->FEDData(i) ;
279 
280  if ( fedData.size() < 24 ) numEmptyFEDs++ ;
281  if ( fedData.size() < 24 ) continue;
282 
283  int value = (int)((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
284  if(value>7)
285  {
286  edm::LogWarning("HcalMonitorModule::CalibTypeFilter") << "Unexpected Calibration type: "<< value << " in FED: "<<i<<" (should be 0-7). I am bailing out...";
287  return;
288  }
289 
290  calibTypeCounter.at(value)++ ; // increment the counter for this calib type
291  } // for (int i = FEDNumbering::MINHCALFEDID; ...)
292 
293  int maxCount = 0;
294  int numberOfFEDIds = FEDNumbering::MAXHCALFEDID - FEDNumbering::MINHCALFEDID + 1 ;
295  for (unsigned int i=0; i<calibTypeCounter.size(); i++) {
296  if ( calibTypeCounter.at(i) > maxCount )
297  { calibType = i ; maxCount = calibTypeCounter.at(i) ; }
298  if ( maxCount == numberOfFEDIds ) break ;
299  }
300 
301  if ( maxCount != (numberOfFEDIds-numEmptyFEDs) )
302  edm::LogWarning("HcalMonitorModule::CalibTypeFilter") << "Conflicting calibration types found. Assigning type "
303  << calibType ;
304  LogDebug("HcalMonitorModule::CalibTypeFilter") << "Calibration type is: " << calibType ;
305  // Fill histogram of calibration types, as well as integer to keep track of current value
306  if (meCalibType_) meCalibType_->Fill(calibType);
309 
310  if (debug_>2) std::cout <<"\t<HcalMonitorModule> ievt = "<<ievt_<<" calibration type = "<<calibType<<std::endl;
311 
312  // Check to see which subdetectors are present.
313  // May only need to do this on first event? Subdets don't appear during a run?
314  if (HBpresent_==0)
316  if (HEpresent_==0)
318  if (HOpresent_==0)
320  if (HFpresent_==0)
322 
323  // Here, we do need this information each event
325  if (!(e.getByToken(tok_report_,report)))
326  {
327  edm::LogWarning("HcalMonitorModule")<<" Unpacker Report "<<inputLabelReport_<<" not available";
328  return;
329  }
330 
331  if (!fedsListed_)
332  {
333  const std::vector<int> feds = (*report).getFedsUnpacked();
334  for(unsigned int f=0; f<feds.size(); ++f)
335  meFEDS_->Fill(feds[f]);
336  fedsListed_ = true;
337  } // if (!fedsListed_)
338 
339 } // 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:446
tuple calibType
Definition: diJetCalib.py:20
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
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 * meIevt_
edm::RunNumber_t runNumber_
MonitorElement * meRun_
edm::EDGetTokenT< FEDRawDataCollection > tok_raw_
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:28
MonitorElement * meIevtHist_
tuple cout
Definition: gather_cfg.py:121
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 125 of file HcalMonitorModule.cc.

References setup().

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

Definition at line 343 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().

346 {
347 
348  std::vector<int> fedUnpackList;
349  for (int i=FEDNumbering::MINHCALFEDID;
351  i++)
352  fedUnpackList.push_back(i);
353 
354  if (debug_>1) std::cout <<"<HcalMonitorModule::CheckSubdetectorStatus> Checking subdetector "<<subdet<<std::endl;
355  for (std::vector<int>::const_iterator i=fedUnpackList.begin();
356  i!=fedUnpackList.end();
357  ++i)
358  {
359  if (debug_>2) std::cout <<"\t<HcalMonitorModule::CheckSubdetectorStatus> FED = "<<*i<<std::endl;
360  const FEDRawData& fed =(*rawraw).FEDData(*i);
361  if (fed.size()<12) continue; // Was 16. How do such tiny events even get here?
362 
363  // get the DCC header
364  const HcalDCCHeader* dccHeader=(const HcalDCCHeader*)(fed.data());
365  if (!dccHeader) return;
366  int dccid=dccHeader->getSourceId();
367  // check for HF
368  if (subdet == HcalForward && dccid>717 && dccid<724)
369  {
370  HFpresent_=1;
372  return;
373  }
374  else if (subdet==HcalOuter && dccid>723)
375  {
376  HOpresent_=1;
378  return;
379  }
380  else if (dccid<718 && (subdet==HcalBarrel || subdet==HcalEndcap))
381  {
382  HcalHTRData htr;
383  for (int spigot=0; spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++)
384  {
385  if (!dccHeader->getSpigotPresent(spigot)) continue;
386 
387  // Load the given decoder with the pointer and length from this spigot.
388  dccHeader->getSpigotData(spigot,htr, fed.size());
389 
390  // check min length, correct wordcount, empty event, or total length if histo event.
391  if (!htr.check()) continue;
392  if (htr.isHistogramEvent()) continue;
393 
394  int firstFED = FEDNumbering::MINHCALFEDID;
395 
396  // Tease out HB and HE, which share HTRs in HBHE
397  for(int fchan=0; fchan<3; ++fchan) //0,1,2 are valid
398  {
399  for(int fib=1; fib<9; ++fib) //1...8 are valid
400  {
401  HcalElectronicsId eid(fchan,fib,spigot,dccid-firstFED);
402  eid.setHTR(htr.readoutVMECrateId(),
403  htr.htrSlot(),htr.htrTopBottom());
404 
405  DetId did=emap.lookup(eid);
406  if (!did.null())
407  {
408 
409  if ((HcalSubdetector)did.subdetId()==subdet)
410  {
411  if (subdet==HcalBarrel)
412  {
413  HBpresent_=1;
415  return;
416  }
417  else if (subdet==HcalEndcap)
418  {
419  HEpresent_=1;
421  return;
422  }
423  } // if ((HcalSubdetector)did.subdetId()==subdet)
424  } // if (!did.null())
425  } // for (int fib=1;fib<9;...)
426  } // for (int fchan=0; fchan<3;...)
427  } // for (int spigot=0;spigot<HcalDCCHeader::SPIGOT_COUNT; spigot++)
428  } //else if (dcc<718 && (subdet...))
429  } // loop over fedUnpackList
430 
431 
432 } // 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:121
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 212 of file HcalMonitorModule.cc.

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

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

Reimplemented from DQMEDAnalyzer.

Definition at line 106 of file HcalMonitorModule.cc.

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

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

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 228 of file HcalMonitorModule.cc.

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

230 {
231  if (debug_>0) std::cout <<"HcalMonitorModule::endLuminosityBlock"<<std::endl;
233 }// 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::stream::EDAnalyzerBase.

Definition at line 131 of file HcalMonitorModule.cc.

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

131  {
132 
133  if ( debug_>0 ) std::cout << "HcalMonitorModule: endRun" << std::endl;
134 
135  // end-of-run
136  if ( meStatus_ ) meStatus_->Fill(2);
137 
138  if ( meRun_ ) meRun_->Fill(runNumber_);
139  if ( meEvt_ ) meEvt_->Fill(evtNumber_);
140 }
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:121
void HcalMonitorModule::reset ( void  )
protected

Definition at line 142 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 dqmBeginRun().

143 {
144  if (debug_>0) std::cout <<"HcalMonitorModule::reset"<<std::endl;
145  // Call Reset() on all MonitorElement histograms
147  if (meFEDS_) meFEDS_->Reset();
148  if (meIevt_) meIevt_->Fill(0);
149  if (meIevtHist_) meIevtHist_->Reset();
150  if (meEvtsVsLS_) meEvtsVsLS_->Reset();
151  ievt_=0;
153  if (meHB_) meHB_->Fill(-1);
154  if (meHE_) meHE_->Fill(-1);
155  if (meHO_) meHO_->Fill(-1);
156  if (meHF_) meHF_->Fill(-1);
157  HBpresent_=0;
158  HEpresent_=0;
159  HOpresent_=0;
160  HFpresent_=0;
161  fedsListed_=false;
162 } // 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 ( DQMStore::IBooker ib)
protected

Definition at line 164 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_, FEDNumbering::MINHCALFEDID, NLumiBlocks_, Online_, prefixME_, MonitorElement::setBinLabel(), and DQMStore::IBooker::setCurrentFolder().

Referenced by bookHistograms().

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

Member Data Documentation

EtaPhiHists HcalMonitorModule::ChannelStatus
private

Definition at line 107 of file HcalMonitorModule.h.

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

Definition at line 106 of file HcalMonitorModule.h.

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

bool HcalMonitorModule::enableCleanup_
private

Definition at line 94 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 96 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

bool HcalMonitorModule::fedsListed_
private

Definition at line 90 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 97 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

MonitorElement* HcalMonitorModule::meCalibType_
private

Definition at line 78 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meCurrentCalibType_
private

Definition at line 79 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 86 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 80 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meHE_
private

Definition at line 81 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meHF_
private

Definition at line 83 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meHO_
private

Definition at line 82 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meIevt_
private

Definition at line 84 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meIevtHist_
private

Definition at line 85 of file HcalMonitorModule.h.

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

MonitorElement* HcalMonitorModule::meOnline_
private

Definition at line 88 of file HcalMonitorModule.h.

Referenced by setup().

MonitorElement* HcalMonitorModule::meProcessedEndLumi_
private

Definition at line 87 of file HcalMonitorModule.h.

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

bool HcalMonitorModule::mergeRuns_
private

Definition at line 93 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().

int HcalMonitorModule::NLumiBlocks_
private

Definition at line 99 of file HcalMonitorModule.h.

Referenced by HcalMonitorModule(), and setup().

bool HcalMonitorModule::Online_
private

Definition at line 92 of file HcalMonitorModule.h.

Referenced by HcalMonitorModule(), and setup().

std::string HcalMonitorModule::prefixME_
private

Definition at line 98 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 101 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().

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

Definition at line 102 of file HcalMonitorModule.h.

Referenced by analyze(), and HcalMonitorModule().