CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TEventInfoClient Class Reference

#include <L1TEventInfoClient.h>

Inheritance diagram for L1TEventInfoClient:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TEventInfoClient (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~L1TEventInfoClient ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 analyze More...
 
void beginJob ()
 begin job More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 begin luminosity block More...
 
void beginRun (const edm::Run &, const edm::EventSetup &)
 begin run More...
 
void bookHistograms ()
 book histograms More...
 
void dumpContentMonitorElements ()
 dump the content of the monitoring elements defined in this module More...
 
void endJob ()
 end job More...
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
 end luminosity block More...
 
void endRun (const edm::Run &, const edm::EventSetup &)
 end run More...
 
void initialize ()
 private methods More...
 
void readQtResults ()
 read quality test results More...
 

Private Attributes

DQMStorem_dbe
 
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::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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)
 

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

Date:
2012/06/04 10:55:43
Revision:
1.9

Description: see header file.

Author
: Vasile Mihai Ghete - HEPHY Vienna
Date:
2012/06/04 10:55:42
Revision:
1.26

Definition at line 42 of file L1TEventInfoClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 46 of file L1TEventInfoClient.cc.

References initialize().

46  :
47  m_verbose(parSet.getUntrackedParameter<bool>("verbose", false)),
48  m_monitorDir(parSet.getUntrackedParameter<std::string>("monitorDir", "")),
49  m_runInEventLoop(parSet.getUntrackedParameter<bool>("runInEventLoop", false)),
50  m_runInEndLumi(parSet.getUntrackedParameter<bool>("runInEndLumi", false)),
51  m_runInEndRun(parSet.getUntrackedParameter<bool>("runInEndRun", false)),
52  m_runInEndJob(parSet.getUntrackedParameter<bool>("runInEndJob", false)),
53  m_l1Systems(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Systems")),
54  m_l1Objects(parSet.getParameter<std::vector<edm::ParameterSet> >("L1Objects")),
55  m_disableL1Systems(parSet.getParameter<std::vector<std::string> >("DisableL1Systems")),
56  m_disableL1Objects(parSet.getParameter<std::vector<std::string> >("DisableL1Objects")),
57  m_nrL1Systems(0),
58  m_nrL1Objects(0),
60 
61  initialize();
62 }
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 65 of file L1TEventInfoClient.cc.

65  {
66 
67  //empty
68 
69 }

Member Function Documentation

void L1TEventInfoClient::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
privatevirtual

analyze

Implements edm::EDAnalyzer.

Definition at line 265 of file L1TEventInfoClient.cc.

References m_runInEventLoop, and readQtResults().

266  {
267 
268  // there is no loop on events in the offline harvesting step
269  // code here will not be executed offline
270 
271  if (m_runInEventLoop) {
272 
273  readQtResults();
274 
275  }
276 }
void readQtResults()
read quality test results
void L1TEventInfoClient::beginJob ( void  )
privatevirtual

begin job

Reimplemented from edm::EDAnalyzer.

Definition at line 242 of file L1TEventInfoClient.cc.

References m_dbe, and cppFunctionSkipper::operator.

242  {
243 
244 
245  // get backend interface
247 
248 }
void L1TEventInfoClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup evSetup 
)
privatevirtual

begin luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 259 of file L1TEventInfoClient.cc.

260  {
261 
262 }
void L1TEventInfoClient::beginRun ( const edm::Run run,
const edm::EventSetup evSetup 
)
privatevirtual

begin run

Reimplemented from edm::EDAnalyzer.

Definition at line 251 of file L1TEventInfoClient.cc.

References bookHistograms().

252  {
253 
254  bookHistograms();
255 
256 }
void bookHistograms()
book histograms
void L1TEventInfoClient::bookHistograms ( )
private

book histograms

Definition at line 415 of file L1TEventInfoClient.cc.

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

Referenced by beginRun().

415  {
416 
417  std::string dirEventInfo = m_monitorDir + "/EventInfo";
418 
419  m_dbe->setCurrentFolder(dirEventInfo);
420 
421  // remove m_meReportSummary if it exists
422  if ((m_meReportSummary = m_dbe->get(dirEventInfo + "/reportSummary"))) {
424  }
425 
426  // ...and book it again
427  m_meReportSummary = m_dbe->bookFloat("reportSummary");
428 
429  // initialize reportSummary to 1
430 
431  if (m_meReportSummary) {
433  }
434 
435  // define float histograms for reportSummaryContents (one histogram per quality test),
436  // initialize them to zero
437  // initialize also m_summaryContent to dqm::qstatus::DISABLED
438 
439  m_dbe->setCurrentFolder(dirEventInfo + "/reportSummaryContents");
440 
441  char histoQT[100];
442 
443  // general counters:
444  // iAllQTest: all quality tests for all systems and objects
445  // iAllMon: all monitored systems and objects
446  int iAllQTest = 0;
447  int iAllMon = 0;
448 
449  for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
450 
452 
453  const std::vector<std::string>& sysQtName =
455 
456  for (std::vector<std::string>::const_iterator itQtName =
457  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
458 
459  const std::string hStr = m_monitorDir + "_L1Sys_" +m_systemLabel[iMon] + "_" + (*itQtName);
460 
461  const char* cStr = hStr.c_str();
462  sprintf(histoQT, cStr);
463 
464  m_meReportSummaryContent.push_back(m_dbe->bookFloat(histoQT));
465  m_meReportSummaryContent[iAllQTest]->Fill(0.);
466 
467  iAllQTest++;
468  }
469 
470  iAllMon++;
471  }
472 
473 
474  for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
475 
477 
478  const std::vector<std::string>& objQtName =
480 
481  for (std::vector<std::string>::const_iterator itQtName =
482  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
483 
484  const std::string hStr = m_monitorDir + "_L1Obj_" + m_objectLabel[iMon] + "_"
485  + (*itQtName);
486 
487  const char* cStr = hStr.c_str();
488  sprintf(histoQT, cStr);
489 
490  m_meReportSummaryContent.push_back(m_dbe->bookFloat(histoQT));
491  m_meReportSummaryContent[iAllQTest]->Fill(0.);
492 
493  iAllQTest++;
494  }
495 
496  iAllMon++;
497 
498  }
499 
500  m_dbe->setCurrentFolder(dirEventInfo);
501 
502  if ((m_meReportSummaryMap = m_dbe->get(dirEventInfo + "/reportSummaryMap"))) {
504  }
505 
506  // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y
507 
508  int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects);
509 
510  m_meReportSummaryMap = m_dbe->book2D("reportSummaryMap",
511  "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
512 
513  if (m_monitorDir == "L1TEMU") {
515  "L1TEMU: L1 Emulator vs Data Report Summary Map");
516 
517  } else if (m_monitorDir == "L1T") {
519  "L1T: L1 Trigger Data Report Summary Map");
520  } else {
521  // do nothing
522  }
523 
526 
527  m_meReportSummaryMap->setBinLabel(1, "L1 systems", 1);
528  m_meReportSummaryMap->setBinLabel(2, "L1 objects", 1);
529 
530  for (int iBin = 0; iBin < nBinsY; ++iBin) {
531 
532  m_meReportSummaryMap->setBinLabel(iBin + 1, " ", 2);
533  }
534 
535 }
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 * 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)
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:659
void Fill(long long x)
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
const T & max(const T &a, const T &b)
MonitorElement * m_meReportSummary
a summary report
void removeElement(const std::string &name)
Definition: DQMStore.cc:2577
static const int DISABLED
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
void setTitle(const std::string &title)
set (ie. change) histogram/profile title
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 * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
std::vector< int > m_summaryContent
void L1TEventInfoClient::dumpContentMonitorElements ( )
private

dump the content of the monitoring elements defined in this module

Definition at line 329 of file L1TEventInfoClient.cc.

References gather_cfg::cout, DQMStore::get(), MonitorElement::getName(), MonitorElement::getTH2F(), estimatePileup::hist, m_dbe, 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 endJob(), endLuminosityBlock(), and endRun().

329  {
330 
331  std::cout << "\nSummary report " << std::endl;
332 
333  // summary content
334 
336 
337  std::cout
338  << "\nSummary content per system and object as filled in histogram\n "
339  << m_meReportSummaryMap->getName() << std::endl;
340 
341  if (!me) {
342 
343  std::cout << "\nNo histogram " << m_meReportSummaryMap->getName()
344  << "\nNo summary content per system and object as filled in histogram.\n "
345  << std::endl;
346  return;
347 
348  }
349 
350  TH2F* hist = me->getTH2F();
351 
352  const int nBinsX = hist->GetNbinsX();
353  const int nBinsY = hist->GetNbinsY();
354  std::cout << nBinsX << " " << nBinsY;
355 
356  std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(
357  nBinsY));
358 
359 // for (int iBinX = 0; iBinX < nBinsX; iBinX++) {
360 // for (int iBinY = 0; iBinY < nBinsY; iBinY++) {
361 // meReportSummaryMap[iBinX][iBinY]
362 // = static_cast<int>(me->GetBinContent(iBinX + 1, iBinY + 1));
363 // }
364 // }
365 
366  std::cout << "\nL1 systems: " << m_nrL1Systems << " systems included\n"
367  << "\n Summary content size: " << (m_summaryContent.size())
368  << std::endl;
369 
370  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
371 
372  std::cout << std::setw(10) << m_systemLabel[iSys] << std::setw(10)
373  << m_systemLabelExt[iSys] << " \t" << m_systemDisable[iSys]
374  << " \t" << std::setw(25) << " m_summaryContent["
375  << std::setw(2) << iSys << "] = " << meReportSummaryMap[0][iSys]
376  << std::endl;
377  }
378 
379  std::cout << "\n L1 trigger objects: " << m_nrL1Objects
380  << " objects included\n" << std::endl;
381 
382  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
383  + m_nrL1Objects; ++iMon) {
384 
385  std::cout << std::setw(20) << m_objectLabel[iMon - m_nrL1Systems]
386  << " \t" << m_objectDisable[iMon - m_nrL1Systems] << " \t"
387  << std::setw(25) << " m_summaryContent[" << std::setw(2)
388  << iMon << "] = \t" << m_summaryContent[iMon] << std::endl;
389  }
390 
391  std::cout << std::endl;
392 
393  // quality tests
394 
395  std::cout << "\nQuality test results as filled in " << "\n "
396  << m_monitorDir << "/EventInfo/reportSummaryContents\n"
397  << "\n Total number of quality tests: "
398  << (m_meReportSummaryContent.size()) << "\n" << std::endl;
399 
400  for (std::vector<MonitorElement*>::const_iterator itME =
401  m_meReportSummaryContent.begin(); itME
402  != m_meReportSummaryContent.end(); ++itME) {
403 
404  std::cout << std::setw(50) << (*itME)->getName() << " \t"
405  << std::setw(25) << (*itME)->getFloatValue() << std::endl;
406 
407  }
408 
409  std::cout << std::endl;
410 
411 }
const std::string & getName(void) const
get name of ME
std::vector< int > m_objectDisable
std::vector< std::string > m_systemLabel
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
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
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
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
std::vector< int > m_summaryContent
void L1TEventInfoClient::endJob ( void  )
privatevirtual

end job

Reimplemented from edm::EDAnalyzer.

Definition at line 314 of file L1TEventInfoClient.cc.

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

314  {
315 
316  if (m_runInEndJob) {
317 
318  readQtResults();
319 
320  if (m_verbose) {
321 
322  std::cout << "\n L1TEventInfoClient::endRun\n" << std::endl;
324  }
325  }
326 }
void readQtResults()
read quality test results
void dumpContentMonitorElements()
dump the content of the monitoring elements defined in this module
tuple cout
Definition: gather_cfg.py:121
bool m_verbose
input parameters
void L1TEventInfoClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup evSetup 
)
privatevirtual

end luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 279 of file L1TEventInfoClient.cc.

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

280  {
281 
282  if (m_runInEndLumi) {
283 
284  readQtResults();
285 
286  if (m_verbose) {
287 
288  std::cout << "\n L1TEventInfoClient::endLuminosityBlock\n"
289  << std::endl;
291  }
292 
293  }
294 }
void readQtResults()
read quality test results
void dumpContentMonitorElements()
dump the content of the monitoring elements defined in this module
tuple cout
Definition: gather_cfg.py:121
bool m_verbose
input parameters
void L1TEventInfoClient::endRun ( const edm::Run run,
const edm::EventSetup evSetup 
)
privatevirtual

end run

Reimplemented from edm::EDAnalyzer.

Definition at line 297 of file L1TEventInfoClient.cc.

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

298  {
299 
300  if (m_runInEndRun) {
301 
302  readQtResults();
303 
304  if (m_verbose) {
305 
306  std::cout << "\n L1TEventInfoClient::endRun\n" << std::endl;
308  }
309 
310  }
311 }
void readQtResults()
read quality test results
void dumpContentMonitorElements()
dump the content of the monitoring elements defined in this module
tuple cout
Definition: gather_cfg.py:121
bool m_verbose
input parameters
void L1TEventInfoClient::initialize ( )
private

private methods

initialize properly all elements

Definition at line 71 of file L1TEventInfoClient.cc.

References gather_cfg::cout, m_dbe, 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, cppFunctionSkipper::operator, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by L1TEventInfoClient().

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

read quality test results

Definition at line 538 of file L1TEventInfoClient.cc.

References gather_cfg::cout, dqm::qstatus::DISABLED, MonitorElement::Fill(), DQMStore::get(), QReport::getMessage(), MonitorElement::getName(), MonitorElement::getQReport(), MonitorElement::getQReports(), QReport::getQTresult(), QReport::getStatus(), dqm::qstatus::INVALID, m_dbe, 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 analyze(), endJob(), endLuminosityBlock(), and endRun().

538  {
539 
540  // initialize summary content, summary sum and ReportSummaryContent float histograms
541  // for all L1 systems and L1 objects
542 
543  for (std::vector<int>::iterator it = m_summaryContent.begin(); it
544  != m_summaryContent.end(); ++it) {
545 
546  (*it) = dqm::qstatus::DISABLED;
547 
548  }
549 
550  m_summarySum = 0.;
551 
552  for (std::vector<MonitorElement*>::iterator itME =
553  m_meReportSummaryContent.begin(); itME
554  != m_meReportSummaryContent.end(); ++itME) {
555 
556  (*itME)->Fill(0.);
557 
558  }
559 
560 
561  // general counters:
562  // iAllQTest: all quality tests for all systems and objects
563  // iAllMon: all monitored systems and objects
564  int iAllQTest = 0;
565  int iAllMon = 0;
566 
567 
568  // quality tests for all L1 systems
569 
570  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
571 
572  // get the reports for each quality test
573 
574  const std::vector<std::string>& sysQtName =
576  const std::vector<std::string>& sysQtHist =
578  const std::vector<unsigned int>& sysQtSummaryEnabled =
580 
581  // pro system counter for quality tests
582  int iSysQTest = 0;
583 
584  for (std::vector<std::string>::const_iterator itQtName =
585  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
586 
587  // get results, status and message
588 
589  MonitorElement* qHist = m_dbe->get(sysQtHist[iSysQTest]);
590 
591  if (qHist) {
592  const std::vector<QReport*> qtVec = qHist->getQReports();
593  const std::string hName = qHist->getName();
594 
595  if (m_verbose) {
596 
597  std::cout << "\nNumber of quality tests "
598  << " for histogram " << sysQtHist[iSysQTest]
599  << ": " << qtVec.size() << "\n" << std::endl;
600  }
601 
602  const QReport* sysQReport = qHist->getQReport(*itQtName);
603  if (sysQReport) {
604  const float sysQtResult = sysQReport->getQTresult();
605  const int sysQtStatus = sysQReport->getStatus();
606  const std::string& sysQtMessage = sysQReport->getMessage();
607 
608  if (m_verbose) {
609  std::cout << "\n" << (*itQtName) << " quality test:"
610  << "\n result: " << sysQtResult
611  << "\n status: " << sysQtStatus
612  << "\n message: " << sysQtMessage << "\n"
613  << "\nFilling m_meReportSummaryContent["
614  << iAllQTest << "] with value "
615  << sysQtResult << "\n" << std::endl;
616  }
617 
618  m_meReportSummaryContent[iAllQTest]->Fill(sysQtResult);
619 
620  // for the summary map, keep the highest status value ("ERROR") of all tests
621  // which are considered for the summary plot
622  if (sysQtSummaryEnabled[iSysQTest]) {
623 
624  if (sysQtStatus > m_summaryContent[iAllMon]) {
625  m_summaryContent[iAllMon] = sysQtStatus;
626  }
627 
628  m_summarySum += sysQtResult;
629  }
630 
631 
632  } else {
633 
634  // for the summary map, if the test was not found but it is assumed to be
635  // considered for the summary plot, set it to dqm::qstatus::INVALID
636 
637  int sysQtStatus = dqm::qstatus::INVALID;
638 
639  if (sysQtSummaryEnabled[iSysQTest]) {
640 
641  if (sysQtStatus > m_summaryContent[iAllMon]) {
642  m_summaryContent[iAllMon] = sysQtStatus;
643  }
644  }
645 
646  m_meReportSummaryContent[iAllQTest]->Fill(0.);
647 
648  if (m_verbose) {
649 
650  std::cout << "\n" << (*itQtName)
651  << " quality test not found\n" << std::endl;
652  }
653  }
654 
655  } else {
656  // for the summary map, if the histogram was not found but it is assumed
657  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
658 
659  int sysQtStatus = dqm::qstatus::INVALID;
660 
661  if (sysQtSummaryEnabled[iSysQTest]) {
662 
663  if (sysQtStatus > m_summaryContent[iAllMon]) {
664  m_summaryContent[iAllMon] = sysQtStatus;
665  }
666  }
667 
668  m_meReportSummaryContent[iAllQTest]->Fill(0.);
669 
670  if (m_verbose) {
671 
672  std::cout << "\nHistogram " << sysQtHist[iSysQTest]
673  << " not found\n" << std::endl;
674  }
675 
676  }
677 
678  // increase counters for quality tests
679  iSysQTest++;
680  iAllQTest++;
681 
682  }
683 
684  iAllMon++;
685 
686  }
687 
688  // quality tests for all L1 objects
689 
690  for (unsigned int iObj = 0; iObj < m_nrL1Objects; ++iObj) {
691 
692  // get the reports for each quality test
693 
694  const std::vector<std::string>& objQtName =
696  const std::vector<std::string>& objQtHist =
698  const std::vector<unsigned int>& objQtSummaryEnabled =
700 
701  // pro object counter for quality tests
702  int iObjQTest = 0;
703 
704  for (std::vector<std::string>::const_iterator itQtName =
705  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
706 
707  // get results, status and message
708 
709  MonitorElement* qHist = m_dbe->get(objQtHist[iObjQTest]);
710 
711  if (qHist) {
712  const std::vector<QReport*> qtVec = qHist->getQReports();
713  const std::string hName = qHist->getName();
714 
715  if (m_verbose) {
716 
717  std::cout << "\nNumber of quality tests "
718  << " for histogram " << objQtHist[iObjQTest]
719  << ": " << qtVec.size() << "\n" << std::endl;
720  }
721 
722  const QReport* objQReport = qHist->getQReport(*itQtName);
723  if (objQReport) {
724  const float objQtResult = objQReport->getQTresult();
725  const int objQtStatus = objQReport->getStatus();
726  const std::string& objQtMessage = objQReport->getMessage();
727 
728  if (m_verbose) {
729  std::cout << "\n" << (*itQtName) << " quality test:"
730  << "\n result: " << objQtResult
731  << "\n status: " << objQtStatus
732  << "\n message: " << objQtMessage << "\n"
733  << "\nFilling m_meReportSummaryContent["
734  << iAllQTest << "] with value "
735  << objQtResult << "\n" << std::endl;
736  }
737 
738  m_meReportSummaryContent[iAllQTest]->Fill(objQtResult);
739 
740  // for the summary map, keep the highest status value ("ERROR") of all tests
741  // which are considered for the summary plot
742  if (objQtSummaryEnabled[iObjQTest]) {
743 
744  if (objQtStatus > m_summaryContent[iAllMon]) {
745  m_summaryContent[iAllMon] = objQtStatus;
746  }
747 
748  m_summarySum += objQtResult;
749  }
750 
751  } else {
752 
753  // for the summary map, if the test was not found but it is assumed to be
754  // considered for the summary plot, set it to dqm::qstatus::INVALID
755 
756  int objQtStatus = dqm::qstatus::INVALID;
757 
758  if (objQtSummaryEnabled[iObjQTest]) {
759 
760  if (objQtStatus > m_summaryContent[iAllMon]) {
761  m_summaryContent[iAllMon] = objQtStatus;
762  }
763  }
764 
765  m_meReportSummaryContent[iAllQTest]->Fill(0.);
766 
767  if (m_verbose) {
768 
769  std::cout << "\n" << (*itQtName)
770  << " quality test not found\n" << std::endl;
771  }
772 
773  }
774 
775  } else {
776  // for the summary map, if the histogram was not found but it is assumed
777  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
778 
779  int objQtStatus = dqm::qstatus::INVALID;
780 
781  if (objQtSummaryEnabled[iObjQTest]) {
782 
783  if (objQtStatus > m_summaryContent[iAllMon]) {
784  m_summaryContent[iAllMon] = objQtStatus;
785  }
786  }
787 
788  m_meReportSummaryContent[iAllQTest]->Fill(0.);
789 
790  if (m_verbose) {
791  std::cout << "\nHistogram " << objQtHist[iObjQTest]
792  << " not found\n" << std::endl;
793  }
794 
795  }
796 
797  // increase counters for quality tests
798  iObjQTest++;
799  iAllQTest++;
800  }
801 
802  iAllMon++;
803 
804  }
805 
806 
807 
808  // reportSummary value
810  if (m_meReportSummary) {
812  }
813 
814  // fill the ReportSummaryMap for L1 systems (bin 1 on X)
815  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
816 
817  double summCont = static_cast<double>(m_summaryContent[iSys]);
818  m_meReportSummaryMap->setBinContent(1, iSys + 1, summCont);
819  }
820 
821  // fill the ReportSummaryMap for L1 objects (bin 2 on X)
822  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems
823  + m_nrL1Objects; ++iMon) {
824 
825  double summCont = static_cast<double>(m_summaryContent[iMon]);
826  m_meReportSummaryMap->setBinContent(2, iMon - m_nrL1Systems + 1, summCont);
827 
828  }
829 
830 }
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 &lt;qtname&gt; (null pointer if QReport does not exist)
void setBinContent(int binx, double content)
set content of bin (1-D)
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
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1473
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
tuple cout
Definition: gather_cfg.py:121
std::vector< int > m_summaryContent
bool m_verbose
input parameters

Member Data Documentation

DQMStore* L1TEventInfoClient::m_dbe
private
std::vector<std::string> L1TEventInfoClient::m_disableL1Objects
private

Definition at line 92 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 91 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 90 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 89 of file L1TEventInfoClient.h.

Referenced by initialize().

MonitorElement* L1TEventInfoClient::m_meReportSummary
private

a summary report

Definition at line 142 of file L1TEventInfoClient.h.

Referenced by bookHistograms(), and readQtResults().

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

monitor elements to report content for all quality tests

Definition at line 145 of file L1TEventInfoClient.h.

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

MonitorElement* L1TEventInfoClient::m_meReportSummaryMap
private

report summary map

Definition at line 148 of file L1TEventInfoClient.h.

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

std::string L1TEventInfoClient::m_monitorDir
private

Definition at line 82 of file L1TEventInfoClient.h.

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

size_t L1TEventInfoClient::m_nrL1Objects
private

number of L1 trigger objects

Definition at line 112 of file L1TEventInfoClient.h.

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

size_t L1TEventInfoClient::m_nrL1Systems
private

number of L1 trigger systems

Definition at line 109 of file L1TEventInfoClient.h.

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

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

Definition at line 126 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 128 of file L1TEventInfoClient.h.

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

Definition at line 127 of file L1TEventInfoClient.h.

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

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

Definition at line 132 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 131 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 130 of file L1TEventInfoClient.h.

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

Float_t L1TEventInfoClient::m_reportSummary
private

summary report

Definition at line 136 of file L1TEventInfoClient.h.

Referenced by readQtResults().

bool L1TEventInfoClient::m_runInEndJob
private

Definition at line 87 of file L1TEventInfoClient.h.

Referenced by endJob().

bool L1TEventInfoClient::m_runInEndLumi
private

Definition at line 85 of file L1TEventInfoClient.h.

Referenced by endLuminosityBlock().

bool L1TEventInfoClient::m_runInEndRun
private

Definition at line 86 of file L1TEventInfoClient.h.

Referenced by endRun().

bool L1TEventInfoClient::m_runInEventLoop
private

Definition at line 84 of file L1TEventInfoClient.h.

Referenced by analyze().

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

Definition at line 137 of file L1TEventInfoClient.h.

Referenced by readQtResults().

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

Definition at line 120 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 118 of file L1TEventInfoClient.h.

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

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

Definition at line 119 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 124 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 123 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 122 of file L1TEventInfoClient.h.

Referenced by bookHistograms(), 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 116 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

bool L1TEventInfoClient::m_verbose
private

input parameters

Definition at line 81 of file L1TEventInfoClient.h.

Referenced by endJob(), endLuminosityBlock(), endRun(), initialize(), and readQtResults().