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 hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 DQMEDHarvester
typedef dqm::harvesting::DQMStore DQMStore
 
typedef dqm::harvesting::MonitorElement MonitorElement
 
- 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 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().

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  initialize();
59 }
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 62 of file L1TEventInfoClient.cc.

62  {
63  //empty
64 }

Member Function Documentation

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

book histograms

Definition at line 297 of file L1TEventInfoClient.cc.

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

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

297  {
298  std::string dirEventInfo = m_monitorDir + "/EventInfo";
299 
300  ibooker.setCurrentFolder(dirEventInfo);
301 
302  // ...and book it again
303  m_meReportSummary = ibooker.bookFloat("reportSummary");
304 
305  // initialize reportSummary to 1
306 
307  if (m_meReportSummary) {
309  }
310 
311  // define float histograms for reportSummaryContents (one histogram per quality test),
312  // initialize them to zero
313  // initialize also m_summaryContent to dqm::qstatus::DISABLED
314 
315  ibooker.setCurrentFolder(dirEventInfo + "/reportSummaryContents");
316  // general counters:
317  // iAllQTest: all quality tests for all systems and objects
318  // iAllMon: all monitored systems and objects
319  int iAllQTest = 0;
320  int iAllMon = 0;
321 
322  for (unsigned int iMon = 0; iMon < m_nrL1Systems; ++iMon) {
324 
325  const std::vector<std::string>& sysQtName = m_systemQualityTestName[iMon];
326 
327  for (std::vector<std::string>::const_iterator itQtName = sysQtName.begin(); itQtName != sysQtName.end();
328  ++itQtName) {
329  const std::string hStr = m_monitorDir + "_L1Sys_" + m_systemLabel[iMon] + "_" + (*itQtName);
330 
331  m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));
332  m_meReportSummaryContent[iAllQTest]->Fill(0.);
333 
334  iAllQTest++;
335  }
336 
337  iAllMon++;
338  }
339 
340  for (unsigned int iMon = 0; iMon < m_nrL1Objects; ++iMon) {
342 
343  const std::vector<std::string>& objQtName = m_objectQualityTestName[iMon];
344 
345  for (std::vector<std::string>::const_iterator itQtName = objQtName.begin(); itQtName != objQtName.end();
346  ++itQtName) {
347  const std::string hStr = m_monitorDir + "_L1Obj_" + m_objectLabel[iMon] + "_" + (*itQtName);
348 
349  m_meReportSummaryContent.push_back(ibooker.bookFloat(hStr));
350  m_meReportSummaryContent[iAllQTest]->Fill(0.);
351 
352  iAllQTest++;
353  }
354 
355  iAllMon++;
356  }
357 
358  ibooker.setCurrentFolder(dirEventInfo);
359 
360  // define a histogram with two bins on X and maximum of m_nrL1Systems, m_nrL1Objects on Y
361 
362  int nBinsY = std::max(m_nrL1Systems, m_nrL1Objects);
363 
364  m_meReportSummaryMap = ibooker.book2D("reportSummaryMap", "reportSummaryMap", 2, 1, 3, nBinsY, 1, nBinsY + 1);
365 
366  if (m_monitorDir == "L1TEMU") {
367  m_meReportSummaryMap->setTitle("L1TEMU: L1 Emulator vs Data Report Summary Map");
368 
369  } else if (m_monitorDir == "L1T") {
370  m_meReportSummaryMap->setTitle("L1T: L1 Trigger Data Report Summary Map");
371  } else {
372  // do nothing
373  }
374 
377 
378  m_meReportSummaryMap->setBinLabel(1, "L1 systems", 1);
379  m_meReportSummaryMap->setBinLabel(2, "L1 objects", 1);
380 
381  for (int iBin = 0; iBin < nBinsY; ++iBin) {
382  m_meReportSummaryMap->setBinLabel(iBin + 1, " ", 2);
383  }
384 }
std::vector< std::vector< std::string > > m_systemQualityTestName
virtual void setTitle(const std::string &title)
set (ie. change) histogram/profile title
std::vector< std::string > m_systemLabel
MonitorElement * m_meReportSummaryMap
report summary map
std::vector< MonitorElement * > m_meReportSummaryContent
monitor elements to report content for all quality tests
void Fill(long long x)
MonitorElement * m_meReportSummary
a summary report
static const int DISABLED
virtual 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)
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
std::vector< int > m_summaryContent
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TEventInfoClient::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

end job

Implements DQMEDHarvester.

Definition at line 220 of file L1TEventInfoClient.cc.

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

220  {
221  book(ibooker, igetter);
222 
223  readQtResults(ibooker, igetter);
224 
225  if (m_verbose) {
226  std::cout << "\n L1TEventInfoClient::endRun\n" << std::endl;
227  dumpContentMonitorElements(ibooker, igetter);
228  }
229 }
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 205 of file L1TEventInfoClient.cc.

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

208  {
209  if (m_runInEndLumi) {
210  book(ibooker, igetter);
211  readQtResults(ibooker, igetter);
212 
213  if (m_verbose) {
214  std::cout << "\n L1TEventInfoClient::endLuminosityBlock\n" << std::endl;
215  dumpContentMonitorElements(ibooker, igetter);
216  }
217  }
218 }
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 231 of file L1TEventInfoClient.cc.

References gather_cfg::cout, dqm::dqmstoreimpl::DQMStore::IGetter::get(), dqm::impl::MonitorElement::getName(), dqm::legacy::MonitorElement::getTH2F(), compare::hist, m_meReportSummaryContent, m_meReportSummaryMap, m_monitorDir, m_nrL1Objects, m_nrL1Systems, m_objectDisable, m_objectLabel, m_summaryContent, m_systemDisable, m_systemLabel, m_systemLabelExt, and hlt_dqm_clientPB-live_cfg::me.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

231  {
232  std::cout << "\nSummary report " << std::endl;
233 
234  // summary content
235 
236  MonitorElement* me = igetter.get(m_meReportSummaryMap->getName());
237 
238  std::cout << "\nSummary content per system and object as filled in histogram\n " << m_meReportSummaryMap->getName()
239  << std::endl;
240 
241  if (!me) {
242  std::cout << "\nNo histogram " << m_meReportSummaryMap->getName()
243  << "\nNo summary content per system and object as filled in histogram.\n " << std::endl;
244  return;
245  }
246 
247  TH2F* hist = me->getTH2F();
248 
249  const int nBinsX = hist->GetNbinsX();
250  const int nBinsY = hist->GetNbinsY();
251  std::cout << nBinsX << " " << nBinsY;
252 
253  std::vector<std::vector<int> > meReportSummaryMap(nBinsX, std::vector<int>(nBinsY));
254 
255  // for (int iBinX = 0; iBinX < nBinsX; iBinX++) {
256  // for (int iBinY = 0; iBinY < nBinsY; iBinY++) {
257  // meReportSummaryMap[iBinX][iBinY]
258  // = static_cast<int>(me->GetBinContent(iBinX + 1, iBinY + 1));
259  // }
260  // }
261 
262  std::cout << "\nL1 systems: " << m_nrL1Systems << " systems included\n"
263  << "\n Summary content size: " << (m_summaryContent.size()) << std::endl;
264 
265  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
266  std::cout << std::setw(10) << m_systemLabel[iSys] << std::setw(10) << m_systemLabelExt[iSys] << " \t"
267  << m_systemDisable[iSys] << " \t" << std::setw(25) << " m_summaryContent[" << std::setw(2) << iSys
268  << "] = " << meReportSummaryMap[0][iSys] << std::endl;
269  }
270 
271  std::cout << "\n L1 trigger objects: " << m_nrL1Objects << " objects included\n" << std::endl;
272 
273  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems + m_nrL1Objects; ++iMon) {
274  std::cout << std::setw(20) << m_objectLabel[iMon - m_nrL1Systems] << " \t" << m_objectDisable[iMon - m_nrL1Systems]
275  << " \t" << std::setw(25) << " m_summaryContent[" << std::setw(2) << iMon << "] = \t"
276  << m_summaryContent[iMon] << std::endl;
277  }
278 
279  std::cout << std::endl;
280 
281  // quality tests
282 
283  std::cout << "\nQuality test results as filled in "
284  << "\n " << m_monitorDir << "/EventInfo/reportSummaryContents\n"
285  << "\n Total number of quality tests: " << (m_meReportSummaryContent.size()) << "\n"
286  << std::endl;
287 
288  for (std::vector<MonitorElement*>::const_iterator itME = m_meReportSummaryContent.begin();
289  itME != m_meReportSummaryContent.end();
290  ++itME) {
291  std::cout << std::setw(50) << (*itME)->getName() << " \t" << std::setw(25) << (*itME)->getFloatValue() << std::endl;
292  }
293 
294  std::cout << std::endl;
295 }
virtual TH2F * getTH2F() const
std::vector< int > m_objectDisable
std::vector< std::string > m_systemLabel
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
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 66 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().

66  {
67  if (m_verbose) {
68  std::cout << "\nMonitor directory = " << m_monitorDir << std::endl;
69  }
70 
71  // L1 systems
72 
73  m_nrL1Systems = m_l1Systems.size();
74 
78 
79  // on average five quality test per system - just a best guess
83 
84  int indexSys = 0;
85 
86  int totalNrQualityTests = 0;
87 
88  for (std::vector<edm::ParameterSet>::const_iterator itSystem = m_l1Systems.begin(); itSystem != m_l1Systems.end();
89  ++itSystem) {
90  m_systemLabel.push_back(itSystem->getParameter<std::string>("SystemLabel"));
91 
92  m_systemLabelExt.push_back(itSystem->getParameter<std::string>("HwValLabel"));
93 
94  m_systemDisable.push_back(itSystem->getParameter<unsigned int>("SystemDisable"));
95  // check the additional disable flag from m_disableL1Systems
96  for (std::vector<std::string>::const_iterator itSys = m_disableL1Systems.begin(); itSys != m_disableL1Systems.end();
97  ++itSys) {
98  if (*itSys == m_systemLabel[indexSys]) {
99  m_systemDisable[indexSys] = 1;
100  }
101  }
102 
103  std::vector<edm::ParameterSet> qTests = itSystem->getParameter<std::vector<edm::ParameterSet> >("QualityTests");
104  size_t qtPerSystem = qTests.size();
105 
106  std::vector<std::string> qtNames;
107  qtNames.reserve(qtPerSystem);
108 
109  std::vector<std::string> qtFullPathHists;
110  qtFullPathHists.reserve(qtPerSystem);
111 
112  std::vector<unsigned int> qtSumEnabled;
113  qtSumEnabled.reserve(qtPerSystem);
114 
115  for (std::vector<edm::ParameterSet>::const_iterator itQT = qTests.begin(); itQT != qTests.end(); ++itQT) {
116  totalNrQualityTests++;
117 
118  qtNames.push_back(itQT->getParameter<std::string>("QualityTestName"));
119 
120  qtFullPathHists.push_back(itQT->getParameter<std::string>("QualityTestHist"));
121 
122  unsigned int qtEnabled = itQT->getParameter<unsigned int>("QualityTestSummaryEnabled");
123 
124  qtSumEnabled.push_back(qtEnabled);
125 
126  if (qtEnabled) {
128  }
129  }
130 
131  m_systemQualityTestName.push_back(qtNames);
132  m_systemQualityTestHist.push_back(qtFullPathHists);
133  m_systemQtSummaryEnabled.push_back(qtSumEnabled);
134 
135  indexSys++;
136  }
137 
138  // L1 objects
139 
140  //
141  m_nrL1Objects = m_l1Objects.size();
142 
143  m_objectLabel.reserve(m_nrL1Objects);
145 
146  // on average five quality test per object - just a best guess
150 
151  int indexObj = 0;
152 
153  for (std::vector<edm::ParameterSet>::const_iterator itObject = m_l1Objects.begin(); itObject != m_l1Objects.end();
154  ++itObject) {
155  m_objectLabel.push_back(itObject->getParameter<std::string>("ObjectLabel"));
156 
157  m_objectDisable.push_back(itObject->getParameter<unsigned int>("ObjectDisable"));
158  // check the additional disable flag from m_disableL1Objects
159  for (std::vector<std::string>::const_iterator itObj = m_disableL1Objects.begin(); itObj != m_disableL1Objects.end();
160  ++itObj) {
161  if (*itObj == m_objectLabel[indexObj]) {
162  m_objectDisable[indexObj] = 1;
163  }
164  }
165 
166  std::vector<edm::ParameterSet> qTests = itObject->getParameter<std::vector<edm::ParameterSet> >("QualityTests");
167  size_t qtPerObject = qTests.size();
168 
169  std::vector<std::string> qtNames;
170  qtNames.reserve(qtPerObject);
171 
172  std::vector<std::string> qtFullPathHists;
173  qtFullPathHists.reserve(qtPerObject);
174 
175  std::vector<unsigned int> qtSumEnabled;
176  qtSumEnabled.reserve(qtPerObject);
177 
178  for (std::vector<edm::ParameterSet>::const_iterator itQT = qTests.begin(); itQT != qTests.end(); ++itQT) {
179  totalNrQualityTests++;
180 
181  qtNames.push_back(itQT->getParameter<std::string>("QualityTestName"));
182 
183  qtFullPathHists.push_back(itQT->getParameter<std::string>("QualityTestHist"));
184 
185  unsigned int qtEnabled = itQT->getParameter<unsigned int>("QualityTestSummaryEnabled");
186 
187  qtSumEnabled.push_back(qtEnabled);
188 
189  if (qtEnabled) {
191  }
192  }
193 
194  m_objectQualityTestName.push_back(qtNames);
195  m_objectQualityTestHist.push_back(qtFullPathHists);
196  m_objectQtSummaryEnabled.push_back(qtSumEnabled);
197 
198  indexObj++;
199  }
200 
202  m_meReportSummaryContent.reserve(totalNrQualityTests);
203 }
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 386 of file L1TEventInfoClient.cc.

References gather_cfg::cout, dqm::qstatus::DISABLED, dqm::impl::MonitorElement::Fill(), dqmMemoryStats::float, dqm::dqmstoreimpl::DQMStore::IGetter::get(), QReport::getMessage(), dqm::impl::MonitorElement::getQReport(), dqm::impl::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, dqm::impl::MonitorElement::setBinContent(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmEndJob(), and dqmEndLuminosityBlock().

386  {
387  // initialize summary content, summary sum and ReportSummaryContent float histograms
388  // for all L1 systems and L1 objects
389 
390  for (std::vector<int>::iterator it = m_summaryContent.begin(); it != m_summaryContent.end(); ++it) {
391  (*it) = dqm::qstatus::DISABLED;
392  }
393 
394  m_summarySum = 0.;
395 
396  for (std::vector<MonitorElement*>::iterator itME = m_meReportSummaryContent.begin();
397  itME != m_meReportSummaryContent.end();
398  ++itME) {
399  (*itME)->Fill(0.);
400  }
401 
402  // general counters:
403  // iAllQTest: all quality tests for all systems and objects
404  // iAllMon: all monitored systems and objects
405  int iAllQTest = 0;
406  int iAllMon = 0;
407 
408  // quality tests for all L1 systems
409 
410  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
411  // get the reports for each quality test
412 
413  const std::vector<std::string>& sysQtName = m_systemQualityTestName[iSys];
414  const std::vector<std::string>& sysQtHist = m_systemQualityTestHist[iSys];
415  const std::vector<unsigned int>& sysQtSummaryEnabled = m_systemQtSummaryEnabled[iSys];
416 
417  // pro system counter for quality tests
418  int iSysQTest = 0;
419 
420  for (std::vector<std::string>::const_iterator itQtName = sysQtName.begin(); itQtName != sysQtName.end();
421  ++itQtName) {
422  // get results, status and message
423 
424  MonitorElement* qHist = igetter.get(sysQtHist[iSysQTest]);
425 
426  if (qHist) {
427  const std::vector<QReport*> qtVec = qHist->getQReports();
428 
429  if (m_verbose) {
430  std::cout << "\nNumber of quality tests "
431  << " for histogram " << sysQtHist[iSysQTest] << ": " << qtVec.size() << "\n"
432  << std::endl;
433  }
434 
435  const QReport* sysQReport = qHist->getQReport(*itQtName);
436  if (sysQReport) {
437  const float sysQtResult = sysQReport->getQTresult();
438  const int sysQtStatus = sysQReport->getStatus();
439  const std::string& sysQtMessage = sysQReport->getMessage();
440 
441  if (m_verbose) {
442  std::cout << "\n"
443  << (*itQtName) << " quality test:"
444  << "\n result: " << sysQtResult << "\n status: " << sysQtStatus
445  << "\n message: " << sysQtMessage << "\n"
446  << "\nFilling m_meReportSummaryContent[" << iAllQTest << "] with value " << sysQtResult << "\n"
447  << std::endl;
448  }
449 
450  m_meReportSummaryContent[iAllQTest]->Fill(sysQtResult);
451 
452  // for the summary map, keep the highest status value ("ERROR") of all tests
453  // which are considered for the summary plot
454  if (sysQtSummaryEnabled[iSysQTest]) {
455  if (sysQtStatus > m_summaryContent[iAllMon]) {
456  m_summaryContent[iAllMon] = sysQtStatus;
457  }
458 
459  m_summarySum += sysQtResult;
460  }
461 
462  } else {
463  // for the summary map, if the test was not found but it is assumed to be
464  // considered for the summary plot, set it to dqm::qstatus::INVALID
465 
466  int sysQtStatus = dqm::qstatus::INVALID;
467 
468  if (sysQtSummaryEnabled[iSysQTest]) {
469  if (sysQtStatus > m_summaryContent[iAllMon]) {
470  m_summaryContent[iAllMon] = sysQtStatus;
471  }
472  }
473 
474  m_meReportSummaryContent[iAllQTest]->Fill(0.);
475 
476  if (m_verbose) {
477  std::cout << "\n" << (*itQtName) << " quality test not found\n" << std::endl;
478  }
479  }
480 
481  } else {
482  // for the summary map, if the histogram was not found but it is assumed
483  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
484 
485  int sysQtStatus = dqm::qstatus::INVALID;
486 
487  if (sysQtSummaryEnabled[iSysQTest]) {
488  if (sysQtStatus > m_summaryContent[iAllMon]) {
489  m_summaryContent[iAllMon] = sysQtStatus;
490  }
491  }
492 
493  m_meReportSummaryContent[iAllQTest]->Fill(0.);
494 
495  if (m_verbose) {
496  std::cout << "\nHistogram " << sysQtHist[iSysQTest] << " not found\n" << std::endl;
497  }
498  }
499 
500  // increase counters for quality tests
501  iSysQTest++;
502  iAllQTest++;
503  }
504 
505  iAllMon++;
506  }
507 
508  // quality tests for all L1 objects
509 
510  for (unsigned int iObj = 0; iObj < m_nrL1Objects; ++iObj) {
511  // get the reports for each quality test
512 
513  const std::vector<std::string>& objQtName = m_objectQualityTestName[iObj];
514  const std::vector<std::string>& objQtHist = m_objectQualityTestHist[iObj];
515  const std::vector<unsigned int>& objQtSummaryEnabled = m_objectQtSummaryEnabled[iObj];
516 
517  // pro object counter for quality tests
518  int iObjQTest = 0;
519 
520  for (std::vector<std::string>::const_iterator itQtName = objQtName.begin(); itQtName != objQtName.end();
521  ++itQtName) {
522  // get results, status and message
523 
524  MonitorElement* qHist = igetter.get(objQtHist[iObjQTest]);
525 
526  if (qHist) {
527  const std::vector<QReport*> qtVec = qHist->getQReports();
528 
529  if (m_verbose) {
530  std::cout << "\nNumber of quality tests "
531  << " for histogram " << objQtHist[iObjQTest] << ": " << qtVec.size() << "\n"
532  << std::endl;
533  }
534 
535  const QReport* objQReport = qHist->getQReport(*itQtName);
536  if (objQReport) {
537  const float objQtResult = objQReport->getQTresult();
538  const int objQtStatus = objQReport->getStatus();
539  const std::string& objQtMessage = objQReport->getMessage();
540 
541  if (m_verbose) {
542  std::cout << "\n"
543  << (*itQtName) << " quality test:"
544  << "\n result: " << objQtResult << "\n status: " << objQtStatus
545  << "\n message: " << objQtMessage << "\n"
546  << "\nFilling m_meReportSummaryContent[" << iAllQTest << "] with value " << objQtResult << "\n"
547  << std::endl;
548  }
549 
550  m_meReportSummaryContent[iAllQTest]->Fill(objQtResult);
551 
552  // for the summary map, keep the highest status value ("ERROR") of all tests
553  // which are considered for the summary plot
554  if (objQtSummaryEnabled[iObjQTest]) {
555  if (objQtStatus > m_summaryContent[iAllMon]) {
556  m_summaryContent[iAllMon] = objQtStatus;
557  }
558 
559  m_summarySum += objQtResult;
560  }
561 
562  } else {
563  // for the summary map, if the test was not found but it is assumed to be
564  // considered for the summary plot, set it to dqm::qstatus::INVALID
565 
566  int objQtStatus = dqm::qstatus::INVALID;
567 
568  if (objQtSummaryEnabled[iObjQTest]) {
569  if (objQtStatus > m_summaryContent[iAllMon]) {
570  m_summaryContent[iAllMon] = objQtStatus;
571  }
572  }
573 
574  m_meReportSummaryContent[iAllQTest]->Fill(0.);
575 
576  if (m_verbose) {
577  std::cout << "\n" << (*itQtName) << " quality test not found\n" << std::endl;
578  }
579  }
580 
581  } else {
582  // for the summary map, if the histogram was not found but it is assumed
583  // to have a test be considered for the summary plot, set it to dqm::qstatus::INVALID
584 
585  int objQtStatus = dqm::qstatus::INVALID;
586 
587  if (objQtSummaryEnabled[iObjQTest]) {
588  if (objQtStatus > m_summaryContent[iAllMon]) {
589  m_summaryContent[iAllMon] = objQtStatus;
590  }
591  }
592 
593  m_meReportSummaryContent[iAllQTest]->Fill(0.);
594 
595  if (m_verbose) {
596  std::cout << "\nHistogram " << objQtHist[iObjQTest] << " not found\n" << std::endl;
597  }
598  }
599 
600  // increase counters for quality tests
601  iObjQTest++;
602  iAllQTest++;
603  }
604 
605  iAllMon++;
606  }
607 
608  // reportSummary value
610  if (m_meReportSummary) {
612  }
613 
614  // fill the ReportSummaryMap for L1 systems (bin 1 on X)
615  for (unsigned int iSys = 0; iSys < m_nrL1Systems; ++iSys) {
616  double summCont = static_cast<double>(m_summaryContent[iSys]);
617  m_meReportSummaryMap->setBinContent(1, iSys + 1, summCont);
618  }
619 
620  // fill the ReportSummaryMap for L1 objects (bin 2 on X)
621  for (unsigned int iMon = m_nrL1Systems; iMon < m_nrL1Systems + m_nrL1Objects; ++iMon) {
622  double summCont = static_cast<double>(m_summaryContent[iMon]);
623  m_meReportSummaryMap->setBinContent(2, iMon - m_nrL1Systems + 1, summCont);
624  }
625 }
std::vector< std::vector< std::string > > m_objectQualityTestHist
std::vector< std::vector< std::string > > m_systemQualityTestName
MonitorElement * m_meReportSummaryMap
report summary map
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
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void Fill(long long x)
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:30
std::vector< QReport * > getQReports() const
get map of QReports
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:24
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:27
std::vector< int > m_summaryContent
bool m_verbose
input parameters

Member Data Documentation

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

Definition at line 71 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 70 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 69 of file L1TEventInfoClient.h.

Referenced by initialize().

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

Definition at line 68 of file L1TEventInfoClient.h.

Referenced by initialize().

MonitorElement* L1TEventInfoClient::m_meReportSummary
private

a summary report

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

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

MonitorElement* L1TEventInfoClient::m_meReportSummaryMap
private

report summary map

Definition at line 126 of file L1TEventInfoClient.h.

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

std::string L1TEventInfoClient::m_monitorDir
private

Definition at line 61 of file L1TEventInfoClient.h.

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

size_t L1TEventInfoClient::m_nrL1Objects
private

number of L1 trigger objects

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

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

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

Definition at line 105 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 107 of file L1TEventInfoClient.h.

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

Definition at line 106 of file L1TEventInfoClient.h.

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

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

Definition at line 111 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 110 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 109 of file L1TEventInfoClient.h.

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

Float_t L1TEventInfoClient::m_reportSummary
private

summary report

Definition at line 115 of file L1TEventInfoClient.h.

Referenced by readQtResults().

bool L1TEventInfoClient::m_runInEndJob
private

Definition at line 66 of file L1TEventInfoClient.h.

bool L1TEventInfoClient::m_runInEndLumi
private

Definition at line 64 of file L1TEventInfoClient.h.

Referenced by dqmEndLuminosityBlock().

bool L1TEventInfoClient::m_runInEndRun
private

Definition at line 65 of file L1TEventInfoClient.h.

bool L1TEventInfoClient::m_runInEventLoop
private

Definition at line 63 of file L1TEventInfoClient.h.

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

Definition at line 117 of file L1TEventInfoClient.h.

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

Float_t L1TEventInfoClient::m_summarySum
private

Definition at line 116 of file L1TEventInfoClient.h.

Referenced by readQtResults().

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

Definition at line 99 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 97 of file L1TEventInfoClient.h.

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

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

Definition at line 98 of file L1TEventInfoClient.h.

Referenced by dumpContentMonitorElements(), and initialize().

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

Definition at line 103 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

Definition at line 102 of file L1TEventInfoClient.h.

Referenced by initialize(), and readQtResults().

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

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

Referenced by initialize(), and readQtResults().

bool L1TEventInfoClient::m_verbose
private

input parameters

Definition at line 60 of file L1TEventInfoClient.h.

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