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, nLSFlags =3,
  fUniHF =4, fDead =5, nDigiFlag = 6
}
 

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 
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 5 of file DigiRunSummary.cc.

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

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

21  {
23 
24  if (_ptype!=fOffline)
25  return;
26 
27  // INITIALIZE WHAT NEEDS TO BE INITIALIZE ONLY ONCE!
32  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
34  _vhashVME); // filter out VME
36  _vhashuTCA); // filter out uTCA
38  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
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  _vhashFEDHF); // preserve only HF FEDs
51 
56 
62 
63  _cOccupancy_depth.initialize(_name, "Occupancy",
65  new quantity::DetectorQuantity(quantity::fieta),
66  new quantity::DetectorQuantity(quantity::fiphi),
67  new quantity::ValueQuantity(quantity::fN),0);
68 
69  // GET THE NOMINAL NUMBER OF CHANNELS PER FED
70  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
71  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
72  it!=gids.end(); ++it)
73  {
74  if (!it->isHcalDetId())
75  continue;
76  HcalDetId did(it->rawId());
78  _xNChsNominal.get(eid)++;
79  }
80  }
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:15
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
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:32
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:99
ContainerXXX< uint32_t > _xNChs
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:249
electronicsmap::ElectronicsMap _ehashmap
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:91
virtual void initialize(FilterType ftype, HashType htype, std::vector< uint32_t > const &)
Definition: HashFilter.cc:26
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 203 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, 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().

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

88  {
89  DQClient::endLuminosityBlock(ib, ig, lb, es);
90 
91  if (_ptype!=fOffline)
92  return;
93 
94  LSSummary lssum;
95  lssum._LS=_currentLS;
96 
98 
99  // INITIALIZE LUMI BASED HISTOGRAMS
100  Container2D cDigiSize_Crate, cOccupancy_depth;
101  cDigiSize_Crate.initialize(_taskname, "DigiSize",
103  new quantity::ValueQuantity(quantity::fDigiSize),
104  new quantity::ValueQuantity(quantity::fN),0);
105  cOccupancy_depth.initialize(_taskname, "Occupancy",
107  new quantity::DetectorQuantity(quantity::fieta),
108  new quantity::DetectorQuantity(quantity::fiphi),
109  new quantity::ValueQuantity(quantity::fN),0);
110 
111  // LOAD LUMI BASED HISTOGRAMS
112  cOccupancy_depth.load(ig, _emap, _subsystem);
113  cDigiSize_Crate.load(ig, _emap, _subsystem);
114  MonitorElement *meNumEvents = ig.get(_subsystem+
115  "/RunInfo/NumberOfEvents");
116  int numEvents = meNumEvents->getBinContent(1);
117  bool unknownIdsPresent = ig.get(_subsystem+"/"
118  +_taskname+"/UnknownIds")->getBinContent(1)>0;
119 
120  // book the Numer of Events - set axis extendable
121  if (!_booked)
122  {
124  _meNumEvents = ib.book1D("NumberOfEvents", "NumberOfEvents",
125  1000, 1, 1001); // 1000 to start with
126  _meNumEvents->getTH1()->SetCanExtend(TH1::kXaxis);
127 
129  _booked=true;
130  }
132 
133  // ANALYZE THIS LS for LS BASED FLAGS
134  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
135  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
136  it!=gids.end(); ++it)
137  {
138  if (!it->isHcalDetId())
139  continue;
140 
141  HcalDetId did = HcalDetId(it->rawId());
143 
144  cOccupancy_depth.getBinContent(did)>0?_xNChs.get(eid)++:
145  _xNChs.get(eid)+=0;
146  _cOccupancy_depth.fill(did, cOccupancy_depth.getBinContent(did));
147  // digi size
148  cDigiSize_Crate.getMean(eid)!=
149  _refDigiSize[did.subdet()]?
150  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
151  cDigiSize_Crate.getRMS(eid)!=0?
152  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
153  }
154 
155  // GENERATE SUMMARY AND STORE IT
156  std::vector<flag::Flag> vtmpflags;
157  vtmpflags.resize(nLSFlags);
158  vtmpflags[fDigiSize]=flag::Flag("DigiSize");
159  vtmpflags[fNChsHF]=flag::Flag("NChsHF");
160  vtmpflags[fUnknownIds]=flag::Flag("UnknownIds");
161  for (std::vector<uint32_t>::const_iterator it=_vhashCrates.begin();
162  it!=_vhashCrates.end(); ++it)
163  {
164  HcalElectronicsId eid(*it);
165  HcalDetId did = HcalDetId(_emap->lookup(eid));
166 
167  // reset all the tmp flags to fNA
168  // MUST DO IT NOW! AS NCDAQ MIGHT OVERWRITE IT!
169  for (std::vector<flag::Flag>::iterator ft=vtmpflags.begin();
170  ft!=vtmpflags.end(); ++ft)
171  ft->reset();
172 
173  if (_xDigiSize.get(eid)>0)
174  vtmpflags[fDigiSize]._state = flag::fBAD;
175  else
176  vtmpflags[fDigiSize]._state = flag::fGOOD;
177 
178  if (did.subdet() == HcalForward)
179  {
180  if (_xNChs.get(eid)!=_xNChsNominal.get(eid))
181  vtmpflags[fNChsHF]._state = flag::fBAD;
182  else
183  vtmpflags[fNChsHF]._state = flag::fGOOD;
184  } else {
185  vtmpflags[fNChsHF]._state = flag::fNA;
186  }
187  if (unknownIdsPresent)
188  vtmpflags[fUnknownIds]._state = flag::fBAD;
189  else
190  vtmpflags[fUnknownIds]._state = flag::fGOOD;
191 
192  // push all the flags for this crate
193  lssum._vflags.push_back(vtmpflags);
194  }
195 
196  // push all the flags for all FEDs for this LS
197  _vflagsLS.push_back(lssum);
198  }
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:366
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:114
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:249
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().