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
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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  // general counters:
439  // iAllQTest: all quality tests for all systems and objects
440  // iAllMon: all monitored systems and objects
441  int iAllQTest = 0;
442  int iAllMon = 0;
443 
444  for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
445 
447 
448  const std::vector<std::string>& sysQtName =
450 
451  for (std::vector<std::string>::const_iterator itQtName =
452  sysQtName.begin(); itQtName != sysQtName.end(); ++itQtName) {
453 
454  const std::string hStr = m_monitorDir + "_L1Sys_" +m_systemLabel[iMon] + "_" + (*itQtName);
455 
456  m_meReportSummaryContent.push_back(m_dbe->bookFloat(hStr));
457  m_meReportSummaryContent[iAllQTest]->Fill(0.);
458 
459  iAllQTest++;
460  }
461 
462  iAllMon++;
463  }
464 
465 
466  for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
467 
469 
470  const std::vector<std::string>& objQtName =
472 
473  for (std::vector<std::string>::const_iterator itQtName =
474  objQtName.begin(); itQtName != objQtName.end(); ++itQtName) {
475 
476  const std::string hStr = m_monitorDir + "_L1Obj_" + m_objectLabel[iMon] + "_"
477  + (*itQtName);
478 
479  m_meReportSummaryContent.push_back(m_dbe->bookFloat(hStr));
480  m_meReportSummaryContent[iAllQTest]->Fill(0.);
481 
482  iAllQTest++;
483  }
484 
485  iAllMon++;
486 
487  }
488 
489  m_dbe->setCurrentFolder(dirEventInfo);
490 
491  if ((m_meReportSummaryMap = m_dbe->get(dirEventInfo + "/reportSummaryMap"))) {
493  }
494 
495  // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y
496 
497  int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects);
498 
499  m_meReportSummaryMap = m_dbe->book2D("reportSummaryMap",
500  "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
501 
502  if (m_monitorDir == "L1TEMU") {
504  "L1TEMU: L1 Emulator vs Data Report Summary Map");
505 
506  } else if (m_monitorDir == "L1T") {
508  "L1T: L1 Trigger Data Report Summary Map");
509  } else {
510  // do nothing
511  }
512 
515 
516  m_meReportSummaryMap->setBinLabel(1, "L1 systems", 1);
517  m_meReportSummaryMap->setBinLabel(2, "L1 objects", 1);
518 
519  for (int iBin = 0; iBin < nBinsY; ++iBin) {
520 
521  m_meReportSummaryMap->setBinLabel(iBin + 1, " ", 2);
522  }
523 
524 }
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:891
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:3143
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:1708
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:1082
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:667
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:1708
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 527 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().

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