CMS 3D CMS Logo

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

#include <L1TTestsSummary.h>

Inheritance diagram for L1TTestsSummary:
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

 L1TTestsSummary (const edm::ParameterSet &ps)
 
 ~L1TTestsSummary () override
 
- 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

virtual void book (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 
void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) 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 updateL1TOccupancyMonitor (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void updateL1TRateMonitor (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void updateL1TSummary (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
void updateL1TSyncMonitor (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 

Private Attributes

int binYOccpancy
 
int binYRate
 
int binYSync
 
MonitorElementmL1TOccupancyMonitor
 
std::string mL1TOccupancyPath
 
MonitorElementmL1TRateMonitor
 
std::string mL1TRatePath
 
MonitorElementmL1TSummary
 
MonitorElementmL1TSyncMonitor
 
std::string mL1TSyncPath
 
bool mMonitorL1TOccupancy
 
bool mMonitorL1TRate
 
bool mMonitorL1TSync
 
edm::ParameterSet mParameters
 
std::vector< int > mProcessedLS
 
bool mVerbose
 

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

Definition at line 26 of file L1TTestsSummary.h.

Constructor & Destructor Documentation

L1TTestsSummary::L1TTestsSummary ( const edm::ParameterSet ps)

Definition at line 30 of file L1TTestsSummary.cc.

References gather_cfg::cout, and edm::ParameterSet::getUntrackedParameter().

30  {
31  if (mVerbose) {
32  cout << "[L1TTestsSummary:] Called constructor" << endl;
33  }
34 
35  // Get parameters
36  mParameters = ps;
37  mVerbose = ps.getUntrackedParameter<bool>("verbose", true);
38  mMonitorL1TRate = ps.getUntrackedParameter<bool>("MonitorL1TRate", true);
39  mMonitorL1TSync = ps.getUntrackedParameter<bool>("MonitorL1TSync", true);
40  mMonitorL1TOccupancy = ps.getUntrackedParameter<bool>("MonitorL1TOccupancy", true);
41 
42  mL1TRatePath = ps.getUntrackedParameter<string>("L1TRatePath", "L1T/L1TRate/Certification/");
43  mL1TSyncPath = ps.getUntrackedParameter<string>("L1TSyncPath", "L1T/L1TSync/Certification/");
44  mL1TOccupancyPath = ps.getUntrackedParameter<string>("L1TOccupancyPath", "L1T/L1TOccupancy/Certification/");
45 }
T getUntrackedParameter(std::string const &, T const &) const
std::string mL1TRatePath
std::string mL1TSyncPath
std::string mL1TOccupancyPath
edm::ParameterSet mParameters
L1TTestsSummary::~L1TTestsSummary ( )
override

Definition at line 51 of file L1TTestsSummary.cc.

References gather_cfg::cout.

51  {
52  if (mVerbose) {
53  cout << "[L1TTestsSummary:] Called destructor" << endl;
54  }
55 }

Member Function Documentation

void L1TTestsSummary::book ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
protectedvirtual

Definition at line 64 of file L1TTestsSummary.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), gather_cfg::cout, dqm::dqmstoreimpl::DQMStore::IGetter::get(), dqm::dqmstoreimpl::DQMStore::IGetter::getMEs(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, Skims_PA_cff::name, dqm::impl::MonitorElement::setAxisTitle(), dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), and dqm::dqmstoreimpl::DQMStore::IGetter::setCurrentFolder().

64  {
65  if (mVerbose) {
66  cout << "[L1TTestsSummary:] Called beginRun" << endl;
67  }
68 
69  int maxLS = 2500;
70 
71  if (mMonitorL1TRate) {
72  if (mVerbose) {
73  cout << "[L1TTestsSummary:] Initializing L1TRate Module Monitoring" << endl;
74  }
75 
76  igetter.setCurrentFolder(mL1TRatePath);
77  vector<string> histToMonitor = igetter.getMEs();
78  int histLines = histToMonitor.size() + 1;
79 
80  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
81  mL1TRateMonitor = ibooker.book2D(
82  "RateQualitySummary", "L1T Rates Monitor Summary", maxLS, +0.5, double(maxLS) + 0.5, histLines, 0, histLines);
83  mL1TRateMonitor->setAxisTitle("Lumi Section", 1);
84 
85  mL1TRateMonitor->setBinLabel(1, "Summary", 2);
86  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
87  string name = igetter.get(mL1TRatePath + histToMonitor[i])->getTH1()->GetName();
88  mL1TRateMonitor->setBinLabel(i + 2, name, 2);
89  }
90  }
91  if (mMonitorL1TSync) {
92  if (mVerbose) {
93  cout << "[L1TTestsSummary:] Initializing L1TSync Module Monitoring" << endl;
94  }
95 
96  igetter.setCurrentFolder(mL1TSyncPath);
97  vector<string> histToMonitor = igetter.getMEs();
98  int histLines = histToMonitor.size() + 1;
99 
100  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
101  mL1TSyncMonitor = ibooker.book2D("SyncQualitySummary",
102  "L1T Synchronization Monitor Summary",
103  maxLS,
104  0.5,
105  double(maxLS) + 0.5,
106  histLines,
107  0,
108  histLines);
109  mL1TSyncMonitor->setAxisTitle("Lumi Section", 1);
110 
111  mL1TSyncMonitor->setBinLabel(1, "Summary", 2);
112  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
113  string name = igetter.get(mL1TSyncPath + histToMonitor[i])->getTH1()->GetName();
114  mL1TSyncMonitor->setBinLabel(i + 2, name, 2);
115  }
116  }
117  if (mMonitorL1TOccupancy) {
118  if (mVerbose) {
119  cout << "[L1TTestsSummary:] Initializing L1TOccupancy Module Monitoring" << endl;
120  }
121 
122  igetter.setCurrentFolder(mL1TOccupancyPath);
123  vector<string> histToMonitor = igetter.getMEs();
124  int histLines = histToMonitor.size() + 1;
125 
126  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
127  mL1TOccupancyMonitor = ibooker.book2D(
128  "OccupancySummary", "L1T Occupancy Monitor Summary", maxLS, +0.5, double(maxLS) + 0.5, histLines, 0, histLines);
129  mL1TOccupancyMonitor->setAxisTitle("Lumi Section", 1);
130 
131  mL1TOccupancyMonitor->setBinLabel(1, "Summary", 2);
132  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
133  string name = igetter.get(mL1TOccupancyPath + histToMonitor[i])->getTH1()->GetName();
134  mL1TOccupancyMonitor->setBinLabel(i + 2, name, 2);
135  }
136  }
137 
138  //-> Making the summary of summaries
139  int testsToMonitor = 1;
140  if (mMonitorL1TRate) {
141  testsToMonitor++;
142  }
143  if (mMonitorL1TSync) {
144  testsToMonitor++;
145  }
146  if (mMonitorL1TOccupancy) {
147  testsToMonitor++;
148  }
149 
150  // Creating
151  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
152  mL1TSummary = ibooker.book2D(
153  "L1TQualitySummary", "L1 Tests Summary", maxLS, +0.5, double(maxLS) + 0.5, testsToMonitor, 0, testsToMonitor);
154  mL1TSummary->setAxisTitle("Lumi Section", 1);
155  mL1TSummary->setBinLabel(1, "L1T Summary", 2);
156 
157  int it = 2;
158  if (mMonitorL1TRate) {
159  mL1TSummary->setBinLabel(it, "Rates", 2);
160  binYRate = it;
161  it++;
162  }
163  if (mMonitorL1TSync) {
164  mL1TSummary->setBinLabel(it, "Synchronization", 2);
165  binYSync = it;
166  it++;
167  }
168  if (mMonitorL1TOccupancy) {
169  mL1TSummary->setBinLabel(it, "Occupancy", 2);
170  binYOccpancy = it;
171  }
172 }
MonitorElement * mL1TOccupancyMonitor
MonitorElement * mL1TSummary
MonitorElement * mL1TSyncMonitor
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)
MonitorElement * mL1TRateMonitor
std::string mL1TRatePath
std::string mL1TSyncPath
std::string mL1TOccupancyPath
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TTestsSummary::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
overrideprotectedvirtual

Implements DQMEDHarvester.

Definition at line 181 of file L1TTestsSummary.cc.

References gather_cfg::cout.

181  {
182  book(ibooker, igetter);
183 
184  if (mVerbose) {
185  cout << "[L1TTestsSummary:] Called endRun()" << endl;
186  }
187 
188  if (mMonitorL1TRate) {
189  updateL1TRateMonitor(ibooker, igetter);
190  }
191  if (mMonitorL1TSync) {
192  updateL1TSyncMonitor(ibooker, igetter);
193  }
194  if (mMonitorL1TOccupancy) {
195  updateL1TOccupancyMonitor(ibooker, igetter);
196  }
197  updateL1TSummary(ibooker, igetter);
198 }
void updateL1TRateMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TSummary(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
virtual void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TOccupancyMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TSyncMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void L1TTestsSummary::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
overrideprotected

Definition at line 207 of file L1TTestsSummary.cc.

References gather_cfg::cout, edm::LuminosityBlockBase::id(), and edm::LuminosityBlockID::luminosityBlock().

210  {
211  int eventLS = lumiSeg.id().luminosityBlock();
212 
213  book(ibooker, igetter);
214 
215  mProcessedLS.push_back(eventLS);
216 
217  if (mVerbose) {
218  cout << "[L1TTestsSummary:] Called endLuminosityBlock()" << endl;
219  cout << "[L1TTestsSummary:] Lumisection: " << eventLS << endl;
220  }
221 
222  if (mMonitorL1TRate) {
223  updateL1TRateMonitor(ibooker, igetter);
224  }
225  if (mMonitorL1TSync) {
226  updateL1TSyncMonitor(ibooker, igetter);
227  }
228  if (mMonitorL1TOccupancy) {
229  updateL1TOccupancyMonitor(ibooker, igetter);
230  }
231  updateL1TSummary(ibooker, igetter);
232 }
LuminosityBlockID id() const
void updateL1TRateMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TSummary(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
virtual void book(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
void updateL1TOccupancyMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
std::vector< int > mProcessedLS
void updateL1TSyncMonitor(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
LuminosityBlockNumber_t luminosityBlock() const
void L1TTestsSummary::updateL1TOccupancyMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 372 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, RemoveAddSevLevel::flag, dqm::dqmstoreimpl::DQMStore::IGetter::get(), QReport::getBadChannels(), getBin(), dqm::dqmstoreimpl::DQMStore::IGetter::getMEs(), QReport::getMessage(), dqm::impl::MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::dqmstoreimpl::DQMStore::IGetter::setCurrentFolder().

372  {
373  igetter.setCurrentFolder(mL1TOccupancyPath);
374  vector<string> histToMonitor = igetter.getMEs();
375 
376  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
377  MonitorElement *me = igetter.get(mL1TOccupancyPath + histToMonitor[i]);
378  if (mVerbose) {
379  cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;
380  }
381 
382  const QReport *myQReport = me->getQReport("L1TOccupancyTest"); //get QReport associated to your ME
383  if (myQReport) {
384  float qtresult = myQReport->getQTresult(); // get QT result value
385  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
386  const string &qtmessage = myQReport->getMessage(); // get the whole QT result message
387  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
388 
389  if (mVerbose) {
390  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
391  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
392  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
393  }
394 
395  for (unsigned int i = 0; i < mProcessedLS.size(); i++) {
396  int binx = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
397  int biny = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
398  mL1TOccupancyMonitor->setBinContent(binx, biny, 100);
399  }
400 
401  for (unsigned int a = 0; a < qtBadChannels.size(); a++) {
402  for (unsigned int b = 0; b < mProcessedLS.size(); b++) {
403  // Converting bin to value
404  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
405 
406  if (valueBinBad == mProcessedLS[b]) {
407  int binx = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
408  int biny = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
409  mL1TOccupancyMonitor->setBinContent(binx, biny, 300);
410  }
411  }
412  }
413  }
414  }
415 
416  //-> Filling the summaries
417  int nBinX = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->GetNbins();
418  int nBinY = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->GetNbins();
419  for (int binx = 1; binx <= nBinX; binx++) {
420  int GlobalStatus = 0;
421  for (int biny = 2; biny <= nBinY; biny++) {
422  double flag = mL1TOccupancyMonitor->getBinContent(binx, biny);
423  if (GlobalStatus < flag) {
424  GlobalStatus = flag;
425  }
426  }
427 
428  // NOTE: Assumes mL1TSummary has same size then mL1TOccupancyMonitor
429  mL1TOccupancyMonitor->setBinContent(binx, 1, GlobalStatus);
430  mL1TSummary->setBinContent(binx, binYOccpancy, GlobalStatus);
431  }
432 }
MonitorElement * mL1TOccupancyMonitor
virtual TH2F * getTH2F() const
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:37
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
virtual double getBinContent(int binx) const
get content of bin (1-D)
const std::string & getMessage() const
get message attached to test
Definition: QReport.h:30
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:455
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
double b
Definition: hdecay.h:118
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:24
std::string mL1TOccupancyPath
double a
Definition: hdecay.h:119
float getQTresult() const
get test result i.e. prob value
Definition: QReport.h:27
virtual TH1 * getTH1() const
void L1TTestsSummary::updateL1TRateMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 238 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, RemoveAddSevLevel::flag, dqm::dqmstoreimpl::DQMStore::IGetter::get(), QReport::getBadChannels(), getBin(), dqm::dqmstoreimpl::DQMStore::IGetter::getMEs(), QReport::getMessage(), dqm::impl::MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::dqmstoreimpl::DQMStore::IGetter::setCurrentFolder().

238  {
239  igetter.setCurrentFolder(mL1TRatePath);
240  vector<string> histToMonitor = igetter.getMEs();
241 
242  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
243  MonitorElement *me = igetter.get(mL1TRatePath + histToMonitor[i]);
244  if (mVerbose) {
245  cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;
246  }
247 
248  const QReport *myQReport = me->getQReport("L1TRateTest"); //get QReport associated to your ME
249  if (myQReport) {
250  float qtresult = myQReport->getQTresult(); // get QT result value
251  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
252  const string &qtmessage = myQReport->getMessage(); // get the whole QT result message
253  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
254 
255  if (mVerbose) {
256  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
257  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
258  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
259  }
260 
261  for (unsigned int i = 0; i < mProcessedLS.size() - 1; i++) {
262  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
263  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
264  mL1TRateMonitor->setBinContent(binx, biny, 100);
265  }
266 
267  for (unsigned int a = 0; a < qtBadChannels.size(); a++) {
268  for (unsigned int b = 0; b < mProcessedLS.size() - 1; b++) {
269  // Converting bin to value
270  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
271 
272  if (valueBinBad == (mProcessedLS[b])) {
273  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
274  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
275  mL1TRateMonitor->setBinContent(binx, biny, 300);
276  }
277  }
278  }
279  }
280  }
281 
282  //-> Filling the summaries
283  int nBinX = mL1TRateMonitor->getTH2F()->GetXaxis()->GetNbins();
284  int nBinY = mL1TRateMonitor->getTH2F()->GetYaxis()->GetNbins();
285  for (int binx = 1; binx <= nBinX; binx++) {
286  int GlobalStatus = 0;
287  for (int biny = 2; biny <= nBinY; biny++) {
288  double flag = mL1TRateMonitor->getBinContent(binx, biny);
289  if (GlobalStatus < flag) {
290  GlobalStatus = flag;
291  }
292  }
293 
294  // NOTE: Assumes mL1TSummary has same size then mL1TRateMonitor
295  mL1TRateMonitor->setBinContent(binx, 1, GlobalStatus);
296  mL1TSummary->setBinContent(binx, binYRate, GlobalStatus);
297  }
298 }
virtual TH2F * getTH2F() const
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:37
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
virtual double getBinContent(int binx) const
get content of bin (1-D)
const std::string & getMessage() const
get message attached to test
Definition: QReport.h:30
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:455
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * mL1TRateMonitor
double b
Definition: hdecay.h:118
std::string mL1TRatePath
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:24
double a
Definition: hdecay.h:119
float getQTresult() const
get test result i.e. prob value
Definition: QReport.h:27
virtual TH1 * getTH1() const
void L1TTestsSummary::updateL1TSummary ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 438 of file L1TTestsSummary.cc.

References DEFINE_FWK_MODULE, and anotherprimaryvertexanalyzer_cfi::nBinX.

438  {
439  int nBinX = mL1TSummary->getTH2F()->GetXaxis()->GetNbins();
440  for (int binx = 1; binx <= nBinX; binx++) {
441  int GlobalStatus = 0;
442  if (mMonitorL1TRate) {
443  if (mL1TSummary->getBinContent(binx, binYRate) > GlobalStatus) {
444  GlobalStatus = mL1TSummary->getBinContent(binx, binYRate);
445  }
446  }
447  if (mMonitorL1TSync) {
448  if (mL1TSummary->getBinContent(binx, binYSync) > GlobalStatus) {
449  GlobalStatus = mL1TSummary->getBinContent(binx, binYSync);
450  }
451  }
452  if (mMonitorL1TOccupancy) {
453  if (mL1TSummary->getBinContent(binx, binYOccpancy) > GlobalStatus) {
454  GlobalStatus = mL1TSummary->getBinContent(binx, binYOccpancy);
455  }
456  }
457  mL1TSummary->setBinContent(binx, 1, GlobalStatus);
458  }
459 }
virtual TH2F * getTH2F() const
MonitorElement * mL1TSummary
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
void L1TTestsSummary::updateL1TSyncMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 306 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, RemoveAddSevLevel::flag, dqm::dqmstoreimpl::DQMStore::IGetter::get(), QReport::getBadChannels(), getBin(), dqm::dqmstoreimpl::DQMStore::IGetter::getMEs(), QReport::getMessage(), dqm::impl::MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), dqm::legacy::MonitorElement::getTH1(), mps_fire::i, hlt_dqm_clientPB-live_cfg::me, anotherprimaryvertexanalyzer_cfi::nBinX, anotherprimaryvertexanalyzer_cfi::nBinY, and dqm::dqmstoreimpl::DQMStore::IGetter::setCurrentFolder().

306  {
307  igetter.setCurrentFolder(mL1TSyncPath);
308  vector<string> histToMonitor = igetter.getMEs();
309 
310  for (unsigned int i = 0; i < histToMonitor.size(); i++) {
311  MonitorElement *me = igetter.get(mL1TSyncPath + histToMonitor[i]);
312  if (mVerbose) {
313  cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;
314  }
315 
316  const QReport *myQReport = me->getQReport("L1TSyncTest"); //get QReport associated to your ME
317  if (myQReport) {
318  float qtresult = myQReport->getQTresult(); // get QT result value
319  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
320  const string &qtmessage = myQReport->getMessage(); // get the whole QT result message
321  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
322 
323  if (mVerbose) {
324  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
325  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
326  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
327  }
328 
329  for (unsigned int i = 0; i < mProcessedLS.size(); i++) {
330  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
331  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
332  mL1TSyncMonitor->setBinContent(binx, biny, 100);
333  }
334 
335  for (unsigned int a = 0; a < qtBadChannels.size(); a++) {
336  for (unsigned int b = 0; b < mProcessedLS.size(); b++) {
337  // Converting bin to value
338  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
339 
340  if (valueBinBad == mProcessedLS[b]) {
341  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
342  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
343  mL1TSyncMonitor->setBinContent(binx, biny, 300);
344  }
345  }
346  }
347  }
348  }
349 
350  //-> Filling the summaries
351  int nBinX = mL1TSyncMonitor->getTH2F()->GetXaxis()->GetNbins();
352  int nBinY = mL1TSyncMonitor->getTH2F()->GetYaxis()->GetNbins();
353  for (int binx = 1; binx <= nBinX; binx++) {
354  int GlobalStatus = 0;
355  for (int biny = 2; biny <= nBinY; biny++) {
356  double flag = mL1TSyncMonitor->getBinContent(binx, biny);
357  if (GlobalStatus < flag) {
358  GlobalStatus = flag;
359  }
360  }
361 
362  // NOTE: Assumes mL1TSummary has same size then mL1TSyncMonitor
363  mL1TSyncMonitor->setBinContent(binx, 1, GlobalStatus);
364  mL1TSummary->setBinContent(binx, binYSync, GlobalStatus);
365  }
366 }
virtual TH2F * getTH2F() const
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:37
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
MonitorElement * mL1TSyncMonitor
virtual double getBinContent(int binx) const
get content of bin (1-D)
const std::string & getMessage() const
get message attached to test
Definition: QReport.h:30
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:455
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
double b
Definition: hdecay.h:118
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:24
std::string mL1TSyncPath
double a
Definition: hdecay.h:119
float getQTresult() const
get test result i.e. prob value
Definition: QReport.h:27
virtual TH1 * getTH1() const

Member Data Documentation

int L1TTestsSummary::binYOccpancy
private

Definition at line 53 of file L1TTestsSummary.h.

int L1TTestsSummary::binYRate
private

Definition at line 53 of file L1TTestsSummary.h.

int L1TTestsSummary::binYSync
private

Definition at line 53 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TOccupancyMonitor
private

Definition at line 66 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TOccupancyPath
private

Definition at line 58 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TRateMonitor
private

Definition at line 64 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TRatePath
private

Definition at line 56 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TSummary
private

Definition at line 67 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TSyncMonitor
private

Definition at line 65 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TSyncPath
private

Definition at line 57 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TOccupancy
private

Definition at line 50 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TRate
private

Definition at line 48 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TSync
private

Definition at line 49 of file L1TTestsSummary.h.

edm::ParameterSet L1TTestsSummary::mParameters
private

Definition at line 44 of file L1TTestsSummary.h.

std::vector<int> L1TTestsSummary::mProcessedLS
private

Definition at line 61 of file L1TTestsSummary.h.

bool L1TTestsSummary::mVerbose
private

Definition at line 47 of file L1TTestsSummary.h.