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 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 () 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

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::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 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 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 27 of file L1TTestsSummary.h.

Constructor & Destructor Documentation

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

Definition at line 31 of file L1TTestsSummary.cc.

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

31  {
32 
33  if(mVerbose){cout << "[L1TTestsSummary:] Called constructor" << endl;}
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){cout << "[L1TTestsSummary:] Called destructor" << endl;}
53 }

Member Function Documentation

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

Definition at line 62 of file L1TTestsSummary.cc.

References DQMStore::IBooker::book2D(), gather_cfg::cout, DQMStore::IGetter::get(), DQMStore::IGetter::getMEs(), MonitorElement::getTH1(), mps_fire::i, dataset::name, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), and DQMStore::IGetter::setCurrentFolder().

62  {
63 
64  if(mVerbose){cout << "[L1TTestsSummary:] Called beginRun" << endl;}
65 
66  int maxLS = 2500;
67 
68  if(mMonitorL1TRate){
69 
70  if(mVerbose){cout << "[L1TTestsSummary:] Initializing L1TRate Module Monitoring" << endl;}
71 
73  vector<string> histToMonitor = igetter.getMEs();
74  int histLines = histToMonitor.size()+1;
75 
76  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
77  mL1TRateMonitor = ibooker.book2D("RateQualitySummary","L1T Rates Monitor Summary",maxLS,+0.5,double(maxLS)+0.5,histLines,0,histLines);
78  mL1TRateMonitor->setAxisTitle("Lumi Section" ,1);
79 
80  mL1TRateMonitor->setBinLabel(1,"Summary",2);
81  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
82  string name = igetter.get(mL1TRatePath+histToMonitor[i])->getTH1()->GetName();
83  mL1TRateMonitor->setBinLabel(i+2,name,2);
84  }
85  }
86  if(mMonitorL1TSync){
87 
88  if(mVerbose){cout << "[L1TTestsSummary:] Initializing L1TSync Module Monitoring" << endl;}
89 
91  vector<string> histToMonitor = igetter.getMEs();
92  int histLines = histToMonitor.size()+1;
93 
94  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
95  mL1TSyncMonitor = ibooker.book2D("SyncQualitySummary","L1T Synchronization Monitor Summary",maxLS,0.5,double(maxLS)+0.5,histLines,0,histLines);
96  mL1TSyncMonitor->setAxisTitle("Lumi Section" ,1);
97 
98  mL1TSyncMonitor->setBinLabel(1,"Summary",2);
99  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
100  string name = igetter.get(mL1TSyncPath+histToMonitor[i])->getTH1()->GetName();
101  mL1TSyncMonitor->setBinLabel(i+2,name,2);
102  }
103 
104  }
106 
107  if(mVerbose){cout << "[L1TTestsSummary:] Initializing L1TOccupancy Module Monitoring" << endl;}
108 
110  vector<string> histToMonitor = igetter.getMEs();
111  int histLines = histToMonitor.size()+1;
112 
113  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
114  mL1TOccupancyMonitor = ibooker.book2D("OccupancySummary","L1T Occupancy Monitor Summary",maxLS,+0.5,double(maxLS)+0.5,histLines,0,histLines);
115  mL1TOccupancyMonitor->setAxisTitle("Lumi Section" ,1);
116 
117  mL1TOccupancyMonitor->setBinLabel(1,"Summary",2);
118  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
119  string name = igetter.get(mL1TOccupancyPath+histToMonitor[i])->getTH1()->GetName();
120  mL1TOccupancyMonitor->setBinLabel(i+2,name,2);
121  }
122  }
123 
124  //-> Making the summary of summaries
125  int testsToMonitor=1;
126  if(mMonitorL1TRate) {testsToMonitor++;}
127  if(mMonitorL1TSync) {testsToMonitor++;}
128  if(mMonitorL1TOccupancy){testsToMonitor++;}
129 
130  // Creating
131  ibooker.setCurrentFolder("L1T/L1TTestsSummary/");
132  mL1TSummary = ibooker.book2D("L1TQualitySummary","L1 Tests Summary",maxLS,+0.5,double(maxLS)+0.5,testsToMonitor,0,testsToMonitor);
133  mL1TSummary->setAxisTitle("Lumi Section" ,1);
134  mL1TSummary->setBinLabel(1,"L1T Summary",2);
135 
136  int it=2;
137  if(mMonitorL1TRate) {mL1TSummary->setBinLabel(it,"Rates" ,2); binYRate =it; it++;}
138  if(mMonitorL1TSync) {mL1TSummary->setBinLabel(it,"Synchronization",2); binYSync =it; it++;}
139  if(mMonitorL1TOccupancy){mL1TSummary->setBinLabel(it,"Occupancy" ,2); binYOccpancy=it;}
140 
141 }
MonitorElement * mL1TOccupancyMonitor
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
TH1 * getTH1() const
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 * mL1TSummary
MonitorElement * mL1TSyncMonitor
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:279
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
MonitorElement * mL1TRateMonitor
std::string mL1TRatePath
std::string mL1TSyncPath
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
std::string mL1TOccupancyPath
std::vector< std::string > getMEs()
Definition: DQMStore.cc:329
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 150 of file L1TTestsSummary.cc.

References gather_cfg::cout.

150  {
151 
152  book(ibooker, igetter);
153 
154  if(mVerbose){cout << "[L1TTestsSummary:] Called endRun()" << endl;}
155 
156  if(mMonitorL1TRate) {updateL1TRateMonitor(ibooker, igetter);}
157  if(mMonitorL1TSync) {updateL1TSyncMonitor(ibooker, igetter);}
158  if(mMonitorL1TOccupancy){updateL1TOccupancyMonitor(ibooker, igetter);}
159  updateL1TSummary(ibooker, igetter);
160 
161 }
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 170 of file L1TTestsSummary.cc.

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

170  {
171 
172  int eventLS = lumiSeg.id().luminosityBlock();
173 
174  book(ibooker, igetter);
175 
176  mProcessedLS.push_back(eventLS);
177 
178  if(mVerbose) {
179  cout << "[L1TTestsSummary:] Called endLuminosityBlock()" << endl;
180  cout << "[L1TTestsSummary:] Lumisection: " << eventLS << endl;
181  }
182 
183  if(mMonitorL1TRate) {updateL1TRateMonitor(ibooker, igetter);}
184  if(mMonitorL1TSync) {updateL1TSyncMonitor(ibooker, igetter);}
185  if(mMonitorL1TOccupancy){updateL1TOccupancyMonitor(ibooker, igetter);}
186  updateL1TSummary(ibooker, igetter);
187 
188 }
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 326 of file L1TTestsSummary.cc.

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

326  {
327 
329  vector<string> histToMonitor = igetter.getMEs();
330 
331  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
332 
333  MonitorElement* me = igetter.get(mL1TOccupancyPath+histToMonitor[i]);
334  if(mVerbose) {cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;}
335 
336  const QReport * myQReport = me->getQReport("L1TOccupancyTest"); //get QReport associated to your ME
337  if(myQReport) {
338  float qtresult = myQReport->getQTresult(); // get QT result value
339  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
340  const string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
341  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
342 
343  if(mVerbose) {
344  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
345  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
346  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
347  }
348 
349  for(unsigned int i=0 ; i<mProcessedLS.size() ; i++){
350  int binx = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
351  int biny = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
352  mL1TOccupancyMonitor->setBinContent(binx,biny,100);
353  }
354 
355  for(unsigned int a=0 ; a<qtBadChannels.size() ; a++){
356  for(unsigned int b=0 ; b<mProcessedLS.size() ; b++){
357 
358  // Converting bin to value
359  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
360 
361  if(valueBinBad==mProcessedLS[b]){
362  int binx = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
363  int biny = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
364  mL1TOccupancyMonitor->setBinContent(binx,biny,300);
365  }
366  }
367  }
368  }
369  }
370 
371  //-> Filling the summaries
372  int nBinX = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->GetNbins();
373  int nBinY = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->GetNbins();
374  for(int binx=1; binx<=nBinX ; binx++){
375  int GlobalStatus=0;
376  for(int biny=2; biny<=nBinY ; biny++){
377  double flag = mL1TOccupancyMonitor->getBinContent(binx,biny);
378  if(GlobalStatus<flag){GlobalStatus=flag;}
379  }
380 
381  // NOTE: Assumes mL1TSummary has same size then mL1TOccupancyMonitor
382  mL1TOccupancyMonitor->setBinContent(binx, 1,GlobalStatus);
383  mL1TSummary ->setBinContent(binx,binYOccpancy,GlobalStatus);
384  }
385 }
MonitorElement * mL1TOccupancyMonitor
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)
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:33
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
TH1 * getTH1() const
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
const std::string & getMessage() const
get message attached to test
Definition: QReport.h:24
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:512
TH2F * getTH2F() const
double b
Definition: hdecay.h:120
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:16
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
double getBinContent(int binx) const
get content of bin (1-D)
std::string mL1TOccupancyPath
double a
Definition: hdecay.h:121
float getQTresult() const
get test result i.e. prob value
Definition: QReport.h:20
std::vector< std::string > getMEs()
Definition: DQMStore.cc:329
void L1TTestsSummary::updateL1TRateMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 194 of file L1TTestsSummary.cc.

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

194  {
195 
197  vector<string> histToMonitor = igetter.getMEs();
198 
199  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
200 
201  MonitorElement* me = igetter.get(mL1TRatePath+histToMonitor[i]);
202  if(mVerbose) {cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;}
203 
204  const QReport * myQReport = me->getQReport("L1TRateTest"); //get QReport associated to your ME
205  if(myQReport) {
206  float qtresult = myQReport->getQTresult(); // get QT result value
207  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
208  const string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
209  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
210 
211  if(mVerbose) {
212  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
213  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
214  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
215  }
216 
217  for(unsigned int i=0 ; i<mProcessedLS.size()-1 ; i++){
218  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
219  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
220  mL1TRateMonitor->setBinContent(binx,biny,100);
221  }
222 
223  for(unsigned int a=0 ; a<qtBadChannels.size() ; a++){
224  for(unsigned int b=0 ; b<mProcessedLS.size()-1 ; b++){
225 
226  // Converting bin to value
227  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
228 
229  if(valueBinBad==(mProcessedLS[b])){
230  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
231  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
232  mL1TRateMonitor->setBinContent(binx,biny,300);
233  }
234  }
235  }
236  }
237  }
238 
239  //-> Filling the summaries
240  int nBinX = mL1TRateMonitor->getTH2F()->GetXaxis()->GetNbins();
241  int nBinY = mL1TRateMonitor->getTH2F()->GetYaxis()->GetNbins();
242  for(int binx=1; binx<=nBinX ; binx++){
243  int GlobalStatus=0;
244  for(int biny=2; biny<=nBinY ; biny++){
245  double flag = mL1TRateMonitor->getBinContent(binx,biny);
246  if(GlobalStatus<flag){GlobalStatus=flag;}
247  }
248 
249  // NOTE: Assumes mL1TSummary has same size then mL1TRateMonitor
250  mL1TRateMonitor->setBinContent(binx, 1,GlobalStatus);
251  mL1TSummary ->setBinContent(binx,binYRate,GlobalStatus);
252  }
253 }
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)
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:33
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
TH1 * getTH1() const
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
const std::string & getMessage() const
get message attached to test
Definition: QReport.h:24
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:512
TH2F * getTH2F() const
MonitorElement * mL1TRateMonitor
double b
Definition: hdecay.h:120
std::string mL1TRatePath
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:16
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
double getBinContent(int binx) const
get content of bin (1-D)
double a
Definition: hdecay.h:121
float getQTresult() const
get test result i.e. prob value
Definition: QReport.h:20
std::vector< std::string > getMEs()
Definition: DQMStore.cc:329
void L1TTestsSummary::updateL1TSummary ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 391 of file L1TTestsSummary.cc.

References DEFINE_FWK_MODULE, and anotherprimaryvertexanalyzer_cfi::nBinX.

391  {
392 
393  int nBinX = mL1TSummary->getTH2F()->GetXaxis()->GetNbins();
394  for(int binx=1; binx<=nBinX ; binx++){
395  int GlobalStatus=0;
396  if(mMonitorL1TRate){
397  if(mL1TSummary->getBinContent(binx,binYRate)>GlobalStatus){
398  GlobalStatus=mL1TSummary->getBinContent(binx,binYRate);
399  }
400  }
401  if(mMonitorL1TSync) {
402  if(mL1TSummary->getBinContent(binx,binYSync)>GlobalStatus){
403  GlobalStatus=mL1TSummary->getBinContent(binx,binYSync);
404  }
405  }
407  if(mL1TSummary->getBinContent(binx,binYOccpancy)>GlobalStatus){
408  GlobalStatus=mL1TSummary->getBinContent(binx,binYOccpancy);
409  }
410  }
411  mL1TSummary->setBinContent(binx,1,GlobalStatus);
412  }
413 }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * mL1TSummary
TH2F * getTH2F() const
double getBinContent(int binx) const
get content of bin (1-D)
void L1TTestsSummary::updateL1TSyncMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 261 of file L1TTestsSummary.cc.

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

261  {
262 
264  vector<string> histToMonitor = igetter.getMEs();
265 
266  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
267 
268  MonitorElement* me = igetter.get(mL1TSyncPath+histToMonitor[i]);
269  if(mVerbose) {cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;}
270 
271  const QReport * myQReport = me->getQReport("L1TSyncTest"); //get QReport associated to your ME
272  if(myQReport) {
273  float qtresult = myQReport->getQTresult(); // get QT result value
274  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
275  const string& qtmessage = myQReport->getMessage() ; // get the whole QT result message
276  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
277 
278  if(mVerbose) {
279  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
280  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
281  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
282  }
283 
284  for(unsigned int i=0 ; i<mProcessedLS.size() ; i++){
285  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
286  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
287  mL1TSyncMonitor->setBinContent(binx,biny,100);
288  }
289 
290  for(unsigned int a=0 ; a<qtBadChannels.size() ; a++){
291  for(unsigned int b=0 ; b<mProcessedLS.size() ; b++){
292 
293  // Converting bin to value
294  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
295 
296  if(valueBinBad==mProcessedLS[b]){
297  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
298  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
299  mL1TSyncMonitor->setBinContent(binx,biny,300);
300  }
301  }
302  }
303  }
304  }
305 
306  //-> Filling the summaries
307  int nBinX = mL1TSyncMonitor->getTH2F()->GetXaxis()->GetNbins();
308  int nBinY = mL1TSyncMonitor->getTH2F()->GetYaxis()->GetNbins();
309  for(int binx=1; binx<=nBinX ; binx++){
310  int GlobalStatus=0;
311  for(int biny=2; biny<=nBinY ; biny++){
312  double flag = mL1TSyncMonitor->getBinContent(binx,biny);
313  if(GlobalStatus<flag){GlobalStatus=flag;}
314  }
315 
316  // NOTE: Assumes mL1TSummary has same size then mL1TSyncMonitor
317  mL1TSyncMonitor->setBinContent(binx, 1,GlobalStatus);
318  mL1TSummary ->setBinContent(binx,binYSync,GlobalStatus);
319  }
320 }
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)
const std::vector< DQMChannel > & getBadChannels() const
Definition: QReport.h:33
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:307
TH1 * getTH1() const
std::vector< int > mProcessedLS
MonitorElement * mL1TSummary
MonitorElement * mL1TSyncMonitor
const std::string & getMessage() const
get message attached to test
Definition: QReport.h:24
int getBin(double x, std::vector< double > boundaries)
Definition: Utilities.h:512
TH2F * getTH2F() const
double b
Definition: hdecay.h:120
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:16
std::string mL1TSyncPath
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:349
double getBinContent(int binx) const
get content of bin (1-D)
double a
Definition: hdecay.h:121
float getQTresult() const
get test result i.e. prob value
Definition: QReport.h:20
std::vector< std::string > getMEs()
Definition: DQMStore.cc:329

Member Data Documentation

int L1TTestsSummary::binYOccpancy
private

Definition at line 55 of file L1TTestsSummary.h.

int L1TTestsSummary::binYRate
private

Definition at line 55 of file L1TTestsSummary.h.

int L1TTestsSummary::binYSync
private

Definition at line 55 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TOccupancyMonitor
private

Definition at line 68 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TOccupancyPath
private

Definition at line 60 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TRateMonitor
private

Definition at line 66 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TRatePath
private

Definition at line 58 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TSummary
private

Definition at line 69 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TSyncMonitor
private

Definition at line 67 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TSyncPath
private

Definition at line 59 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TOccupancy
private

Definition at line 52 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TRate
private

Definition at line 50 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TSync
private

Definition at line 51 of file L1TTestsSummary.h.

edm::ParameterSet L1TTestsSummary::mParameters
private

Definition at line 46 of file L1TTestsSummary.h.

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

Definition at line 63 of file L1TTestsSummary.h.

bool L1TTestsSummary::mVerbose
private

Definition at line 49 of file L1TTestsSummary.h.