CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Types | Protected Attributes
hcaldqm::DigiRunSummary Class Reference

#include <DigiRunSummary.h>

Inheritance diagram for hcaldqm::DigiRunSummary:
hcaldqm::DQClient hcaldqm::DQModule

Public Member Functions

void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DigiRunSummary (std::string const &, std::string const &, edm::ParameterSet const &)
 
std::vector< flag::FlagendJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
void endLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
 
 ~DigiRunSummary () override
 
- Public Member Functions inherited from hcaldqm::DQClient
 DQClient (std::string const &, std::string const &, edm::ParameterSet const &)
 
 ~DQClient () override
 
- Public Member Functions inherited from hcaldqm::DQModule
 DQModule (edm::ParameterSet const &)
 
virtual ~DQModule ()(false)
 

Protected Types

enum  DigiLSFlag {
  fDigiSize = 0, fNChsHF =1, fUnknownIds =2, fLED =3,
  nLSFlags =4, fUniHF =5, fDead =6, nDigiFlag = 7
}
 

Protected Attributes

bool _booked
 
Container2D _cOccupancy_depth
 
electronicsmap::ElectronicsMap _ehashmap
 
filter::HashFilter _filter_FEDHF
 
filter::HashFilter _filter_uTCA
 
filter::HashFilter _filter_VME
 
MonitorElement_meNumEvents
 
std::map< HcalSubdetector, uint32_t > _refDigiSize
 
double _thresh_unihf
 
std::vector< int > _vFEDsuTCA
 
std::vector< int > _vFEDsVME
 
std::vector< LSSummary_vflagsLS
 
std::vector< uint32_t > _vhashFEDHF
 
std::vector< uint32_t > _vhashuTCA
 
std::vector< uint32_t > _vhashVME
 
ContainerXXX< uint32_t > _xDead
 
ContainerXXX< uint32_t > _xDigiSize
 
ContainerXXX< uint32_t > _xNChs
 
ContainerXXX< uint32_t > _xNChsNominal
 
ContainerXXX< uint32_t > _xUni
 
ContainerXXX< uint32_t > _xUniHF
 
- Protected Attributes inherited from hcaldqm::DQClient
HcalElectronicsMap const * _emap
 
int _maxProcessedLS
 
std::string _taskname
 
int _totalLS
 
std::vector< uint32_t > _vcdaqEids
 
std::vector< int > _vCrates
 
std::vector< int > _vFEDs
 
std::vector< uint32_t > _vhashCrates
 
std::vector< uint32_t > _vhashFEDs
 
ContainerXXX< uint32_t > _xQuality
 
- Protected Attributes inherited from hcaldqm::DQModule
int _currentLS
 
int _debug
 
int _evsPerLS
 
int _evsTotal
 
Logger _logger
 
int _maxLS
 
ModuleType _mtype
 
std::string _name
 
ProcessingType _ptype
 
std::string _runkeyName
 
int _runkeyVal
 
std::string _subsystem
 

Detailed Description

Definition at line 10 of file DigiRunSummary.h.

Member Enumeration Documentation

Enumerator
fDigiSize 
fNChsHF 
fUnknownIds 
fLED 
nLSFlags 
fUniHF 
fDead 
nDigiFlag 

Definition at line 45 of file DigiRunSummary.h.

Constructor & Destructor Documentation

hcaldqm::DigiRunSummary::DigiRunSummary ( std::string const &  name,
std::string const &  taskname,
edm::ParameterSet const &  ps 
)

Definition at line 7 of file DigiRunSummary.cc.

References _refDigiSize, _thresh_unihf, edm::ParameterSet::getUntrackedParameter(), HcalBarrel, HcalEndcap, HcalForward, and HcalOuter.

8  :
9  DQClient(name, taskname, ps), _booked(false)
10  {
11  _thresh_unihf = ps.getUntrackedParameter<double>("thresh_unihf",
12  0.2);
13 
14  std::vector<uint32_t> vrefDigiSize = ps.getUntrackedParameter<std::vector<uint32_t>>("refDigiSize");
15  _refDigiSize[HcalBarrel] = vrefDigiSize[0];
16  _refDigiSize[HcalEndcap] = vrefDigiSize[1];
17  _refDigiSize[HcalOuter] = vrefDigiSize[2];
18  _refDigiSize[HcalForward] = vrefDigiSize[3];
19  }
std::map< HcalSubdetector, uint32_t > _refDigiSize
DQClient(std::string const &, std::string const &, edm::ParameterSet const &)
Definition: DQClient.cc:6
hcaldqm::DigiRunSummary::~DigiRunSummary ( )
inlineoverride

Definition at line 15 of file DigiRunSummary.h.

References beginRun(), endJob(), and endLuminosityBlock().

15 {}

Member Function Documentation

void hcaldqm::DigiRunSummary::beginRun ( edm::Run const &  r,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from hcaldqm::DQClient.

Definition at line 21 of file DigiRunSummary.cc.

References _cOccupancy_depth, _ehashmap, hcaldqm::DQClient::_emap, _filter_FEDHF, _filter_uTCA, _filter_VME, hcaldqm::DQModule::_name, hcaldqm::DQModule::_ptype, _vhashFEDHF, _vhashuTCA, _vhashVME, _xDead, _xDigiSize, _xNChs, _xNChsNominal, _xUni, _xUniHF, HcalElectronicsMap::allPrecisionId(), hcaldqm::DQClient::beginRun(), hcaldqm::ContainerXXX< STDTYPE >::book(), hcaldqm::constants::CRATE_uTCA_MIN, hcaldqm::constants::CRATE_VME_MIN, runTauDisplay::eid, hcaldqm::electronicsmap::fD2EHashMap, hcaldqm::hashfunctions::fdepth, hcaldqm::hashfunctions::fElectronics, hcaldqm::hashfunctions::fFED, hcaldqm::hashfunctions::fFEDSlot, hcaldqm::filter::fFilter, hcaldqm::constants::FIBER_uTCA_MIN1, hcaldqm::constants::FIBER_VME_MIN, hcaldqm::constants::FIBERCH_MIN, hcaldqm::quantity::fieta, hcaldqm::quantity::fiphi, hcaldqm::quantity::fN, hcaldqm::fOffline, hcaldqm::filter::fPreserver, hcaldqm::ContainerXXX< STDTYPE >::get(), hcaldqm::ContainerXXX< STDTYPE >::initialize(), hcaldqm::Container2D::initialize(), hcaldqm::filter::HashFilter::initialize(), hcaldqm::electronicsmap::ElectronicsMap::initialize(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), hcaldqm::constants::SLOT_uTCA_MIN, and hcaldqm::constants::SPIGOT_MIN.

Referenced by ~DigiRunSummary().

23  {
25 
26  if (_ptype!=fOffline)
27  return;
28 
29  // INITIALIZE WHAT NEEDS TO BE INITIALIZE ONLY ONCE!
34  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
36  _vhashVME); // filter out VME
38  _vhashuTCA); // filter out uTCA
40  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
42  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
44  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
46  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
48  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
50  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
52  _vhashFEDHF); // preserve only HF FEDs
53 
58 
64 
65  _cOccupancy_depth.initialize(_name, "Occupancy",
67  new quantity::DetectorQuantity(quantity::fieta),
68  new quantity::DetectorQuantity(quantity::fiphi),
69  new quantity::ValueQuantity(quantity::fN),0);
70 
71  // GET THE NOMINAL NUMBER OF CHANNELS PER FED
72  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
73  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
74  it!=gids.end(); ++it)
75  {
76  if (!it->isHcalDetId())
77  continue;
78  HcalDetId did(it->rawId());
80  _xNChsNominal.get(eid)++;
81  }
82  }
ContainerXXX< uint32_t > _xDigiSize
int const CRATE_VME_MIN
Definition: Constants.h:111
ContainerXXX< uint32_t > _xUni
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
Definition: DQClient.cc:16
int const SPIGOT_MIN
Definition: Constants.h:136
HcalElectronicsMap const * _emap
Definition: DQClient.h:54
filter::HashFilter _filter_FEDHF
int const FIBER_VME_MIN
Definition: Constants.h:141
int const FIBERCH_MIN
Definition: Constants.h:151
ProcessingType _ptype
Definition: DQModule.h:59
std::vector< uint32_t > _vhashuTCA
filter::HashFilter _filter_uTCA
Container2D _cOccupancy_depth
int const FIBER_uTCA_MIN1
Definition: Constants.h:144
ContainerXXX< uint32_t > _xNChsNominal
std::vector< HcalGenericDetId > allPrecisionId() const
std::string _name
Definition: DQModule.h:57
std::vector< uint32_t > _vhashFEDHF
int const CRATE_uTCA_MIN
Definition: Constants.h:116
std::vector< uint32_t > _vhashVME
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:97
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:32
ContainerXXX< uint32_t > _xNChs
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:247
electronicsmap::ElectronicsMap _ehashmap
virtual void initialize(FilterType ftype, hashfunctions::HashType htype, std::vector< uint32_t > const &)
Definition: HashFilter.cc:28
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:89
filter::HashFilter _filter_VME
Readout chain identification for Hcal.
ContainerXXX< uint32_t > _xUniHF
int const SLOT_uTCA_MIN
Definition: Constants.h:123
ContainerXXX< uint32_t > _xDead
std::vector< flag::Flag > hcaldqm::DigiRunSummary::endJob ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
overridevirtual

Reimplemented from hcaldqm::DQClient.

Definition at line 213 of file DigiRunSummary.cc.

References _cOccupancy_depth, _ehashmap, hcaldqm::DQClient::_emap, hcaldqm::DQClient::_maxProcessedLS, hcaldqm::DQModule::_name, hcaldqm::DQModule::_ptype, hcaldqm::flag::Flag::_state, hcaldqm::DQModule::_subsystem, hcaldqm::DQClient::_taskname, _thresh_unihf, _vflagsLS, hcaldqm::DQClient::_vhashCrates, _xDead, _xUni, _xUniHF, HcalElectronicsMap::allPrecisionId(), hcaldqm::ContainerXXX< STDTYPE >::begin(), hcaldqm::ContainerSingle2D::book(), hcaldqm::Container2D::book(), runTauDisplay::eid, hcaldqm::ContainerXXX< STDTYPE >::end(), hcaldqm::flag::fBAD, hcaldqm::hashfunctions::fCrate, fDead, hcaldqm::hashfunctions::fdepth, fDigiSize, hcaldqm::quantity::fFiberVMEFiberCh, hcaldqm::flag::fGOOD, hcaldqm::quantity::fieta, hcaldqm::Container2D::fill(), hcaldqm::quantity::fiphi, nanoDQM_cfi::Flag, fLED, hcaldqm::quantity::fN, fNChsHF, hcaldqm::fOffline, hcaldqm::quantity::fSpigot, hcaldqm::quantity::fState, fUniHF, fUnknownIds, hcaldqm::ContainerXXX< STDTYPE >::get(), hcaldqm::Container2D::getBinContent(), HcalForward, reco::if(), hcaldqm::Container2D::initialize(), hcaldqm::ContainerSingle2D::initialize(), hcaldqm::Container1D::load(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), HcalElectronicsMap::lookup(), nDigiFlag, nLSFlags, hcaldqm::ContainerXXX< STDTYPE >::reset(), hcaldqm::Container2D::setBinContent(), hcaldqm::ContainerSingle2D::setBinContent(), HcalDetId::subdet(), globals_cff::x1, and globals_cff::x2.

Referenced by ~DigiRunSummary().

215  {
216  if (_ptype!=fOffline)
217  return std::vector<flag::Flag>();
218 
220 
221  // PREPARE LS AND RUN BASED FLAGS TO USE IT FOR BOOKING
222  std::vector<flag::Flag> vflagsPerLS;
223  std::vector<flag::Flag> vflagsPerRun;
224  vflagsPerLS.resize(nLSFlags);
225  vflagsPerRun.resize(nDigiFlag-nLSFlags+1);
226  vflagsPerLS[fDigiSize]=flag::Flag("DigiSize");
227  vflagsPerLS[fNChsHF]=flag::Flag("NChsHF");
228  vflagsPerLS[fUnknownIds]=flag::Flag("UnknownIds");
229  vflagsPerLS[fLED]=flag::Flag("LEDMisfire");
230  vflagsPerRun[fDigiSize]=flag::Flag("DigiSize");
231  vflagsPerRun[fNChsHF]=flag::Flag("NChsHF");
232  vflagsPerRun[fUniHF-nLSFlags+1]=flag::Flag("UniSlotHF");
233  vflagsPerRun[fDead-nLSFlags+1]=flag::Flag("Dead");
234 
235  // INITIALIZE SUMMARY CONTAINERS
236  ContainerSingle2D cSummaryvsLS;
237  Container2D cSummaryvsLS_Crate;
238  cSummaryvsLS.initialize(_name, "SummaryvsLS",
239  new quantity::LumiSection(_maxProcessedLS),
240  new quantity::CrateQuantity(_emap),
241  new quantity::ValueQuantity(quantity::fState),0);
242  cSummaryvsLS.book(ib, _subsystem);
243  cSummaryvsLS_Crate.initialize(_name, "SummaryvsLS",
245  new quantity::LumiSection(_maxProcessedLS),
246  new quantity::FlagQuantity(vflagsPerLS),
247  new quantity::ValueQuantity(quantity::fState),0);
248  cSummaryvsLS_Crate.book(ib, _emap, _subsystem);
249 
250  // INITIALIZE CONTAINERS WE NEED TO LOAD or BOOK
251  Container2D cOccupancyCut_depth;
252  Container2D cDead_depth, cDead_Crate;
253  cOccupancyCut_depth.initialize(_taskname, "OccupancyCut",
255  new quantity::DetectorQuantity(quantity::fieta),
256  new quantity::DetectorQuantity(quantity::fiphi),
257  new quantity::ValueQuantity(quantity::fN),0);
258  cDead_depth.initialize(_name, "Dead",
260  new quantity::DetectorQuantity(quantity::fieta),
261  new quantity::DetectorQuantity(quantity::fiphi),
262  new quantity::ValueQuantity(quantity::fN),0);
263  cDead_Crate.initialize(_name, "Dead",
265  new quantity::ElectronicsQuantity(quantity::fSpigot),
266  new quantity::ElectronicsQuantity(quantity::fFiberVMEFiberCh),
267  new quantity::ValueQuantity(quantity::fN),0);
268 
269  // LOAD
270  cOccupancyCut_depth.load(ig, _emap, _subsystem);
271  cDead_depth.book(ib, _emap, _subsystem);
272  cDead_Crate.book(ib, _emap, _subsystem);
273 
274  // ANALYZE RUN BASED QUANTITIES
275  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
276  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
277  it!=gids.end(); ++it)
278  {
279  if (!it->isHcalDetId())
280  continue;
281 
282  HcalDetId did = HcalDetId(it->rawId());
284 
285  if (_cOccupancy_depth.getBinContent(did)<1)
286  {
287  _xDead.get(eid)++;
288  cDead_depth.fill(did);
289  cDead_Crate.fill(eid);
290  }
291  if (did.subdet()==HcalForward)
292  _xUniHF.get(eid)+=cOccupancyCut_depth.getBinContent(did);
293  }
294  // ANALYZE FOR HF SLOT UNIFORMITY
295  for (uintCompactMap::const_iterator it=_xUniHF.begin();
296  it!=_xUniHF.end(); ++it)
297  {
298  uint32_t hash1 = it->first;
299  HcalElectronicsId eid1(hash1);
300  double x1 = it->second;
301 
302  for (uintCompactMap::const_iterator jt=_xUniHF.begin();
303  jt!=_xUniHF.end(); ++jt)
304  {
305  if (jt==it)
306  continue;
307 
308  double x2 = jt->second;
309  if (x2==0)
310  continue;
311  if (x1/x2<_thresh_unihf)
312  _xUni.get(eid1)++;
313  }
314  }
315 
316  /*
317  * Iterate over each crate
318  * Iterate over each LS Summary
319  * Iterate over all flags
320  * set...
321  */
322  // iterate over all crates
323  std::vector<flag::Flag> sumflags;
324  int icrate=0;
325  for (auto& it_crate : _vhashCrates) {
326  flag::Flag fSumRun("DIGI"); // summary flag for this FED
327  flag::Flag ffDead("Dead");
328  flag::Flag ffUniSlotHF("UniSlotHF");
329  HcalElectronicsId eid(it_crate);
330  HcalDetId did = HcalDetId(_emap->lookup(eid));
331 
332  // ITERATE OVER EACH LS
333  for (std::vector<LSSummary>::const_iterator itls=_vflagsLS.begin();
334  itls!=_vflagsLS.end(); ++itls)
335  {
336  int iflag=0;
337  flag::Flag fSumLS("DIGI");
338  for (std::vector<flag::Flag>::const_iterator ft=
339  itls->_vflags[icrate].begin(); ft!=itls->_vflags[icrate].end();
340  ++ft)
341  {
342  cSummaryvsLS_Crate.setBinContent(eid, itls->_LS, int(iflag), ft->_state);
343  fSumLS+=(*ft);
344  iflag++;
345  }
346  cSummaryvsLS.setBinContent(eid, itls->_LS, fSumLS._state);
347  fSumRun+=fSumLS;
348  }
349 
350  // EVALUATE RUN BASED FLAGS
351  if (_xDead.get(eid)>0)
352  ffDead._state = flag::fBAD;
353  else
354  ffDead._state = flag::fGOOD;
355  if (did.subdet() == HcalForward)
356  {
357  if (_xUni.get(eid)>0)
358  ffUniSlotHF._state = flag::fBAD;
359  else
360  ffUniSlotHF._state = flag::fGOOD;
361  }
362  fSumRun+=ffDead+ffUniSlotHF;
363 
364  // push the summary flag for this FED for the Whole Run
365  sumflags.push_back(fSumRun);
366 
367  // increment fed
368  icrate++;
369  }
370 
371  return sumflags;
372  }
std::vector< LSSummary > _vflagsLS
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
ContainerXXX< uint32_t > _xUni
virtual CompactMap::const_iterator begin()
Definition: ContainerXXX.h:73
std::string _taskname
Definition: DQClient.h:47
HcalElectronicsMap const * _emap
Definition: DQClient.h:54
virtual void reset()
Definition: ContainerXXX.h:364
std::vector< uint32_t > _vhashCrates
Definition: DQClient.h:58
virtual CompactMap::const_iterator end()
Definition: ContainerXXX.h:75
ProcessingType _ptype
Definition: DQModule.h:59
Container2D _cOccupancy_depth
std::vector< HcalGenericDetId > allPrecisionId() const
std::string _name
Definition: DQModule.h:57
double getBinContent(HcalDetId const &) override
Definition: Container2D.cc:184
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:247
if(dp >Float(M_PI)) dp-
electronicsmap::ElectronicsMap _ehashmap
std::string _subsystem
Definition: DQModule.h:64
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
ContainerXXX< uint32_t > _xUniHF
ContainerXXX< uint32_t > _xDead
void hcaldqm::DigiRunSummary::endLuminosityBlock ( DQMStore::IBooker ib,
DQMStore::IGetter ig,
edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from hcaldqm::DQClient.

Definition at line 87 of file DigiRunSummary.cc.

References _booked, _cOccupancy_depth, hcaldqm::DQModule::_currentLS, _ehashmap, hcaldqm::DQClient::_emap, _meNumEvents, hcaldqm::DQModule::_ptype, _refDigiSize, hcaldqm::DQModule::_subsystem, hcaldqm::DQClient::_taskname, _vflagsLS, hcaldqm::DQClient::_vhashCrates, _xDigiSize, _xNChs, _xNChsNominal, HcalElectronicsMap::allPrecisionId(), hcaldqm::Container2D::book(), DQMStore::IBooker::book1D(), runTauDisplay::eid, hcaldqm::DQClient::endLuminosityBlock(), hcaldqm::flag::fBAD, hcaldqm::hashfunctions::fCrate, hcaldqm::hashfunctions::fdepth, hcaldqm::quantity::fDigiSize, fDigiSize, hcaldqm::flag::fGOOD, hcaldqm::quantity::fieta, hcaldqm::Container2D::fill(), hcaldqm::quantity::fiphi, nanoDQM_cfi::Flag, fLED, hcaldqm::quantity::fN, hcaldqm::flag::fNA, fNChsHF, hcaldqm::fOffline, fUnknownIds, hcaldqm::ContainerXXX< STDTYPE >::get(), DQMStore::IGetter::get(), hcaldqm::Container2D::getBinContent(), MonitorElement::getBinContent(), hcaldqm::Container1D::getMean(), hcaldqm::Container1D::getRMS(), MonitorElement::getTH1(), HcalForward, hcaldqm::Container2D::initialize(), hcaldqm::Container1D::load(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), HcalElectronicsMap::lookup(), nLSFlags, simpleEdmComparison::numEvents, hcaldqm::ContainerXXX< STDTYPE >::reset(), MonitorElement::setBinContent(), DQMStore::IBooker::setCurrentFolder(), and HcalDetId::subdet().

Referenced by ~DigiRunSummary().

90  {
91  DQClient::endLuminosityBlock(ib, ig, lb, es);
92 
93  if (_ptype!=fOffline)
94  return;
95 
96  LSSummary lssum;
97  lssum._LS=_currentLS;
98 
100 
101  // INITIALIZE LUMI BASED HISTOGRAMS
102  Container2D cDigiSize_Crate, cOccupancy_depth;
103  cDigiSize_Crate.initialize(_taskname, "DigiSize",
105  new quantity::ValueQuantity(quantity::fDigiSize),
106  new quantity::ValueQuantity(quantity::fN),0);
107  cOccupancy_depth.initialize(_taskname, "Occupancy",
109  new quantity::DetectorQuantity(quantity::fieta),
110  new quantity::DetectorQuantity(quantity::fiphi),
111  new quantity::ValueQuantity(quantity::fN),0);
112 
113  // LOAD LUMI BASED HISTOGRAMS
114  cOccupancy_depth.load(ig, _emap, _subsystem);
115  cDigiSize_Crate.load(ig, _emap, _subsystem);
116  MonitorElement *meNumEvents = ig.get(_subsystem+
117  "/RunInfo/NumberOfEvents");
118  int numEvents = meNumEvents->getBinContent(1);
119  bool unknownIdsPresent = ig.get(_subsystem+"/"
120  +_taskname+"/UnknownIds")->getBinContent(1)>0;
121  bool ledSignalPresent = ig.get(_subsystem+"/"
122  +_taskname+"/LED/LEDEventCount")->getBinContent(1)>0;
123 
124  // book the Numer of Events - set axis extendable
125  if (!_booked)
126  {
128  _meNumEvents = ib.book1D("NumberOfEvents", "NumberOfEvents",
129  1000, 1, 1001); // 1000 to start with
130  _meNumEvents->getTH1()->SetCanExtend(TH1::kXaxis);
131 
133  _booked=true;
134  }
136 
137  // ANALYZE THIS LS for LS BASED FLAGS
138  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
139  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
140  it!=gids.end(); ++it)
141  {
142  if (!it->isHcalDetId())
143  continue;
144 
145  HcalDetId did = HcalDetId(it->rawId());
147 
148  cOccupancy_depth.getBinContent(did)>0?_xNChs.get(eid)++:
149  _xNChs.get(eid)+=0;
150  _cOccupancy_depth.fill(did, cOccupancy_depth.getBinContent(did));
151  // digi size
152  cDigiSize_Crate.getMean(eid)!=
153  _refDigiSize[did.subdet()]?
154  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
155  cDigiSize_Crate.getRMS(eid)!=0?
156  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
157  }
158 
159  // GENERATE SUMMARY AND STORE IT
160  std::vector<flag::Flag> vtmpflags;
161  vtmpflags.resize(nLSFlags);
162  vtmpflags[fDigiSize]=flag::Flag("DigiSize");
163  vtmpflags[fNChsHF]=flag::Flag("NChsHF");
164  vtmpflags[fUnknownIds]=flag::Flag("UnknownIds");
165  vtmpflags[fLED]=flag::Flag("LEDMisfire");
166  for (std::vector<uint32_t>::const_iterator it=_vhashCrates.begin();
167  it!=_vhashCrates.end(); ++it)
168  {
169  HcalElectronicsId eid(*it);
170  HcalDetId did = HcalDetId(_emap->lookup(eid));
171 
172  // reset all the tmp flags to fNA
173  // MUST DO IT NOW! AS NCDAQ MIGHT OVERWRITE IT!
174  for (std::vector<flag::Flag>::iterator ft=vtmpflags.begin();
175  ft!=vtmpflags.end(); ++ft)
176  ft->reset();
177 
178  if (_xDigiSize.get(eid)>0)
179  vtmpflags[fDigiSize]._state = flag::fBAD;
180  else
181  vtmpflags[fDigiSize]._state = flag::fGOOD;
182 
183  if (did.subdet() == HcalForward)
184  {
185  if (_xNChs.get(eid)!=_xNChsNominal.get(eid))
186  vtmpflags[fNChsHF]._state = flag::fBAD;
187  else
188  vtmpflags[fNChsHF]._state = flag::fGOOD;
189  } else {
190  vtmpflags[fNChsHF]._state = flag::fNA;
191  }
192  if (unknownIdsPresent)
193  vtmpflags[fUnknownIds]._state = flag::fBAD;
194  else
195  vtmpflags[fUnknownIds]._state = flag::fGOOD;
196 
197  if (ledSignalPresent)
198  vtmpflags[fLED]._state = flag::fBAD;
199  else
200  vtmpflags[fLED]._state = flag::fGOOD;
201 
202  // push all the flags for this crate
203  lssum._vflags.push_back(vtmpflags);
204  }
205 
206  // push all the flags for all FEDs for this LS
207  _vflagsLS.push_back(lssum);
208  }
std::vector< LSSummary > _vflagsLS
MonitorElement * _meNumEvents
void setBinContent(int binx, double content)
set content of bin (1-D)
ContainerXXX< uint32_t > _xDigiSize
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
TH1 * getTH1() const
std::string _taskname
Definition: DQClient.h:47
HcalElectronicsMap const * _emap
Definition: DQClient.h:54
virtual void reset()
Definition: ContainerXXX.h:364
std::vector< uint32_t > _vhashCrates
Definition: DQClient.h:58
ProcessingType _ptype
Definition: DQModule.h:59
Container2D _cOccupancy_depth
virtual void endLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: DQClient.cc:115
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
ContainerXXX< uint32_t > _xNChsNominal
std::vector< HcalGenericDetId > allPrecisionId() const
std::map< HcalSubdetector, uint32_t > _refDigiSize
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
ContainerXXX< uint32_t > _xNChs
double getBinContent(int binx) const
get content of bin (1-D)
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:247
electronicsmap::ElectronicsMap _ehashmap
void fill(HcalDetId const &) override
Definition: Container2D.cc:59
std::string _subsystem
Definition: DQModule.h:64
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: Container2D.cc:895
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id

Member Data Documentation

bool hcaldqm::DigiRunSummary::_booked
protected

Definition at line 36 of file DigiRunSummary.h.

Referenced by endLuminosityBlock().

Container2D hcaldqm::DigiRunSummary::_cOccupancy_depth
protected

Definition at line 35 of file DigiRunSummary.h.

Referenced by beginRun(), endJob(), and endLuminosityBlock().

electronicsmap::ElectronicsMap hcaldqm::DigiRunSummary::_ehashmap
protected

Definition at line 29 of file DigiRunSummary.h.

Referenced by beginRun(), endJob(), and endLuminosityBlock().

filter::HashFilter hcaldqm::DigiRunSummary::_filter_FEDHF
protected

Definition at line 33 of file DigiRunSummary.h.

Referenced by beginRun().

filter::HashFilter hcaldqm::DigiRunSummary::_filter_uTCA
protected

Definition at line 33 of file DigiRunSummary.h.

Referenced by beginRun().

filter::HashFilter hcaldqm::DigiRunSummary::_filter_VME
protected

Definition at line 33 of file DigiRunSummary.h.

Referenced by beginRun().

MonitorElement* hcaldqm::DigiRunSummary::_meNumEvents
protected

Definition at line 37 of file DigiRunSummary.h.

Referenced by endLuminosityBlock().

std::map<HcalSubdetector, uint32_t> hcaldqm::DigiRunSummary::_refDigiSize
protected

Definition at line 42 of file DigiRunSummary.h.

Referenced by DigiRunSummary(), and endLuminosityBlock().

double hcaldqm::DigiRunSummary::_thresh_unihf
protected

Definition at line 27 of file DigiRunSummary.h.

Referenced by DigiRunSummary(), and endJob().

std::vector<int> hcaldqm::DigiRunSummary::_vFEDsuTCA
protected

Definition at line 32 of file DigiRunSummary.h.

std::vector<int> hcaldqm::DigiRunSummary::_vFEDsVME
protected

Definition at line 32 of file DigiRunSummary.h.

std::vector<LSSummary> hcaldqm::DigiRunSummary::_vflagsLS
protected

Definition at line 25 of file DigiRunSummary.h.

Referenced by endJob(), and endLuminosityBlock().

std::vector<uint32_t> hcaldqm::DigiRunSummary::_vhashFEDHF
protected

Definition at line 31 of file DigiRunSummary.h.

Referenced by beginRun().

std::vector<uint32_t> hcaldqm::DigiRunSummary::_vhashuTCA
protected

Definition at line 31 of file DigiRunSummary.h.

Referenced by beginRun().

std::vector<uint32_t> hcaldqm::DigiRunSummary::_vhashVME
protected

Definition at line 31 of file DigiRunSummary.h.

Referenced by beginRun().

ContainerXXX<uint32_t> hcaldqm::DigiRunSummary::_xDead
protected

Definition at line 39 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().

ContainerXXX<uint32_t> hcaldqm::DigiRunSummary::_xDigiSize
protected

Definition at line 39 of file DigiRunSummary.h.

Referenced by beginRun(), and endLuminosityBlock().

ContainerXXX<uint32_t> hcaldqm::DigiRunSummary::_xNChs
protected

Definition at line 39 of file DigiRunSummary.h.

Referenced by beginRun(), and endLuminosityBlock().

ContainerXXX<uint32_t> hcaldqm::DigiRunSummary::_xNChsNominal
protected

Definition at line 39 of file DigiRunSummary.h.

Referenced by beginRun(), and endLuminosityBlock().

ContainerXXX<uint32_t> hcaldqm::DigiRunSummary::_xUni
protected

Definition at line 39 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().

ContainerXXX<uint32_t> hcaldqm::DigiRunSummary::_xUniHF
protected

Definition at line 39 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().