CMS 3D CMS Logo

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

#include <L1TEventInfoClient.h>

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

Public Member Functions

 L1TEventInfoClient (const edm::ParameterSet &)
 Constructor. More...
 
 ~L1TEventInfoClient () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
 DQMEDHarvester ()
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
void endJob () final
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &, edm::EventSetup const &) final
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDHarvester () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns, edm::one::SharedResources >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 end job More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &, const edm::EventSetup &) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDHarvester
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

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

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

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

Description: see header file.

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 41 of file L1TEventInfoClient.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 44 of file L1TEventInfoClient.cc.

References initialize().

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

Destructor.

Definition at line 63 of file L1TEventInfoClient.cc.

63  {
64 
65  //empty
66 
67 }

Member Function Documentation

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

book histograms

Definition at line 354 of file L1TEventInfoClient.cc.

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

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

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

end job

Implements DQMEDHarvester.

Definition at line 255 of file L1TEventInfoClient.cc.

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

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

Definition at line 236 of file L1TEventInfoClient.cc.

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

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

dump the content of the monitoring elements defined in this module

Definition at line 268 of file L1TEventInfoClient.cc.

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

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

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

private methods

initialize properly all elements

Definition at line 69 of file L1TEventInfoClient.cc.

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

Referenced by L1TEventInfoClient().

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

read quality test results

Definition at line 467 of file L1TEventInfoClient.cc.

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

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

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

Member Data Documentation

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

Definition at line 75 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 74 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 73 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 72 of file L1TEventInfoClient.h.

Referenced by initialize().

MonitorElement* L1TEventInfoClient::m_meReportSummary
private

a summary report

Definition at line 124 of file L1TEventInfoClient.h.

Referenced by book(), and readQtResults().

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

monitor elements to report content for all quality tests

Definition at line 127 of file L1TEventInfoClient.h.

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

MonitorElement* L1TEventInfoClient::m_meReportSummaryMap
private

report summary map

Definition at line 130 of file L1TEventInfoClient.h.

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

std::string L1TEventInfoClient::m_monitorDir
private

Definition at line 65 of file L1TEventInfoClient.h.

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

size_t L1TEventInfoClient::m_nrL1Objects
private

number of L1 trigger objects

Definition at line 95 of file L1TEventInfoClient.h.

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

size_t L1TEventInfoClient::m_nrL1Systems
private

number of L1 trigger systems

Definition at line 92 of file L1TEventInfoClient.h.

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

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

Definition at line 109 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 111 of file L1TEventInfoClient.h.

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

Definition at line 110 of file L1TEventInfoClient.h.

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

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

Definition at line 115 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 114 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 113 of file L1TEventInfoClient.h.

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

Float_t L1TEventInfoClient::m_reportSummary
private

summary report

Definition at line 119 of file L1TEventInfoClient.h.

Referenced by readQtResults().

bool L1TEventInfoClient::m_runInEndJob
private

Definition at line 70 of file L1TEventInfoClient.h.

bool L1TEventInfoClient::m_runInEndLumi
private

Definition at line 68 of file L1TEventInfoClient.h.

Referenced by dqmEndLuminosityBlock().

bool L1TEventInfoClient::m_runInEndRun
private

Definition at line 69 of file L1TEventInfoClient.h.

bool L1TEventInfoClient::m_runInEventLoop
private

Definition at line 67 of file L1TEventInfoClient.h.

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

Definition at line 121 of file L1TEventInfoClient.h.

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

Float_t L1TEventInfoClient::m_summarySum
private

Definition at line 120 of file L1TEventInfoClient.h.

Referenced by readQtResults().

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

Definition at line 103 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 101 of file L1TEventInfoClient.h.

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

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

Definition at line 102 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 107 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 106 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 105 of file L1TEventInfoClient.h.

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

size_t L1TEventInfoClient::m_totalNrQtSummaryEnabled
private

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

Definition at line 99 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

bool L1TEventInfoClient::m_verbose
private

input parameters

Definition at line 64 of file L1TEventInfoClient.h.

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