CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TEventInfoClient Class Reference

#include <L1TEventInfoClient.h>

Inheritance diagram for L1TEventInfoClient:
DQMEDHarvester edm::one::EDProducer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources, edm::EndLuminosityBlockProducer > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TEventInfoClient (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~L1TEventInfoClient ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) override final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) override
 
virtual void produce (edm::Event &, edm::EventSetup const &) override final
 
- Public Member Functions inherited from edm::one::EDProducer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources, edm::EndLuminosityBlockProducer >
 EDProducer ()=default
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 end job More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &, const edm::EventSetup &) override
 
- 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 Member Functions

void book (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 book histograms More...
 
void dumpContentMonitorElements (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 dump the content of the monitoring elements defined in this module More...
 
void initialize ()
 private methods More...
 
void readQtResults (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 read quality test results More...
 

Private Attributes

std::vector< std::string > m_disableL1Objects
 
std::vector< std::string > m_disableL1Systems
 
std::vector< edm::ParameterSetm_l1Objects
 
std::vector< edm::ParameterSetm_l1Systems
 
MonitorElementm_meReportSummary
 a summary report More...
 
std::vector< MonitorElement * > m_meReportSummaryContent
 monitor elements to report content for all quality tests More...
 
MonitorElementm_meReportSummaryMap
 report summary map More...
 
std::string m_monitorDir
 
size_t m_nrL1Objects
 number of L1 trigger objects More...
 
size_t m_nrL1Systems
 number of L1 trigger systems More...
 
std::vector< int > m_objectDisable
 
std::vector< std::string > m_objectFolder
 
std::vector< std::string > m_objectLabel
 
std::vector< std::vector< unsigned int > > m_objectQtSummaryEnabled
 
std::vector< std::vector< std::string > > m_objectQualityTestHist
 
std::vector< std::vector< std::string > > m_objectQualityTestName
 
Float_t m_reportSummary
 summary report More...
 
bool m_runInEndJob
 
bool m_runInEndLumi
 
bool m_runInEndRun
 
bool m_runInEventLoop
 
std::vector< int > m_summaryContent
 
Float_t m_summarySum
 
std::vector< int > m_systemDisable
 
std::vector< std::string > m_systemLabel
 
std::vector< std::string > m_systemLabelExt
 
std::vector< std::vector< unsigned int > > m_systemQtSummaryEnabled
 
std::vector< std::vector< std::string > > m_systemQualityTestHist
 
std::vector< std::vector< std::string > > m_systemQualityTestName
 
size_t m_totalNrQtSummaryEnabled
 
bool m_verbose
 input parameters More...
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Description: fill L1 report summary for trigger L1T and emulator L1TEMU DQM.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Re-designed and fully rewritten class. Original version and authors: see CVS history

Description: see header file.

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 41 of file L1TEventInfoClient.h.

Constructor & Destructor Documentation

L1TEventInfoClient::L1TEventInfoClient ( const edm::ParameterSet parSet)

Constructor.

Definition at line 44 of file L1TEventInfoClient.cc.

References initialize().

44  :
45  m_verbose(parSet.getUntrackedParameter<bool>("verbose", false)),
46  m_monitorDir(parSet.getUntrackedParameter<std::string>("monitorDir", "")),
47  m_runInEventLoop(parSet.getUntrackedParameter<bool>("runInEventLoop", false)),
48  m_runInEndLumi(parSet.getUntrackedParameter<bool>("runInEndLumi", false)),
49  m_runInEndRun(parSet.getUntrackedParameter<bool>("runInEndRun", false)),
50  m_runInEndJob(parSet.getUntrackedParameter<bool>("runInEndJob", false)),
51  m_l1Systems(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Systems")),
52  m_l1Objects(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Objects")),
53  m_disableL1Systems(parSet.getParameter<std::vector<std::string> >("DisableL1Systems")),
54  m_disableL1Objects(parSet.getParameter<std::vector<std::string> >("DisableL1Objects")),
55  m_nrL1Systems(0),
56  m_nrL1Objects(0),
58 
59  initialize();
60 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void initialize()
private methods
std::vector< edm::ParameterSet > m_l1Objects
std::vector< edm::ParameterSet > m_l1Systems
std::vector< std::string > m_disableL1Objects
std::vector< std::string > m_disableL1Systems
size_t m_nrL1Objects
number of L1 trigger objects
size_t m_nrL1Systems
number of L1 trigger systems
bool m_verbose
input parameters
L1TEventInfoClient::~L1TEventInfoClient ( )
virtual

Destructor.

Definition at line 63 of file L1TEventInfoClient.cc.

63  {
64 
65  //empty
66 
67 }

Member Function Documentation

void L1TEventInfoClient::book ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

book histograms

Definition at line 354 of file L1TEventInfoClient.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), dqm::qstatus::DISABLED, MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::getName(), m_meReportSummary, m_meReportSummaryContent, m_meReportSummaryMap, m_monitorDir, m_nrL1Objects, m_nrL1Systems, m_objectLabel, m_objectQualityTestName, m_summaryContent, m_systemLabel, m_systemQualityTestName, hpstanc_transforms::max, DQMStore::IGetter::removeElement(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), MonitorElement::setTitle(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

354  {
355 
356  std::string dirEventInfo = m_monitorDir + "/EventInfo";
357 
358  ibooker.setCurrentFolder(dirEventInfo);
359 
360  // remove m_meReportSummary if it exists
361  if ((m_meReportSummary = igetter.get(dirEventInfo + "/reportSummary"))) {
363  }
364 
365  // ...and book it again
366  m_meReportSummary = ibooker.bookFloat("reportSummary");
367 
368  // initialize reportSummary to 1
369 
370  if (m_meReportSummary) {
372  }
373 
374  // define float histograms for reportSummaryContents (one histogram per quality test),
375  // initialize them to zero
376  // initialize also m_summaryContent to dqm::qstatus::DISABLED
377 
378  ibooker.setCurrentFolder(dirEventInfo + "/reportSummaryContents");
379  // general counters:
380  // iAllQTest: all quality tests for all systems and objects
381  // iAllMon: all monitored systems and objects
382  int iAllQTest = 0;
383  int iAllMon = 0;
384 
385  for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
386 
388 
389  const std::vector<std::string>& sysQtName =
391 
392  for (std::vector<std::string>::const_iterator itQtName =
393  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
394 
395  const std::string hStr = m_monitorDir + "_L1Sys_" +m_systemLabel[iMon] + "_" + (*itQtName);
396 
397  m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));
398  m_meReportSummaryContent[iAllQTest]->Fill(0.);
399 
400  iAllQTest++;
401  }
402 
403  iAllMon++;
404  }
405 
406 
407  for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
408 
410 
411  const std::vector<std::string>& objQtName =
413 
414  for (std::vector<std::string>::const_iterator itQtName =
415  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
416 
417  const std::string hStr = m_monitorDir + "_L1Obj_" + m_objectLabel[iMon] + "_" + (*itQtName);
418 
419  m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));
420  m_meReportSummaryContent[iAllQTest]->Fill(0.);
421 
422  iAllQTest++;
423  }
424 
425  iAllMon++;
426 
427  }
428 
429  ibooker.setCurrentFolder(dirEventInfo);
430 
431  if ((m_meReportSummaryMap = igetter.get(dirEventInfo + "/reportSummaryMap"))) {
433  }
434 
435  // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y
436 
437  int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects);
438 
439  m_meReportSummaryMap = ibooker.book2D("reportSummaryMap",
440  "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
441 
442  if (m_monitorDir == "L1TEMU") {
444  "L1TEMU: L1 Emulator vs Data Report Summary Map");
445 
446  } else if (m_monitorDir == "L1T") {
448  "L1T: L1 Trigger Data Report Summary Map");
449  } else {
450  // do nothing
451  }
452 
455 
456  m_meReportSummaryMap->setBinLabel(1, "L1 systems", 1);
457  m_meReportSummaryMap->setBinLabel(2, "L1 objects", 1);
458 
459  for (int iBin = 0; iBin < nBinsY; ++iBin) {
460 
461  m_meReportSummaryMap->setBinLabel(iBin + 1, " ", 2);
462  }
463 
464 }
std::vector< std::vector< std::string > > m_systemQualityTestName
const std::string & getName(void) const
get name of ME
std::vector< std::string > m_systemLabel
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
MonitorElement * m_meReportSummaryMap
report summary map
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)
void Fill(long long x)
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
MonitorElement * m_meReportSummary
a summary report
static const int DISABLED
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::vector< std::string > m_objectLabel
std::vector< std::vector< std::string > > m_objectQualityTestName
size_t m_nrL1Objects
number of L1 trigger objects
size_t m_nrL1Systems
number of L1 trigger systems
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void removeElement(Args &&...args)
Definition: DQMStore.h:202
std::vector< int > m_summaryContent
void L1TEventInfoClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

end job

Implements DQMEDHarvester.

Definition at line 255 of file L1TEventInfoClient.cc.

References book(), gather_cfg::cout, dumpContentMonitorElements(), m_verbose, and readQtResults().

255  {
256 
257  book(ibooker, igetter);
258 
259  readQtResults(ibooker, igetter);
260 
261  if (m_verbose) {
262 
263  std::cout << "\n L1TEventInfoClient::endRun\n" << std::endl;
264  dumpContentMonitorElements(ibooker, igetter);
265  }
266 }
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
book histograms
void readQtResults(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
read quality test results
void dumpContentMonitorElements(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
dump the content of the monitoring elements defined in this module
bool m_verbose
input parameters
void L1TEventInfoClient::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const edm::LuminosityBlock lumiSeg,
const edm::EventSetup evSetup 
)
overrideprotected

Definition at line 236 of file L1TEventInfoClient.cc.

References book(), gather_cfg::cout, dumpContentMonitorElements(), m_runInEndLumi, m_verbose, and readQtResults().

236  {
237 
238 
239  if (m_runInEndLumi) {
240 
241  book(ibooker, igetter);
242  readQtResults(ibooker, igetter);
243 
244  if (m_verbose) {
245 
246  std::cout << "\n L1TEventInfoClient::endLuminosityBlock\n"
247  << std::endl;
248  dumpContentMonitorElements(ibooker, igetter);
249  }
250 
251  }
252 }
void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
book histograms
void readQtResults(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
read quality test results
void dumpContentMonitorElements(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
dump the content of the monitoring elements defined in this module
bool m_verbose
input parameters
void L1TEventInfoClient::dumpContentMonitorElements ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

dump the content of the monitoring elements defined in this module

Definition at line 268 of file L1TEventInfoClient.cc.

References gather_cfg::cout, DQMStore::IGetter::get(), MonitorElement::getName(), MonitorElement::getTH2F(), create_public_lumi_plots::hist, m_meReportSummaryContent, m_meReportSummaryMap, m_monitorDir, m_nrL1Objects, m_nrL1Systems, m_objectDisable, m_objectLabel, m_summaryContent, m_systemDisable, m_systemLabel, and m_systemLabelExt.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

268  {
269 
270  std::cout << "\nSummary report " << std::endl;
271 
272  // summary content
273 
275 
276  std::cout
277  << "\nSummary content per system and object as filled in histogram\n "
278  << m_meReportSummaryMap->getName() << std::endl;
279 
280  if (!me) {
281 
282  std::cout << "\nNo histogram " << m_meReportSummaryMap->getName()
283  << "\nNo summary content per system and object as filled in histogram.\n "
284  << std::endl;
285  return;
286 
287  }
288 
289  TH2F* hist = me->getTH2F();
290 
291  const int nBinsX = hist->GetNbinsX();
292  const int nBinsY = hist->GetNbinsY();
293  std::cout << nBinsX << " " << nBinsY;
294 
295  std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(
296  nBinsY));
297 
298 // for (int iBinX = 0; iBinX < nBinsX; iBinX++) {
299 // for (int iBinY = 0; iBinY < nBinsY; iBinY++) {
300 // meReportSummaryMap[iBinX][iBinY]
301 // = static_cast<int>(me->GetBinContent(iBinX + 1, iBinY + 1));
302 // }
303 // }
304 
305  std::cout << "\nL1 systems: " << m_nrL1Systems << " systems included\n"
306  << "\n Summary content size: " << (m_summaryContent.size())
307  << std::endl;
308 
309  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
310 
311  std::cout << std::setw(10) << m_systemLabel[iSys] << std::setw(10)
312  << m_systemLabelExt[iSys] << " \t" << m_systemDisable[iSys]
313  << " \t" << std::setw(25) << " m_summaryContent["
314  << std::setw(2) << iSys << "] = " << meReportSummaryMap[0][iSys]
315  << std::endl;
316  }
317 
318  std::cout << "\n L1 trigger objects: " << m_nrL1Objects
319  << " objects included\n" << std::endl;
320 
321  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
322  + m_nrL1Objects; ++iMon) {
323 
324  std::cout << std::setw(20) << m_objectLabel[iMon - m_nrL1Systems]
325  << " \t" << m_objectDisable[iMon - m_nrL1Systems] << " \t"
326  << std::setw(25) << " m_summaryContent[" << std::setw(2)
327  << iMon << "] = \t" << m_summaryContent[iMon] << std::endl;
328  }
329 
330  std::cout << std::endl;
331 
332  // quality tests
333 
334  std::cout << "\nQuality test results as filled in " << "\n "
335  << m_monitorDir << "/EventInfo/reportSummaryContents\n"
336  << "\n Total number of quality tests: "
337  << (m_meReportSummaryContent.size()) << "\n" << std::endl;
338 
339  for (std::vector<MonitorElement*>::const_iterator itME =
340  m_meReportSummaryContent.begin(); itME
341  != m_meReportSummaryContent.end(); ++itME) {
342 
343  std::cout << std::setw(50) << (*itME)->getName() << " \t"
344  << std::setw(25) << (*itME)->getFloatValue() << std::endl;
345 
346  }
347 
348  std::cout << std::endl;
349 
350 }
const std::string & getName(void) const
get name of ME
std::vector< int > m_objectDisable
std::vector< std::string > m_systemLabel
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
std::vector< std::string > m_systemLabelExt
MonitorElement * m_meReportSummaryMap
report summary map
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
std::vector< int > m_systemDisable
std::vector< std::string > m_objectLabel
size_t m_nrL1Objects
number of L1 trigger objects
size_t m_nrL1Systems
number of L1 trigger systems
TH2F * getTH2F(void) const
std::vector< int > m_summaryContent
void L1TEventInfoClient::initialize ( )
private

private methods

initialize properly all elements

Definition at line 69 of file L1TEventInfoClient.cc.

References gather_cfg::cout, m_disableL1Objects, m_disableL1Systems, m_l1Objects, m_l1Systems, m_meReportSummaryContent, m_monitorDir, m_nrL1Objects, m_nrL1Systems, m_objectDisable, m_objectLabel, m_objectQtSummaryEnabled, m_objectQualityTestHist, m_objectQualityTestName, m_summaryContent, m_systemDisable, m_systemLabel, m_systemLabelExt, m_systemQtSummaryEnabled, m_systemQualityTestHist, m_systemQualityTestName, m_totalNrQtSummaryEnabled, m_verbose, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by L1TEventInfoClient().

69  {
70 
71  if (m_verbose) {
72  std::cout << "\nMonitor directory = " << m_monitorDir
73  << std::endl;
74  }
75 
76  // L1 systems
77 
78  m_nrL1Systems = m_l1Systems.size();
79 
83 
84  // on average five quality test per system - just a best guess
88 
89  int indexSys = 0;
90 
91  int totalNrQualityTests = 0;
92 
93  for (std::vector<edm::ParameterSet>::const_iterator itSystem =
94  m_l1Systems.begin(); itSystem != m_l1Systems.end(); ++itSystem) {
95 
96  m_systemLabel.push_back(itSystem->getParameter<std::string>(
97  "SystemLabel"));
98 
99  m_systemLabelExt.push_back(itSystem->getParameter<std::string>(
100  "HwValLabel"));
101 
102  m_systemDisable.push_back(itSystem->getParameter<unsigned int>(
103  "SystemDisable"));
104  // check the additional disable flag from m_disableL1Systems
105  for (std::vector<std::string>::const_iterator itSys =
106  m_disableL1Systems.begin(); itSys != m_disableL1Systems.end(); ++itSys) {
107 
108  if (*itSys == m_systemLabel[indexSys]) {
109  m_systemDisable[indexSys] = 1;
110 
111  }
112  }
113 
114  std::vector < edm::ParameterSet > qTests = itSystem->getParameter<
115  std::vector<edm::ParameterSet> > ("QualityTests");
116  size_t qtPerSystem = qTests.size();
117 
118  std::vector < std::string > qtNames;
119  qtNames.reserve(qtPerSystem);
120 
121  std::vector < std::string > qtFullPathHists;
122  qtFullPathHists.reserve(qtPerSystem);
123 
124  std::vector<unsigned int> qtSumEnabled;
125  qtSumEnabled.reserve(qtPerSystem);
126 
127  for (std::vector<edm::ParameterSet>::const_iterator itQT =
128  qTests.begin(); itQT != qTests.end(); ++itQT) {
129 
130  totalNrQualityTests++;
131 
132  qtNames.push_back(
133  itQT->getParameter<std::string> ("QualityTestName"));
134 
135  qtFullPathHists.push_back(
136  itQT->getParameter<std::string> ("QualityTestHist"));
137 
138  unsigned int qtEnabled = itQT->getParameter<unsigned int> (
139  "QualityTestSummaryEnabled");
140 
141  qtSumEnabled.push_back(qtEnabled);
142 
143  if (qtEnabled) {
145  }
146  }
147 
148  m_systemQualityTestName.push_back(qtNames);
149  m_systemQualityTestHist.push_back(qtFullPathHists);
150  m_systemQtSummaryEnabled.push_back(qtSumEnabled);
151 
152  indexSys++;
153 
154  }
155 
156  // L1 objects
157 
158  //
159  m_nrL1Objects = m_l1Objects.size();
160 
161  m_objectLabel.reserve(m_nrL1Objects);
163 
164  // on average five quality test per object - just a best guess
168 
169  int indexObj = 0;
170 
171  for (std::vector<edm::ParameterSet>::const_iterator itObject =
172  m_l1Objects.begin(); itObject != m_l1Objects.end(); ++itObject) {
173 
174  m_objectLabel.push_back(itObject->getParameter<std::string>(
175  "ObjectLabel"));
176 
177  m_objectDisable.push_back(itObject->getParameter<unsigned int>(
178  "ObjectDisable"));
179  // check the additional disable flag from m_disableL1Objects
180  for (std::vector<std::string>::const_iterator itObj =
181  m_disableL1Objects.begin(); itObj != m_disableL1Objects.end(); ++itObj) {
182 
183  if (*itObj == m_objectLabel[indexObj]) {
184  m_objectDisable[indexObj] = 1;
185 
186  }
187  }
188 
189  std::vector < edm::ParameterSet > qTests = itObject->getParameter<
190  std::vector<edm::ParameterSet> > ("QualityTests");
191  size_t qtPerObject = qTests.size();
192 
193  std::vector < std::string > qtNames;
194  qtNames.reserve(qtPerObject);
195 
196  std::vector < std::string > qtFullPathHists;
197  qtFullPathHists.reserve(qtPerObject);
198 
199  std::vector<unsigned int> qtSumEnabled;
200  qtSumEnabled.reserve(qtPerObject);
201 
202  for (std::vector<edm::ParameterSet>::const_iterator itQT =
203  qTests.begin(); itQT != qTests.end(); ++itQT) {
204 
205  totalNrQualityTests++;
206 
207  qtNames.push_back(
208  itQT->getParameter<std::string> ("QualityTestName"));
209 
210  qtFullPathHists.push_back(
211  itQT->getParameter<std::string> ("QualityTestHist"));
212 
213  unsigned int qtEnabled = itQT->getParameter<unsigned int> (
214  "QualityTestSummaryEnabled");
215 
216  qtSumEnabled.push_back(qtEnabled);
217 
218  if (qtEnabled) {
220  }
221  }
222 
223  m_objectQualityTestName.push_back(qtNames);
224  m_objectQualityTestHist.push_back(qtFullPathHists);
225  m_objectQtSummaryEnabled.push_back(qtSumEnabled);
226 
227  indexObj++;
228 
229  }
230 
232  m_meReportSummaryContent.reserve(totalNrQualityTests);
233 
234 }
std::vector< std::vector< std::string > > m_objectQualityTestHist
std::vector< std::vector< std::string > > m_systemQualityTestName
std::vector< edm::ParameterSet > m_l1Objects
std::vector< int > m_objectDisable
std::vector< edm::ParameterSet > m_l1Systems
std::vector< std::string > m_systemLabel
std::vector< std::string > m_systemLabelExt
std::vector< std::vector< std::string > > m_systemQualityTestHist
std::vector< std::vector< unsigned int > > m_objectQtSummaryEnabled
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
std::vector< std::vector< unsigned int > > m_systemQtSummaryEnabled
std::vector< int > m_systemDisable
std::vector< std::string > m_objectLabel
std::vector< std::string > m_disableL1Objects
std::vector< std::string > m_disableL1Systems
std::vector< std::vector< std::string > > m_objectQualityTestName
size_t m_nrL1Objects
number of L1 trigger objects
size_t m_nrL1Systems
number of L1 trigger systems
std::vector< int > m_summaryContent
bool m_verbose
input parameters
void L1TEventInfoClient::readQtResults ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

read quality test results

Definition at line 467 of file L1TEventInfoClient.cc.

References gather_cfg::cout, dqm::qstatus::DISABLED, MonitorElement::Fill(), objects.autophobj::float, DQMStore::IGetter::get(), QReport::getMessage(), MonitorElement::getName(), MonitorElement::getQReport(), MonitorElement::getQReports(), QReport::getQTresult(), QReport::getStatus(), dqm::qstatus::INVALID, m_meReportSummary, m_meReportSummaryContent, m_meReportSummaryMap, m_nrL1Objects, m_nrL1Systems, m_objectQtSummaryEnabled, m_objectQualityTestHist, m_objectQualityTestName, m_reportSummary, m_summaryContent, m_summarySum, m_systemQtSummaryEnabled, m_systemQualityTestHist, m_systemQualityTestName, m_totalNrQtSummaryEnabled, m_verbose, MonitorElement::setBinContent(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

467  {
468 
469  // initialize summary content, summary sum and ReportSummaryContent float histograms
470  // for all L1 systems and L1 objects
471 
472  for (std::vector<int>::iterator it = m_summaryContent.begin(); it
473  != m_summaryContent.end(); ++it) {
474 
475  (*it) = dqm::qstatus::DISABLED;
476 
477  }
478 
479  m_summarySum = 0.;
480 
481  for (std::vector<MonitorElement*>::iterator itME =
482  m_meReportSummaryContent.begin(); itME
483  != m_meReportSummaryContent.end(); ++itME) {
484 
485  (*itME)->Fill(0.);
486 
487  }
488 
489 
490  // general counters:
491  // iAllQTest: all quality tests for all systems and objects
492  // iAllMon: all monitored systems and objects
493  int iAllQTest = 0;
494  int iAllMon = 0;
495 
496 
497  // quality tests for all L1 systems
498 
499  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
500 
501  // get the reports for each quality test
502 
503  const std::vector<std::string>& sysQtName =
505  const std::vector<std::string>& sysQtHist =
507  const std::vector<unsigned int>& sysQtSummaryEnabled =
509 
510  // pro system counter for quality tests
511  int iSysQTest = 0;
512 
513  for (std::vector<std::string>::const_iterator itQtName =
514  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
515 
516  // get results, status and message
517 
518  MonitorElement* qHist = igetter.get(sysQtHist[iSysQTest]);
519 
520  if (qHist) {
521  const std::vector<QReport*> qtVec = qHist->getQReports();
522  const std::string hName = qHist->getName();
523 
524  if (m_verbose) {
525 
526  std::cout << "\nNumber of quality tests "
527  << " for histogram " << sysQtHist[iSysQTest]
528  << ": " << qtVec.size() << "\n" << std::endl;
529  }
530 
531  const QReport* sysQReport = qHist->getQReport(*itQtName);
532  if (sysQReport) {
533  const float sysQtResult = sysQReport->getQTresult();
534  const int sysQtStatus = sysQReport->getStatus();
535  const std::string& sysQtMessage = sysQReport->getMessage();
536 
537  if (m_verbose) {
538  std::cout << "\n" << (*itQtName) << " quality test:"
539  << "\n result: " << sysQtResult
540  << "\n status: " << sysQtStatus
541  << "\n message: " << sysQtMessage << "\n"
542  << "\nFilling m_meReportSummaryContent["
543  << iAllQTest << "] with value "
544  << sysQtResult << "\n" << std::endl;
545  }
546 
547  m_meReportSummaryContent[iAllQTest]->Fill(sysQtResult);
548 
549  // for the summary map, keep the highest status value ("ERROR") of all tests
550  // which are considered for the summary plot
551  if (sysQtSummaryEnabled[iSysQTest]) {
552 
553  if (sysQtStatus > m_summaryContent[iAllMon]) {
554  m_summaryContent[iAllMon] = sysQtStatus;
555  }
556 
557  m_summarySum += sysQtResult;
558  }
559 
560 
561  } else {
562 
563  // for the summary map, if the test was not found but it is assumed to be
564  // considered for the summary plot, set it to dqm::qstatus::INVALID
565 
566  int sysQtStatus = dqm::qstatus::INVALID;
567 
568  if (sysQtSummaryEnabled[iSysQTest]) {
569 
570  if (sysQtStatus > m_summaryContent[iAllMon]) {
571  m_summaryContent[iAllMon] = sysQtStatus;
572  }
573  }
574 
575  m_meReportSummaryContent[iAllQTest]->Fill(0.);
576 
577  if (m_verbose) {
578 
579  std::cout << "\n" << (*itQtName)
580  << " quality test not found\n" << std::endl;
581  }
582  }
583 
584  } else {
585  // for the summary map, if the histogram was not found but it is assumed
586  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
587 
588  int sysQtStatus = dqm::qstatus::INVALID;
589 
590  if (sysQtSummaryEnabled[iSysQTest]) {
591 
592  if (sysQtStatus > m_summaryContent[iAllMon]) {
593  m_summaryContent[iAllMon] = sysQtStatus;
594  }
595  }
596 
597  m_meReportSummaryContent[iAllQTest]->Fill(0.);
598 
599  if (m_verbose) {
600 
601  std::cout << "\nHistogram " << sysQtHist[iSysQTest]
602  << " not found\n" << std::endl;
603  }
604 
605  }
606 
607  // increase counters for quality tests
608  iSysQTest++;
609  iAllQTest++;
610 
611  }
612 
613  iAllMon++;
614 
615  }
616 
617  // quality tests for all L1 objects
618 
619  for (unsigned int iObj = 0; iObj < m_nrL1Objects; ++iObj) {
620 
621  // get the reports for each quality test
622 
623  const std::vector<std::string>& objQtName =
625  const std::vector<std::string>& objQtHist =
627  const std::vector<unsigned int>& objQtSummaryEnabled =
629 
630  // pro object counter for quality tests
631  int iObjQTest = 0;
632 
633  for (std::vector<std::string>::const_iterator itQtName =
634  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
635 
636  // get results, status and message
637 
638  MonitorElement* qHist = igetter.get(objQtHist[iObjQTest]);
639 
640  if (qHist) {
641  const std::vector<QReport*> qtVec = qHist->getQReports();
642  const std::string hName = qHist->getName();
643 
644  if (m_verbose) {
645 
646  std::cout << "\nNumber of quality tests "
647  << " for histogram " << objQtHist[iObjQTest]
648  << ": " << qtVec.size() << "\n" << std::endl;
649  }
650 
651  const QReport* objQReport = qHist->getQReport(*itQtName);
652  if (objQReport) {
653  const float objQtResult = objQReport->getQTresult();
654  const int objQtStatus = objQReport->getStatus();
655  const std::string& objQtMessage = objQReport->getMessage();
656 
657  if (m_verbose) {
658  std::cout << "\n" << (*itQtName) << " quality test:"
659  << "\n result: " << objQtResult
660  << "\n status: " << objQtStatus
661  << "\n message: " << objQtMessage << "\n"
662  << "\nFilling m_meReportSummaryContent["
663  << iAllQTest << "] with value "
664  << objQtResult << "\n" << std::endl;
665  }
666 
667  m_meReportSummaryContent[iAllQTest]->Fill(objQtResult);
668 
669  // for the summary map, keep the highest status value ("ERROR") of all tests
670  // which are considered for the summary plot
671  if (objQtSummaryEnabled[iObjQTest]) {
672 
673  if (objQtStatus > m_summaryContent[iAllMon]) {
674  m_summaryContent[iAllMon] = objQtStatus;
675  }
676 
677  m_summarySum += objQtResult;
678  }
679 
680  } else {
681 
682  // for the summary map, if the test was not found but it is assumed to be
683  // considered for the summary plot, set it to dqm::qstatus::INVALID
684 
685  int objQtStatus = dqm::qstatus::INVALID;
686 
687  if (objQtSummaryEnabled[iObjQTest]) {
688 
689  if (objQtStatus > m_summaryContent[iAllMon]) {
690  m_summaryContent[iAllMon] = objQtStatus;
691  }
692  }
693 
694  m_meReportSummaryContent[iAllQTest]->Fill(0.);
695 
696  if (m_verbose) {
697 
698  std::cout << "\n" << (*itQtName)
699  << " quality test not found\n" << std::endl;
700  }
701 
702  }
703 
704  } else {
705  // for the summary map, if the histogram was not found but it is assumed
706  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
707 
708  int objQtStatus = dqm::qstatus::INVALID;
709 
710  if (objQtSummaryEnabled[iObjQTest]) {
711 
712  if (objQtStatus > m_summaryContent[iAllMon]) {
713  m_summaryContent[iAllMon] = objQtStatus;
714  }
715  }
716 
717  m_meReportSummaryContent[iAllQTest]->Fill(0.);
718 
719  if (m_verbose) {
720  std::cout << "\nHistogram " << objQtHist[iObjQTest]
721  << " not found\n" << std::endl;
722  }
723 
724  }
725 
726  // increase counters for quality tests
727  iObjQTest++;
728  iAllQTest++;
729  }
730 
731  iAllMon++;
732 
733  }
734 
735 
736 
737  // reportSummary value
739  if (m_meReportSummary) {
741  }
742 
743  // fill the ReportSummaryMap for L1 systems (bin 1 on X)
744  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
745 
746  double summCont = static_cast<double>(m_summaryContent[iSys]);
747  m_meReportSummaryMap->setBinContent(1, iSys + 1, summCont);
748  }
749 
750  // fill the ReportSummaryMap for L1 objects (bin 2 on X)
751  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
752  + m_nrL1Objects; ++iMon) {
753 
754  double summCont = static_cast<double>(m_summaryContent[iMon]);
755  m_meReportSummaryMap->setBinContent(2, iMon - m_nrL1Systems + 1, summCont);
756 
757  }
758 
759 }
std::vector< std::vector< std::string > > m_objectQualityTestHist
std::vector< std::vector< std::string > > m_systemQualityTestName
const std::string & getName(void) const
get name of ME
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
MonitorElement * m_meReportSummaryMap
report summary map
std::vector< std::vector< std::string > > m_systemQualityTestHist
std::vector< std::vector< unsigned int > > m_objectQtSummaryEnabled
const std::string & getMessage(void) const
get message attached to test
Definition: QReport.h:24
void Fill(long long x)
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
Float_t m_reportSummary
summary report
static const int INVALID
MonitorElement * m_meReportSummary
a summary report
std::vector< std::vector< unsigned int > > m_systemQtSummaryEnabled
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:16
static const int DISABLED
std::vector< QReport * > getQReports(void) const
get map of QReports
std::vector< std::vector< std::string > > m_objectQualityTestName
size_t m_nrL1Objects
number of L1 trigger objects
float getQTresult(void) const
get test result i.e. prob value
Definition: QReport.h:20
size_t m_nrL1Systems
number of L1 trigger systems
std::vector< int > m_summaryContent
bool m_verbose
input parameters

Member Data Documentation

std::vector<std::string> L1TEventInfoClient::m_disableL1Objects
private

Definition at line 75 of file L1TEventInfoClient.h.

Referenced by initialize().

std::vector<std::string> L1TEventInfoClient::m_disableL1Systems
private

Definition at line 74 of file L1TEventInfoClient.h.

Referenced by initialize().

std::vector<edm::ParameterSet> L1TEventInfoClient::m_l1Objects
private

Definition at line 73 of file L1TEventInfoClient.h.

Referenced by initialize().

std::vector<edm::ParameterSet> L1TEventInfoClient::m_l1Systems
private

Definition at line 72 of file L1TEventInfoClient.h.

Referenced by initialize().

MonitorElement* L1TEventInfoClient::m_meReportSummary
private

a summary report

Definition at line 124 of file L1TEventInfoClient.h.

Referenced by book(), and readQtResults().

std::vector<MonitorElement*> L1TEventInfoClient::m_meReportSummaryContent
private

monitor elements to report content for all quality tests

Definition at line 127 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), initialize(), and readQtResults().

MonitorElement* L1TEventInfoClient::m_meReportSummaryMap
private

report summary map

Definition at line 130 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), and readQtResults().

std::string L1TEventInfoClient::m_monitorDir
private

Definition at line 65 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), and initialize().

size_t L1TEventInfoClient::m_nrL1Objects
private

number of L1 trigger objects

Definition at line 95 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), initialize(), and readQtResults().

size_t L1TEventInfoClient::m_nrL1Systems
private

number of L1 trigger systems

Definition at line 92 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), initialize(), and readQtResults().

std::vector<int> L1TEventInfoClient::m_objectDisable
private

Definition at line 109 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

std::vector<std::string> L1TEventInfoClient::m_objectFolder
private

Definition at line 111 of file L1TEventInfoClient.h.

std::vector<std::string> L1TEventInfoClient::m_objectLabel
private

Definition at line 110 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), and initialize().

std::vector<std::vector<unsigned int> > L1TEventInfoClient::m_objectQtSummaryEnabled
private

Definition at line 115 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

std::vector<std::vector<std::string> > L1TEventInfoClient::m_objectQualityTestHist
private

Definition at line 114 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

std::vector<std::vector<std::string> > L1TEventInfoClient::m_objectQualityTestName
private

Definition at line 113 of file L1TEventInfoClient.h.

Referenced by book(), initialize(), and readQtResults().

Float_t L1TEventInfoClient::m_reportSummary
private

summary report

Definition at line 119 of file L1TEventInfoClient.h.

Referenced by readQtResults().

bool L1TEventInfoClient::m_runInEndJob
private

Definition at line 70 of file L1TEventInfoClient.h.

bool L1TEventInfoClient::m_runInEndLumi
private

Definition at line 68 of file L1TEventInfoClient.h.

Referenced by dqmEndLuminosityBlock().

bool L1TEventInfoClient::m_runInEndRun
private

Definition at line 69 of file L1TEventInfoClient.h.

bool L1TEventInfoClient::m_runInEventLoop
private

Definition at line 67 of file L1TEventInfoClient.h.

std::vector<int> L1TEventInfoClient::m_summaryContent
private

Definition at line 121 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), initialize(), and readQtResults().

Float_t L1TEventInfoClient::m_summarySum
private

Definition at line 120 of file L1TEventInfoClient.h.

Referenced by readQtResults().

std::vector<int> L1TEventInfoClient::m_systemDisable
private

Definition at line 103 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

std::vector<std::string> L1TEventInfoClient::m_systemLabel
private

Definition at line 101 of file L1TEventInfoClient.h.

Referenced by book(), dumpContentMonitorElements(), and initialize().

std::vector<std::string> L1TEventInfoClient::m_systemLabelExt
private

Definition at line 102 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

std::vector<std::vector<unsigned int> > L1TEventInfoClient::m_systemQtSummaryEnabled
private

Definition at line 107 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

std::vector<std::vector<std::string> > L1TEventInfoClient::m_systemQualityTestHist
private

Definition at line 106 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

std::vector<std::vector<std::string> > L1TEventInfoClient::m_systemQualityTestName
private

Definition at line 105 of file L1TEventInfoClient.h.

Referenced by book(), initialize(), and readQtResults().

size_t L1TEventInfoClient::m_totalNrQtSummaryEnabled
private

total number of quality tests enabled for summary report for L1 trigger systems and L1 trigger objects

Definition at line 99 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

bool L1TEventInfoClient::m_verbose
private

input parameters

Definition at line 64 of file L1TEventInfoClient.h.

Referenced by dqmEndJob(), dqmEndLuminosityBlock(), initialize(), and readQtResults().