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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) 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
 
- 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::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

Description: see header file.

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 40 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::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
privatevirtual

analyze

Implements edm::EDAnalyzer.

Definition at line 263 of file L1TEventInfoClient.cc.

References m_runInEventLoop, and readQtResults().

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

begin job

Reimplemented from edm::EDAnalyzer.

Definition at line 240 of file L1TEventInfoClient.cc.

References m_dbe, and cppFunctionSkipper::operator.

240  {
241 
242 
243  // get backend interface
245 
246 }
void L1TEventInfoClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup evSetup 
)
privatevirtual

begin luminosity block

Reimplemented from edm::EDAnalyzer.

Definition at line 257 of file L1TEventInfoClient.cc.

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

begin run

Reimplemented from edm::EDAnalyzer.

Definition at line 249 of file L1TEventInfoClient.cc.

References bookHistograms().

250  {
251 
252  bookHistograms();
253 
254 }
void bookHistograms()
book histograms
void L1TEventInfoClient::bookHistograms ( )
private

book histograms

Definition at line 413 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().

413  {
414 
415  std::string dirEventInfo = m_monitorDir + "/EventInfo";
416 
417  m_dbe->setCurrentFolder(dirEventInfo);
418 
419  // remove m_meReportSummary if it exists
420  if ((m_meReportSummary = m_dbe->get(dirEventInfo + "/reportSummary"))) {
422  }
423 
424  // ...and book it again
425  m_meReportSummary = m_dbe->bookFloat("reportSummary");
426 
427  // initialize reportSummary to 1
428 
429  if (m_meReportSummary) {
431  }
432 
433  // define float histograms for reportSummaryContents (one histogram per quality test),
434  // initialize them to zero
435  // initialize also m_summaryContent to dqm::qstatus::DISABLED
436 
437  m_dbe->setCurrentFolder(dirEventInfo + "/reportSummaryContents");
438 
439  char histoQT[100];
440 
441  // general counters:
442  // iAllQTest: all quality tests for all systems and objects
443  // iAllMon: all monitored systems and objects
444  int iAllQTest = 0;
445  int iAllMon = 0;
446 
447  for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
448 
450 
451  const std::vector<std::string>& sysQtName =
453 
454  for (std::vector<std::string>::const_iterator itQtName =
455  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
456 
457  const std::string hStr = m_monitorDir + "_L1Sys_" +m_systemLabel[iMon] + "_" + (*itQtName);
458 
459  const char* cStr = hStr.c_str();
460  sprintf(histoQT, cStr);
461 
462  m_meReportSummaryContent.push_back(m_dbe->bookFloat(histoQT));
463  m_meReportSummaryContent[iAllQTest]->Fill(0.);
464 
465  iAllQTest++;
466  }
467 
468  iAllMon++;
469  }
470 
471 
472  for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
473 
475 
476  const std::vector<std::string>& objQtName =
478 
479  for (std::vector<std::string>::const_iterator itQtName =
480  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
481 
482  const std::string hStr = m_monitorDir + "_L1Obj_" + m_objectLabel[iMon] + "_"
483  + (*itQtName);
484 
485  const char* cStr = hStr.c_str();
486  sprintf(histoQT, cStr);
487 
488  m_meReportSummaryContent.push_back(m_dbe->bookFloat(histoQT));
489  m_meReportSummaryContent[iAllQTest]->Fill(0.);
490 
491  iAllQTest++;
492  }
493 
494  iAllMon++;
495 
496  }
497 
498  m_dbe->setCurrentFolder(dirEventInfo);
499 
500  if ((m_meReportSummaryMap = m_dbe->get(dirEventInfo + "/reportSummaryMap"))) {
502  }
503 
504  // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y
505 
506  int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects);
507 
508  m_meReportSummaryMap = m_dbe->book2D("reportSummaryMap",
509  "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
510 
511  if (m_monitorDir == "L1TEMU") {
513  "L1TEMU: L1 Emulator vs Data Report Summary Map");
514 
515  } else if (m_monitorDir == "L1T") {
517  "L1T: L1 Trigger Data Report Summary Map");
518  } else {
519  // do nothing
520  }
521 
524 
525  m_meReportSummaryMap->setBinLabel(1, "L1 systems", 1);
526  m_meReportSummaryMap->setBinLabel(2, "L1 objects", 1);
527 
528  for (int iBin = 0; iBin < nBinsY; ++iBin) {
529 
530  m_meReportSummaryMap->setBinLabel(iBin + 1, " ", 2);
531  }
532 
533 }
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:809
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:2772
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:1623
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:1000
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:584
std::vector< int > m_summaryContent
void L1TEventInfoClient::dumpContentMonitorElements ( )
private

dump the content of the monitoring elements defined in this module

Definition at line 327 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().

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

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

312  {
313 
314  if (m_runInEndJob) {
315 
316  readQtResults();
317 
318  if (m_verbose) {
319 
320  std::cout << "\n L1TEventInfoClient::endRun\n" << std::endl;
322  }
323  }
324 }
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 277 of file L1TEventInfoClient.cc.

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

278  {
279 
280  if (m_runInEndLumi) {
281 
282  readQtResults();
283 
284  if (m_verbose) {
285 
286  std::cout << "\n L1TEventInfoClient::endLuminosityBlock\n"
287  << std::endl;
289  }
290 
291  }
292 }
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 295 of file L1TEventInfoClient.cc.

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

296  {
297 
298  if (m_runInEndRun) {
299 
300  readQtResults();
301 
302  if (m_verbose) {
303 
304  std::cout << "\n L1TEventInfoClient::endRun\n" << std::endl;
306  }
307 
308  }
309 }
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 69 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().

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

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

Referenced by initialize().

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

Definition at line 89 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 88 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 87 of file L1TEventInfoClient.h.

Referenced by initialize().

MonitorElement* L1TEventInfoClient::m_meReportSummary
private

a summary report

Definition at line 140 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 143 of file L1TEventInfoClient.h.

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

MonitorElement* L1TEventInfoClient::m_meReportSummaryMap
private

report summary map

Definition at line 146 of file L1TEventInfoClient.h.

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

std::string L1TEventInfoClient::m_monitorDir
private

Definition at line 80 of file L1TEventInfoClient.h.

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

size_t L1TEventInfoClient::m_nrL1Objects
private

number of L1 trigger objects

Definition at line 110 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 107 of file L1TEventInfoClient.h.

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

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

Definition at line 124 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 126 of file L1TEventInfoClient.h.

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

Definition at line 125 of file L1TEventInfoClient.h.

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

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

Definition at line 130 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 129 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 128 of file L1TEventInfoClient.h.

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

Float_t L1TEventInfoClient::m_reportSummary
private

summary report

Definition at line 134 of file L1TEventInfoClient.h.

Referenced by readQtResults().

bool L1TEventInfoClient::m_runInEndJob
private

Definition at line 85 of file L1TEventInfoClient.h.

Referenced by endJob().

bool L1TEventInfoClient::m_runInEndLumi
private

Definition at line 83 of file L1TEventInfoClient.h.

Referenced by endLuminosityBlock().

bool L1TEventInfoClient::m_runInEndRun
private

Definition at line 84 of file L1TEventInfoClient.h.

Referenced by endRun().

bool L1TEventInfoClient::m_runInEventLoop
private

Definition at line 82 of file L1TEventInfoClient.h.

Referenced by analyze().

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

Definition at line 135 of file L1TEventInfoClient.h.

Referenced by readQtResults().

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

Definition at line 118 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 116 of file L1TEventInfoClient.h.

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

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

Definition at line 117 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 122 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 121 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 120 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 114 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

bool L1TEventInfoClient::m_verbose
private

input parameters

Definition at line 79 of file L1TEventInfoClient.h.

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