test
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 Types | Protected Attributes
hcaldqm::DigiRunSummary Class Reference

#include <DigiRunSummary.h>

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

Public Member Functions

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

Protected Types

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

Protected Attributes

bool _booked
 
Container2D _cOccupancy_depth
 
electronicsmap::ElectronicsMap _ehashmap
 
filter::HashFilter _filter_FEDHF
 
filter::HashFilter _filter_uTCA
 
filter::HashFilter _filter_VME
 
MonitorElement_meNumEvents
 
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 > _vFEDs
 
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 9 of file DigiRunSummary.h.

Member Enumeration Documentation

Enumerator
fDigiSize 
fNChsHF 
nLSFlags 
fUniHF 
fDead 
nDigiFlag 

Definition at line 42 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 _thresh_unihf, and edm::ParameterSet::getUntrackedParameter().

6  :
7  DQClient(name, taskname, ps), _booked(false)
8  {
9  _thresh_unihf = ps.getUntrackedParameter<double>("thresh_unihf",
10  0.2);
11  }
DQClient(std::string const &, std::string const &, edm::ParameterSet const &)
Definition: DQClient.cc:5
virtual hcaldqm::DigiRunSummary::~DigiRunSummary ( )
inlinevirtual

Definition at line 14 of file DigiRunSummary.h.

14 {}

Member Function Documentation

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

Reimplemented from hcaldqm::DQClient.

Definition at line 13 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, 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.

15  {
17 
18  if (_ptype!=fOffline)
19  return;
20 
21  // INITIALIZE WHAT NEEDS TO BE INITIALIZE ONLY ONCE!
26  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
28  _vhashVME); // filter out VME
30  _vhashuTCA); // filter out uTCA
32  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
34  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
36  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
38  _vhashFEDHF); // preserve only HF FEDs
39 
44 
50 
51  _cOccupancy_depth.initialize(_name, "Occupancy",
53  new quantity::DetectorQuantity(quantity::fieta),
54  new quantity::DetectorQuantity(quantity::fiphi),
55  new quantity::ValueQuantity(quantity::fN));
56 
57  // GET THE NOMINAL NUMBER OF CHANNELS PER FED
58  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
59  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
60  it!=gids.end(); ++it)
61  {
62  if (!it->isHcalDetId())
63  continue;
64  HcalDetId did(it->rawId());
66  _xNChsNominal.get(eid)++;
67  }
68  }
ContainerXXX< uint32_t > _xDigiSize
int const CRATE_VME_MIN
Definition: Constants.h:60
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:85
HcalElectronicsMap const * _emap
Definition: DQClient.h:54
filter::HashFilter _filter_FEDHF
int const FIBER_VME_MIN
Definition: Constants.h:90
int const FIBERCH_MIN
Definition: Constants.h:100
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:93
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:65
std::vector< uint32_t > _vhashVME
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:93
ContainerXXX< uint32_t > _xNChs
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:243
electronicsmap::ElectronicsMap _ehashmap
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:85
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:72
ContainerXXX< uint32_t > _xDead
std::vector< flag::Flag > hcaldqm::DigiRunSummary::endJob ( DQMStore::IBooker ib,
DQMStore::IGetter ig 
)
virtual

Reimplemented from hcaldqm::DQClient.

Definition at line 199 of file DigiRunSummary.cc.

References _cOccupancy_depth, _ehashmap, hcaldqm::DQClient::_emap, _filter_uTCA, _filter_VME, hcaldqm::DQClient::_maxProcessedLS, hcaldqm::DQModule::_name, hcaldqm::DQModule::_ptype, hcaldqm::flag::Flag::_state, hcaldqm::DQModule::_subsystem, hcaldqm::DQClient::_taskname, _thresh_unihf, hcaldqm::DQClient::_vFEDs, _vflagsLS, hcaldqm::DQClient::_vhashFEDs, _xDead, _xUni, _xUniHF, HcalElectronicsMap::allPrecisionId(), hcaldqm::ContainerXXX< STDTYPE >::begin(), hcaldqm::ContainerSingle2D::book(), hcaldqm::Container2D::book(), hcaldqm::ContainerXXX< STDTYPE >::end(), hcaldqm::flag::fBAD, fDead, hcaldqm::hashfunctions::fdepth, fDigiSize, hcaldqm::hashfunctions::fFED, hcaldqm::quantity::fFiberuTCAFiberCh, hcaldqm::quantity::fFiberVMEFiberCh, hcaldqm::flag::fGOOD, hcaldqm::quantity::fieta, hcaldqm::Container2D::fill(), hcaldqm::quantity::fiphi, hcaldqm::quantity::fN, fNChsHF, hcaldqm::fOffline, hcaldqm::quantity::fSlotuTCA, hcaldqm::quantity::fSpigot, hcaldqm::quantity::fState, fUniHF, hcaldqm::ContainerXXX< STDTYPE >::get(), hcaldqm::Container2D::getBinContent(), HcalForward, reco::if(), hcaldqm::Container2D::initialize(), hcaldqm::ContainerSingle2D::initialize(), hcaldqm::utilities::isFEDHBHE(), hcaldqm::utilities::isFEDHF(), hcaldqm::utilities::isFEDHO(), hcaldqm::Container1D::load(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), nDigiFlag, nLSFlags, hcaldqm::ContainerXXX< STDTYPE >::reset(), hcaldqm::Container2D::setBinContent(), hcaldqm::ContainerSingle2D::setBinContent(), and HcalDetId::subdet().

201  {
202  if (_ptype!=fOffline)
203  return std::vector<flag::Flag>();
204 
206 
207  // PREPARE LS AND RUN BASED FLAGS TO USE IT FOR BOOKING
208  std::vector<flag::Flag> vflagsPerLS;
209  std::vector<flag::Flag> vflagsPerRun;
210  vflagsPerLS.resize(nLSFlags);
211  vflagsPerRun.resize(nDigiFlag-nLSFlags+1);
212  vflagsPerLS[fDigiSize]=flag::Flag("DigiSize");
213  vflagsPerLS[fNChsHF]=flag::Flag("NChsHF");
214  vflagsPerRun[fDigiSize]=flag::Flag("DigiSize");
215  vflagsPerRun[fNChsHF]=flag::Flag("NChsHF");
216  vflagsPerRun[fUniHF-nLSFlags+1]=flag::Flag("UniSlotHF");
217  vflagsPerRun[fDead-nLSFlags+1]=flag::Flag("Dead");
218 
219  // INITIALIZE SUMMARY CONTAINERS
220  ContainerSingle2D cSummaryvsLS;
221  Container2D cSummaryvsLS_FED;
222  cSummaryvsLS.initialize(_name, "SummaryvsLS",
223  new quantity::LumiSection(_maxProcessedLS),
224  new quantity::FEDQuantity(_vFEDs),
225  new quantity::ValueQuantity(quantity::fState));
226  cSummaryvsLS_FED.initialize(_name, "SummaryvsLS",
228  new quantity::LumiSection(_maxProcessedLS),
229  new quantity::FlagQuantity(vflagsPerLS),
230  new quantity::ValueQuantity(quantity::fState));
231  cSummaryvsLS_FED.book(ib, _emap, _subsystem);
232  cSummaryvsLS.book(ib, _subsystem);
233 
234  // INITIALIZE CONTAINERS WE NEED TO LOAD or BOOK
235  Container2D cOccupancyCut_depth;
236  Container2D cDead_depth, cDead_FEDVME, cDead_FEDuTCA;
237  cOccupancyCut_depth.initialize(_taskname, "OccupancyCut",
239  new quantity::DetectorQuantity(quantity::fieta),
240  new quantity::DetectorQuantity(quantity::fiphi),
241  new quantity::ValueQuantity(quantity::fN));
242  cDead_depth.initialize(_name, "Dead",
244  new quantity::DetectorQuantity(quantity::fieta),
245  new quantity::DetectorQuantity(quantity::fiphi),
246  new quantity::ValueQuantity(quantity::fN));
247  cDead_FEDVME.initialize(_name, "Dead",
249  new quantity::ElectronicsQuantity(quantity::fSpigot),
250  new quantity::ElectronicsQuantity(quantity::fFiberVMEFiberCh),
251  new quantity::ValueQuantity(quantity::fN));
252  cDead_FEDuTCA.initialize(_name, "Dead",
254  new quantity::ElectronicsQuantity(quantity::fSlotuTCA),
255  new quantity::ElectronicsQuantity(quantity::fFiberuTCAFiberCh),
256  new quantity::ValueQuantity(quantity::fN));
257 
258  // LOAD
259  cOccupancyCut_depth.load(ig, _emap, _subsystem);
260  cDead_depth.book(ib, _emap, _subsystem);
261  cDead_FEDVME.book(ib, _emap, _filter_uTCA, _subsystem);
262  cDead_FEDuTCA.book(ib, _emap, _filter_VME, _subsystem);
263 
264  // ANALYZE RUN BASED QUANTITIES
265  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
266  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
267  it!=gids.end(); ++it)
268  {
269  if (!it->isHcalDetId())
270  continue;
271 
272  HcalDetId did = HcalDetId(it->rawId());
274 
275  if (_cOccupancy_depth.getBinContent(did)<1)
276  {
277  _xDead.get(eid)++;
278  cDead_depth.fill(did);
279  eid.isVMEid()?cDead_FEDVME.fill(eid):cDead_FEDuTCA.fill(eid);
280  }
281  if (did.subdet()==HcalForward)
282  _xUniHF.get(eid)+=cOccupancyCut_depth.getBinContent(did);
283  }
284  // ANALYZE FOR HF SLOT UNIFORMITY
285  for (uintCompactMap::const_iterator it=_xUniHF.begin();
286  it!=_xUniHF.end(); ++it)
287  {
288  uint32_t hash1 = it->first;
289  HcalElectronicsId eid1(hash1);
290  double x1 = it->second;
291 
292  for (uintCompactMap::const_iterator jt=_xUniHF.begin();
293  jt!=_xUniHF.end(); ++jt)
294  {
295  if (jt==it)
296  continue;
297 
298  double x2 = jt->second;
299  if (x2==0)
300  continue;
301  if (x1/x2<_thresh_unihf)
302  _xUni.get(eid1)++;
303  }
304  }
305 
306  /*
307  * Iterate over each FED
308  * Iterate over each LS Summary
309  * Iterate over all flags
310  * set...
311  */
312  // iterate over all FEDs
313  std::vector<flag::Flag> sumflags;
314  int ifed=0;
315  for (std::vector<uint32_t>::const_iterator it=_vhashFEDs.begin();
316  it!=_vhashFEDs.end(); ++it)
317  {
318  flag::Flag fSumRun("DIGI"); // summary flag for this FED
319  flag::Flag ffDead("Dead");
320  flag::Flag ffUniSlotHF("UniSlotHF");
321  HcalElectronicsId eid(*it);
322 
323  // ITERATE OVER EACH LS
324  for (std::vector<LSSummary>::const_iterator itls=_vflagsLS.begin();
325  itls!=_vflagsLS.end(); ++itls)
326  {
327  int iflag=0;
328  flag::Flag fSumLS("DIGI");
329  for (std::vector<flag::Flag>::const_iterator ft=
330  itls->_vflags[ifed].begin(); ft!=itls->_vflags[ifed].end();
331  ++ft)
332  {
333  cSummaryvsLS_FED.setBinContent(eid, itls->_LS, int(iflag),
334  ft->_state);
335  fSumLS+=(*ft);
336  iflag++;
337  }
338  cSummaryvsLS.setBinContent(eid, itls->_LS, fSumLS._state);
339  fSumRun+=fSumLS;
340  }
341 
342  // EVALUATE RUN BASED FLAGS
343  // NOTE, THAT IF THE FED IS NOT @cDAQ fSumRun state will be fNCDAQ
344  if (utilities::isFEDHBHE(eid) || utilities::isFEDHF(eid) ||
345  utilities::isFEDHO(eid))
346  {
347  if (_xDead.get(eid)>0)
348  ffDead._state = flag::fBAD;
349  else
350  ffDead._state = flag::fGOOD;
351  if (utilities::isFEDHF(eid))
352  {
353  if (_xUni.get(eid)>0)
354  ffUniSlotHF._state = flag::fBAD;
355  else
356  ffUniSlotHF._state = flag::fGOOD;
357  }
358  }
359  fSumRun+=ffDead+ffUniSlotHF;
360 
361  // push the summary flag for this FED for the Whole Run
362  sumflags.push_back(fSumRun);
363 
364  // increment fed
365  ifed++;
366  }
367 
368  return sumflags;
369  }
std::vector< LSSummary > _vflagsLS
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
ContainerXXX< uint32_t > _xUni
std::vector< uint32_t > _vhashFEDs
Definition: DQClient.h:58
virtual CompactMap::const_iterator begin()
Definition: ContainerXXX.h:69
std::string _taskname
Definition: DQClient.h:47
HcalElectronicsMap const * _emap
Definition: DQClient.h:54
virtual void reset()
Definition: ContainerXXX.h:342
virtual CompactMap::const_iterator end()
Definition: ContainerXXX.h:71
ProcessingType _ptype
Definition: DQModule.h:59
filter::HashFilter _filter_uTCA
Container2D _cOccupancy_depth
std::vector< HcalGenericDetId > allPrecisionId() const
std::string _name
Definition: DQModule.h:57
bool isFEDHBHE(HcalElectronicsId const &)
Definition: Utilities.cc:124
std::vector< int > _vFEDs
Definition: DQClient.h:57
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:243
if(dp >Float(M_PI)) dp-
electronicsmap::ElectronicsMap _ehashmap
std::string _subsystem
Definition: DQModule.h:64
bool isFEDHO(HcalElectronicsId const &)
Definition: Utilities.cc:171
filter::HashFilter _filter_VME
Readout chain identification for Hcal.
bool isFEDHF(HcalElectronicsId const &)
Definition: Utilities.cc:146
ContainerXXX< uint32_t > _xUniHF
virtual double getBinContent(HcalDetId const &)
Definition: Container2D.cc:184
ContainerXXX< uint32_t > _xDead
void hcaldqm::DigiRunSummary::endLuminosityBlock ( DQMStore::IBooker ib,
DQMStore::IGetter ig,
edm::LuminosityBlock const &  lb,
edm::EventSetup const &  es 
)
virtual

Reimplemented from hcaldqm::DQClient.

Definition at line 73 of file DigiRunSummary.cc.

References _booked, _cOccupancy_depth, hcaldqm::DQModule::_currentLS, _ehashmap, hcaldqm::DQClient::_emap, hcaldqm::DQClient::LSSummary::_LS, _meNumEvents, hcaldqm::DQModule::_ptype, hcaldqm::DQModule::_subsystem, hcaldqm::DQClient::_taskname, hcaldqm::DQClient::_vcdaqEids, hcaldqm::DQClient::LSSummary::_vflags, _vflagsLS, hcaldqm::DQClient::_vhashFEDs, _xDigiSize, _xNChs, _xNChsNominal, HcalElectronicsMap::allPrecisionId(), hcaldqm::Container2D::book(), DQMStore::IBooker::book1D(), hcaldqm::constants::DIGISIZE, hcaldqm::DQClient::endLuminosityBlock(), hcaldqm::flag::fBAD, hcaldqm::hashfunctions::fdepth, hcaldqm::quantity::fDigiSize, fDigiSize, hcaldqm::hashfunctions::fFED, hcaldqm::flag::fGOOD, hcaldqm::quantity::fieta, hcaldqm::Container2D::fill(), spr::find(), hcaldqm::quantity::fiphi, hcaldqm::quantity::fN, hcaldqm::flag::fNCDAQ, fNChsHF, hcaldqm::fOffline, hcaldqm::ContainerXXX< STDTYPE >::get(), DQMStore::IGetter::get(), hcaldqm::Container2D::getBinContent(), MonitorElement::getBinContent(), hcaldqm::Container1D::getMean(), hcaldqm::Container1D::getRMS(), MonitorElement::getTH1(), hcaldqm::Container2D::initialize(), hcaldqm::utilities::isFEDHBHE(), hcaldqm::utilities::isFEDHF(), hcaldqm::utilities::isFEDHO(), hcaldqm::Container1D::load(), hcaldqm::electronicsmap::ElectronicsMap::lookup(), nLSFlags, simpleEdmComparison::numEvents, hcaldqm::ContainerXXX< STDTYPE >::reset(), MonitorElement::setBinContent(), DQMStore::IBooker::setCurrentFolder(), and HcalDetId::subdet().

76  {
77  DQClient::endLuminosityBlock(ib, ig, lb, es);
78 
79  if (_ptype!=fOffline)
80  return;
81 
82  LSSummary lssum;
83  lssum._LS=_currentLS;
84 
86 
87  // INITIALIZE LUMI BASED HISTOGRAMS
88  Container2D cDigiSize_FED, cOccupancy_depth;
89  cDigiSize_FED.initialize(_taskname, "DigiSize",
91  new quantity::ValueQuantity(quantity::fDigiSize),
92  new quantity::ValueQuantity(quantity::fN));
93  cOccupancy_depth.initialize(_taskname, "Occupancy",
95  new quantity::DetectorQuantity(quantity::fieta),
96  new quantity::DetectorQuantity(quantity::fiphi),
97  new quantity::ValueQuantity(quantity::fN));
98 
99  // LOAD LUMI BASED HISTOGRAMS
100  cOccupancy_depth.load(ig, _emap, _subsystem);
101  cDigiSize_FED.load(ig, _emap, _subsystem);
102  MonitorElement *meNumEvents = ig.get(_subsystem+
103  "/RunInfo/NumberOfEvents");
104  int numEvents = meNumEvents->getBinContent(1);
105 
106  // book the Numer of Events - set axis extendable
107  if (!_booked)
108  {
110  _meNumEvents = ib.book1D("NumberOfEvents", "NumberOfEvents",
111  1000, 1, 1001); // 1000 to start with
112  _meNumEvents->getTH1()->SetCanExtend(TH1::kXaxis);
113 
115  _booked=true;
116  }
118 
119  // ANALYZE THIS LS for LS BASED FLAGS
120  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
121  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
122  it!=gids.end(); ++it)
123  {
124  if (!it->isHcalDetId())
125  continue;
126 
127  HcalDetId did = HcalDetId(it->rawId());
129 
130  cOccupancy_depth.getBinContent(did)>0?_xNChs.get(eid)++:
131  _xNChs.get(eid)+=0;
132  _cOccupancy_depth.fill(did, cOccupancy_depth.getBinContent(did));
133  // digi size
134  cDigiSize_FED.getMean(eid)!=
135  constants::DIGISIZE[did.subdet()-1]?
136  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
137  cDigiSize_FED.getRMS(eid)!=0?
138  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
139  }
140 
141  // GENERATE SUMMARY AND STORE IT
142  std::vector<flag::Flag> vtmpflags;
143  vtmpflags.resize(nLSFlags);
144  vtmpflags[fDigiSize]=flag::Flag("DigiSize");
145  vtmpflags[fNChsHF]=flag::Flag("NChsHF");
146  for (std::vector<uint32_t>::const_iterator it=_vhashFEDs.begin();
147  it!=_vhashFEDs.end(); ++it)
148  {
149  HcalElectronicsId eid(*it);
150 
151  // reset all the tmp flags to fNA
152  // MUST DO IT NOW! AS NCDAQ MIGHT OVERWRITE IT!
153  for (std::vector<flag::Flag>::iterator ft=vtmpflags.begin();
154  ft!=vtmpflags.end(); ++ft)
155  ft->reset();
156 
157  std::vector<uint32_t>::const_iterator cit=std::find(
158  _vcdaqEids.begin(), _vcdaqEids.end(), *it);
159  if (cit==_vcdaqEids.end())
160  {
161  // was not @cDAQ, set all the flags for this FED as fNCDAQ
162  for (std::vector<flag::Flag>::iterator ft=vtmpflags.begin();
163  ft!=vtmpflags.end(); ++ft)
164  ft->_state = flag::fNCDAQ;
165 
166  // push all the flags for this FED
167  // IMPORTANT!!!
168  lssum._vflags.push_back(vtmpflags);
169  continue;
170  }
171 
172  if (utilities::isFEDHBHE(eid) || utilities::isFEDHF(eid) ||
173  utilities::isFEDHO(eid))
174  {
175  if (_xDigiSize.get(eid)>0)
176  vtmpflags[fDigiSize]._state = flag::fBAD;
177  else
178  vtmpflags[fDigiSize]._state = flag::fGOOD;
179  if (utilities::isFEDHF(eid))
180  {
181  if (_xNChs.get(eid)!=_xNChsNominal.get(eid))
182  vtmpflags[fNChsHF]._state = flag::fBAD;
183  else
184  vtmpflags[fNChsHF]._state = flag::fGOOD;
185  }
186  }
187 
188  // push all the flags for this FED
189  lssum._vflags.push_back(vtmpflags);
190  }
191 
192  // push all the flags for all FEDs for this LS
193  _vflagsLS.push_back(lssum);
194  }
std::vector< uint32_t > _vcdaqEids
Definition: DQClient.h:64
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:304
std::vector< uint32_t > _vhashFEDs
Definition: DQClient.h:58
std::string _taskname
Definition: DQClient.h:47
HcalElectronicsMap const * _emap
Definition: DQClient.h:54
virtual void reset()
Definition: ContainerXXX.h:342
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
virtual void fill(HcalDetId const &)
Definition: Container2D.cc:59
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:84
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
ContainerXXX< uint32_t > _xNChsNominal
TH1 * getTH1(void) const
std::vector< HcalGenericDetId > allPrecisionId() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
bool isFEDHBHE(HcalElectronicsId const &)
Definition: Utilities.cc:124
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container2D.cc:895
int const DIGISIZE[SUBDET_NUM]
Definition: Constants.h:132
ContainerXXX< uint32_t > _xNChs
double getBinContent(int binx) const
get content of bin (1-D)
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:243
electronicsmap::ElectronicsMap _ehashmap
std::string _subsystem
Definition: DQModule.h:64
bool isFEDHO(HcalElectronicsId const &)
Definition: Utilities.cc:171
Readout chain identification for Hcal.
bool isFEDHF(HcalElectronicsId const &)
Definition: Utilities.cc:146

Member Data Documentation

bool hcaldqm::DigiRunSummary::_booked
protected

Definition at line 35 of file DigiRunSummary.h.

Referenced by endLuminosityBlock().

Container2D hcaldqm::DigiRunSummary::_cOccupancy_depth
protected

Definition at line 34 of file DigiRunSummary.h.

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

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

Definition at line 28 of file DigiRunSummary.h.

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

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

Definition at line 32 of file DigiRunSummary.h.

Referenced by beginRun().

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

Definition at line 32 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().

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

Definition at line 32 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().

MonitorElement* hcaldqm::DigiRunSummary::_meNumEvents
protected

Definition at line 36 of file DigiRunSummary.h.

Referenced by endLuminosityBlock().

double hcaldqm::DigiRunSummary::_thresh_unihf
protected

Definition at line 26 of file DigiRunSummary.h.

Referenced by DigiRunSummary(), and endJob().

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

Definition at line 31 of file DigiRunSummary.h.

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

Definition at line 31 of file DigiRunSummary.h.

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

Definition at line 24 of file DigiRunSummary.h.

Referenced by endJob(), and endLuminosityBlock().

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

Definition at line 30 of file DigiRunSummary.h.

Referenced by beginRun().

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

Definition at line 30 of file DigiRunSummary.h.

Referenced by beginRun().

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

Definition at line 30 of file DigiRunSummary.h.

Referenced by beginRun().

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

Definition at line 38 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().

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

Definition at line 38 of file DigiRunSummary.h.

Referenced by beginRun(), and endLuminosityBlock().

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

Definition at line 38 of file DigiRunSummary.h.

Referenced by beginRun(), and endLuminosityBlock().

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

Definition at line 38 of file DigiRunSummary.h.

Referenced by beginRun(), and endLuminosityBlock().

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

Definition at line 38 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().

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

Definition at line 38 of file DigiRunSummary.h.

Referenced by beginRun(), and endJob().