CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TTestsSummary (const edm::ParameterSet &ps)
 
virtual ~L1TTestsSummary ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

virtual void book (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
 
virtual void dqmEndJob (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter, const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
- 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::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 27 of file L1TTestsSummary.h.

Constructor & Destructor Documentation

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

Definition at line 32 of file L1TTestsSummary.cc.

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

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

Definition at line 52 of file L1TTestsSummary.cc.

References gather_cfg::cout, and reco::mVerbose().

52  {
53  if(mVerbose){cout << "[L1TTestsSummary:] Called destructor" << endl;}
54 }
tuple cout
Definition: gather_cfg.py:145

Member Function Documentation

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

Definition at line 63 of file L1TTestsSummary.cc.

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

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

References gather_cfg::cout, and reco::mVerbose().

151  {
152 
153  book(ibooker, igetter);
154 
155  if(mVerbose){cout << "[L1TTestsSummary:] Called endRun()" << endl;}
156 
157  if(mMonitorL1TRate) {updateL1TRateMonitor(ibooker, igetter);}
158  if(mMonitorL1TSync) {updateL1TSyncMonitor(ibooker, igetter);}
159  if(mMonitorL1TOccupancy){updateL1TOccupancyMonitor(ibooker, igetter);}
160  updateL1TSummary(ibooker, igetter);
161 
162 }
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)
tuple cout
Definition: gather_cfg.py:145
void L1TTestsSummary::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from DQMEDHarvester.

Definition at line 171 of file L1TTestsSummary.cc.

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

171  {
172 
173  int eventLS = lumiSeg.id().luminosityBlock();
174 
175  book(ibooker, igetter);
176 
177  mProcessedLS.push_back(eventLS);
178 
179  if(mVerbose) {
180  cout << "[L1TTestsSummary:] Called endLuminosityBlock()" << endl;
181  cout << "[L1TTestsSummary:] Lumisection: " << eventLS << endl;
182  }
183 
184  if(mMonitorL1TRate) {updateL1TRateMonitor(ibooker, igetter);}
185  if(mMonitorL1TSync) {updateL1TSyncMonitor(ibooker, igetter);}
186  if(mMonitorL1TOccupancy){updateL1TOccupancyMonitor(ibooker, igetter);}
187  updateL1TSummary(ibooker, igetter);
188 
189 }
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
tuple cout
Definition: gather_cfg.py:145
void L1TTestsSummary::updateL1TOccupancyMonitor ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
private

Definition at line 327 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, DQMStore::IGetter::get(), QReport::getBadChannels(), getBin(), DQMStore::IGetter::getMEs(), QReport::getMessage(), MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), MonitorElement::getTH1(), i, hlt_dqm_clientPB-live_cfg::me, reco::mVerbose(), and DQMStore::IGetter::setCurrentFolder().

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

Definition at line 195 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, DQMStore::IGetter::get(), QReport::getBadChannels(), getBin(), DQMStore::IGetter::getMEs(), QReport::getMessage(), MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), MonitorElement::getTH1(), i, hlt_dqm_clientPB-live_cfg::me, reco::mVerbose(), and DQMStore::IGetter::setCurrentFolder().

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

Definition at line 392 of file L1TTestsSummary.cc.

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

Definition at line 262 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, DQMStore::IGetter::get(), QReport::getBadChannels(), getBin(), DQMStore::IGetter::getMEs(), QReport::getMessage(), MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), MonitorElement::getTH1(), i, hlt_dqm_clientPB-live_cfg::me, reco::mVerbose(), and DQMStore::IGetter::setCurrentFolder().

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

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.