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:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TTestsSummary (const edm::ParameterSet &ps)
 
virtual ~L1TTestsSummary ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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 (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob (void)
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void endJob ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &r, 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 ()
 
void updateL1TRateMonitor ()
 
void updateL1TSummary ()
 
void updateL1TSyncMonitor ()
 

Private Attributes

int binYOccpancy
 
int binYRate
 
int binYSync
 
DQMStoremDBE
 
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::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 26 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(), reco::mVerbose(), and cppFunctionSkipper::operator.

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 
47  // Get back-end interface
49 
50 }
T getUntrackedParameter(std::string const &, T const &) const
std::string mL1TRatePath
std::string mL1TSyncPath
std::string mL1TOccupancyPath
tuple cout
Definition: gather_cfg.py:121
edm::ParameterSet mParameters
L1TTestsSummary::~L1TTestsSummary ( )
virtual

Definition at line 56 of file L1TTestsSummary.cc.

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

56  {
57  if(mVerbose){cout << "[L1TTestsSummary:] Called destructor" << endl;}
58 }
tuple cout
Definition: gather_cfg.py:121

Member Function Documentation

void L1TTestsSummary::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 234 of file L1TTestsSummary.cc.

234 {}
void L1TTestsSummary::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 64 of file L1TTestsSummary.cc.

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

64  {
65 
66  if(mVerbose){cout << "[L1TTestsSummary:] Called BeginJob" << endl;}
67 
68  // get backend interface
70 
71  if (mDBE) {
72  mDBE->setCurrentFolder("L1T/L1TOccupancy");
73  mDBE->rmdir("L1T/L1TOccupancy");
74  }
75 }
tuple cout
Definition: gather_cfg.py:121
void L1TTestsSummary::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 198 of file L1TTestsSummary.cc.

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

198  {
199  if(mVerbose){cout << "[L1TTestsSummary:] Called beginLuminosityBlock()" << endl;}
200 }
tuple cout
Definition: gather_cfg.py:121
void L1TTestsSummary::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 92 of file L1TTestsSummary.cc.

References gather_cfg::cout, i, reco::mVerbose(), and mergeVDriftHistosByStation::name.

92  {
93 
94  if(mVerbose){cout << "[L1TTestsSummary:] Called beginRun" << endl;}
95 
96  int maxLS = 2500;
97 
98  if(mMonitorL1TRate){
99 
100  if(mVerbose){cout << "[L1TTestsSummary:] Initializing L1TRate Module Monitoring" << endl;}
101 
102  mDBE->setCurrentFolder(mL1TRatePath);
103  vector<string> histToMonitor = mDBE->getMEs();
104  int histLines = histToMonitor.size()+1;
105 
106  mDBE->setCurrentFolder("L1T/L1TTestsSummary/");
107  mL1TRateMonitor = mDBE->book2D("RateQualitySummary","L1T Rates Monitor Summary",maxLS,+0.5,double(maxLS)+0.5,histLines,0,histLines);
108  mL1TRateMonitor->setAxisTitle("Lumi Section" ,1);
109 
110  mL1TRateMonitor->setBinLabel(1,"Summary",2);
111  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
112  string name = mDBE->get(mL1TRatePath+histToMonitor[i])->getTH1()->GetName();
113  mL1TRateMonitor->setBinLabel(i+2,name,2);
114  }
115  }
116  if(mMonitorL1TSync){
117 
118  if(mVerbose){cout << "[L1TTestsSummary:] Initializing L1TSync Module Monitoring" << endl;}
119 
120  mDBE->setCurrentFolder(mL1TSyncPath);
121  vector<string> histToMonitor = mDBE->getMEs();
122  int histLines = histToMonitor.size()+1;
123 
124  mDBE->setCurrentFolder("L1T/L1TTestsSummary/");
125  mL1TSyncMonitor = mDBE->book2D("SyncQualitySummary","L1T Synchronization Monitor Summary",maxLS,0.5,double(maxLS)+0.5,histLines,0,histLines);
126  mL1TSyncMonitor->setAxisTitle("Lumi Section" ,1);
127 
128  mL1TSyncMonitor->setBinLabel(1,"Summary",2);
129  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
130  string name = mDBE->get(mL1TSyncPath+histToMonitor[i])->getTH1()->GetName();
131  mL1TSyncMonitor->setBinLabel(i+2,name,2);
132  }
133 
134  }
136 
137  if(mVerbose){cout << "[L1TTestsSummary:] Initializing L1TOccupancy Module Monitoring" << endl;}
138 
139  mDBE->setCurrentFolder(mL1TOccupancyPath);
140  vector<string> histToMonitor = mDBE->getMEs();
141  int histLines = histToMonitor.size()+1;
142 
143  mDBE->setCurrentFolder("L1T/L1TTestsSummary/");
144  mL1TOccupancyMonitor = mDBE->book2D("OccupancySummary","L1T Occupancy Monitor Summary",maxLS,+0.5,double(maxLS)+0.5,histLines,0,histLines);
145  mL1TOccupancyMonitor->setAxisTitle("Lumi Section" ,1);
146 
147  mL1TOccupancyMonitor->setBinLabel(1,"Summary",2);
148  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
149  string name = mDBE->get(mL1TOccupancyPath+histToMonitor[i])->getTH1()->GetName();
150  mL1TOccupancyMonitor->setBinLabel(i+2,name,2);
151  }
152  }
153 
154  //-> Making the summary of summaries
155  int testsToMonitor=1;
156  if(mMonitorL1TRate) {testsToMonitor++;}
157  if(mMonitorL1TSync) {testsToMonitor++;}
158  if(mMonitorL1TOccupancy){testsToMonitor++;}
159 
160  // Creating
161  mDBE->setCurrentFolder("L1T/L1TTestsSummary/");
162  mL1TSummary = mDBE->book2D("L1TQualitySummary","L1 Tests Summary",maxLS,+0.5,double(maxLS)+0.5,testsToMonitor,0,testsToMonitor);
163  mL1TSummary->setAxisTitle("Lumi Section" ,1);
164  mL1TSummary->setBinLabel(1,"L1T Summary",2);
165 
166  int it=2;
167  if(mMonitorL1TRate) {mL1TSummary->setBinLabel(it,"Rates" ,2); binYRate =it; it++;}
168  if(mMonitorL1TSync) {mL1TSummary->setBinLabel(it,"Synchronization",2); binYSync =it; it++;}
169  if(mMonitorL1TOccupancy){mL1TSummary->setBinLabel(it,"Occupancy" ,2); binYOccpancy=it;}
170 
171 }
MonitorElement * mL1TOccupancyMonitor
int i
Definition: DBlmapReader.cc:9
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
MonitorElement * mL1TRateMonitor
std::string mL1TRatePath
std::string mL1TSyncPath
std::string mL1TOccupancyPath
tuple cout
Definition: gather_cfg.py:121
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TTestsSummary::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 81 of file L1TTestsSummary.cc.

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

81  {
82  if(mVerbose){cout << "[L1TTestsSummary:] Called endJob" << endl;}
83 }
tuple cout
Definition: gather_cfg.py:121
void L1TTestsSummary::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 209 of file L1TTestsSummary.cc.

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

209  {
210 
211  int eventLS = lumiSeg.id().luminosityBlock();
212 
213  mProcessedLS.push_back(eventLS);
214 
215  if(mVerbose) {
216  cout << "[L1TTestsSummary:] Called endLuminosityBlock()" << endl;
217  cout << "[L1TTestsSummary:] Lumisection: " << eventLS << endl;
218  }
219 
224 
225 }
LuminosityBlockID id() const
std::vector< int > mProcessedLS
LuminosityBlockNumber_t luminosityBlock() const
void updateL1TOccupancyMonitor()
tuple cout
Definition: gather_cfg.py:121
void L1TTestsSummary::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 180 of file L1TTestsSummary.cc.

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

180  {
181 
182  if(mVerbose){cout << "[L1TTestsSummary:] Called endRun()" << endl;}
183 
188 
189 }
void updateL1TOccupancyMonitor()
tuple cout
Definition: gather_cfg.py:121
void L1TTestsSummary::updateL1TOccupancyMonitor ( )
private

Definition at line 372 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, archive::flag, QReport::getBadChannels(), getBin(), QReport::getMessage(), MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), MonitorElement::getTH1(), i, and reco::mVerbose().

372  {
373 
374  mDBE->setCurrentFolder(mL1TOccupancyPath);
375  vector<string> histToMonitor = mDBE->getMEs();
376 
377  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
378 
379  MonitorElement* me = mDBE->get(mL1TOccupancyPath+histToMonitor[i]);
380  if(mVerbose) {cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;}
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  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 
404  // Converting bin to value
405  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
406 
407  if(valueBinBad==mProcessedLS[b]){
408  int binx = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
409  int biny = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
410  mL1TOccupancyMonitor->setBinContent(binx,biny,300);
411  }
412  }
413  }
414  }
415  }
416 
417  //-> Filling the summaries
418  int nBinX = mL1TOccupancyMonitor->getTH2F()->GetXaxis()->GetNbins();
419  int nBinY = mL1TOccupancyMonitor->getTH2F()->GetYaxis()->GetNbins();
420  for(int binx=1; binx<=nBinX ; binx++){
421  int GlobalStatus=0;
422  for(int biny=2; biny<=nBinY ; biny++){
423  double flag = mL1TOccupancyMonitor->getBinContent(binx,biny);
424  if(GlobalStatus<flag){GlobalStatus=flag;}
425  }
426 
427  // NOTE: Assumes mL1TSummary has same size then mL1TOccupancyMonitor
428  mL1TOccupancyMonitor->setBinContent(binx, 1,GlobalStatus);
429  mL1TSummary ->setBinContent(binx,binYOccpancy,GlobalStatus);
430  }
431 }
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)
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
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
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:121
TH2F * getTH2F(void) const
void L1TTestsSummary::updateL1TRateMonitor ( )
private

Definition at line 240 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, archive::flag, QReport::getBadChannels(), getBin(), QReport::getMessage(), MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), MonitorElement::getTH1(), i, and reco::mVerbose().

240  {
241 
242  mDBE->setCurrentFolder(mL1TRatePath);
243  vector<string> histToMonitor = mDBE->getMEs();
244 
245  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
246 
247  MonitorElement* me = mDBE->get(mL1TRatePath+histToMonitor[i]);
248  if(mVerbose) {cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;}
249 
250  const QReport * myQReport = me->getQReport("L1TRateTest"); //get QReport associated to your ME
251  if(myQReport) {
252  float qtresult = myQReport->getQTresult(); // get QT result value
253  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
254  string qtmessage = myQReport->getMessage() ; // get the whole QT result message
255  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
256 
257  if(mVerbose) {
258  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
259  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
260  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
261  }
262 
263  for(unsigned int i=0 ; i<mProcessedLS.size()-1 ; i++){
264  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
265  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
266  mL1TRateMonitor->setBinContent(binx,biny,100);
267  }
268 
269  for(unsigned int a=0 ; a<qtBadChannels.size() ; a++){
270  for(unsigned int b=0 ; b<mProcessedLS.size()-1 ; b++){
271 
272  // Converting bin to value
273  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
274 
275  if(valueBinBad==(mProcessedLS[b])){
276  int binx = mL1TRateMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
277  int biny = mL1TRateMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
278  mL1TRateMonitor->setBinContent(binx,biny,300);
279  }
280  }
281  }
282  }
283  }
284 
285  //-> Filling the summaries
286  int nBinX = mL1TRateMonitor->getTH2F()->GetXaxis()->GetNbins();
287  int nBinY = mL1TRateMonitor->getTH2F()->GetYaxis()->GetNbins();
288  for(int binx=1; binx<=nBinX ; binx++){
289  int GlobalStatus=0;
290  for(int biny=2; biny<=nBinY ; biny++){
291  double flag = mL1TRateMonitor->getBinContent(binx,biny);
292  if(GlobalStatus<flag){GlobalStatus=flag;}
293  }
294 
295  // NOTE: Assumes mL1TSummary has same size then mL1TRateMonitor
296  mL1TRateMonitor->setBinContent(binx, 1,GlobalStatus);
297  mL1TSummary ->setBinContent(binx,binYRate,GlobalStatus);
298  }
299 }
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)
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
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
double getBinContent(int binx) const
get content of bin (1-D)
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
void L1TTestsSummary::updateL1TSummary ( )
private

Definition at line 437 of file L1TTestsSummary.cc.

437  {
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  }
453  if(mL1TSummary->getBinContent(binx,binYOccpancy)>GlobalStatus){
454  GlobalStatus=mL1TSummary->getBinContent(binx,binYOccpancy);
455  }
456  }
457  mL1TSummary->setBinContent(binx,1,GlobalStatus);
458  }
459 }
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 ( )
private

Definition at line 307 of file L1TTestsSummary.cc.

References a, b, gather_cfg::cout, archive::flag, QReport::getBadChannels(), getBin(), QReport::getMessage(), MonitorElement::getQReport(), QReport::getQTresult(), QReport::getStatus(), MonitorElement::getTH1(), i, and reco::mVerbose().

307  {
308 
309  mDBE->setCurrentFolder(mL1TSyncPath);
310  vector<string> histToMonitor = mDBE->getMEs();
311 
312  for(unsigned int i=0 ; i<histToMonitor.size() ; i++){
313 
314  MonitorElement* me = mDBE->get(mL1TSyncPath+histToMonitor[i]);
315  if(mVerbose) {cout << "[L1TTestsSummary:] Found ME: " << me->getTH1()->GetName() << endl;}
316 
317  const QReport * myQReport = me->getQReport("L1TSyncTest"); //get QReport associated to your ME
318  if(myQReport) {
319  float qtresult = myQReport->getQTresult(); // get QT result value
320  int qtstatus = myQReport->getStatus(); // get QT status value (see table below)
321  string qtmessage = myQReport->getMessage() ; // get the whole QT result message
322  vector<DQMChannel> qtBadChannels = myQReport->getBadChannels();
323 
324  if(mVerbose) {
325  cout << "[L1TTestsSummary:] Found QReport for ME: " << me->getTH1()->GetName() << endl;
326  cout << "[L1TTestsSummary:] Result=" << qtresult << " status=" << qtstatus << " message=" << qtmessage << endl;
327  cout << "[L1TTestsSummary:] Bad Channels size=" << qtBadChannels.size() << endl;
328  }
329 
330  for(unsigned int i=0 ; i<mProcessedLS.size() ; i++){
331  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(mProcessedLS[i]);
332  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
333  mL1TSyncMonitor->setBinContent(binx,biny,100);
334  }
335 
336  for(unsigned int a=0 ; a<qtBadChannels.size() ; a++){
337  for(unsigned int b=0 ; b<mProcessedLS.size() ; b++){
338 
339  // Converting bin to value
340  double valueBinBad = me->getTH1()->GetBinCenter(qtBadChannels[a].getBin());
341 
342  if(valueBinBad==mProcessedLS[b]){
343  int binx = mL1TSyncMonitor->getTH2F()->GetXaxis()->FindBin(valueBinBad);
344  int biny = mL1TSyncMonitor->getTH2F()->GetYaxis()->FindBin(me->getTH1()->GetName());
345  mL1TSyncMonitor->setBinContent(binx,biny,300);
346  }
347  }
348  }
349  }
350  }
351 
352  //-> Filling the summaries
353  int nBinX = mL1TSyncMonitor->getTH2F()->GetXaxis()->GetNbins();
354  int nBinY = mL1TSyncMonitor->getTH2F()->GetYaxis()->GetNbins();
355  for(int binx=1; binx<=nBinX ; binx++){
356  int GlobalStatus=0;
357  for(int biny=2; biny<=nBinY ; biny++){
358  double flag = mL1TSyncMonitor->getBinContent(binx,biny);
359  if(GlobalStatus<flag){GlobalStatus=flag;}
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 }
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)
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
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
double getBinContent(int binx) const
get content of bin (1-D)
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const

Member Data Documentation

int L1TTestsSummary::binYOccpancy
private

Definition at line 64 of file L1TTestsSummary.h.

int L1TTestsSummary::binYRate
private

Definition at line 64 of file L1TTestsSummary.h.

int L1TTestsSummary::binYSync
private

Definition at line 64 of file L1TTestsSummary.h.

DQMStore* L1TTestsSummary::mDBE
private

Definition at line 54 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TOccupancyMonitor
private

Definition at line 77 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TOccupancyPath
private

Definition at line 69 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TRateMonitor
private

Definition at line 75 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TRatePath
private

Definition at line 67 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TSummary
private

Definition at line 78 of file L1TTestsSummary.h.

MonitorElement* L1TTestsSummary::mL1TSyncMonitor
private

Definition at line 76 of file L1TTestsSummary.h.

std::string L1TTestsSummary::mL1TSyncPath
private

Definition at line 68 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TOccupancy
private

Definition at line 61 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TRate
private

Definition at line 59 of file L1TTestsSummary.h.

bool L1TTestsSummary::mMonitorL1TSync
private

Definition at line 60 of file L1TTestsSummary.h.

edm::ParameterSet L1TTestsSummary::mParameters
private

Definition at line 55 of file L1TTestsSummary.h.

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

Definition at line 72 of file L1TTestsSummary.h.

bool L1TTestsSummary::mVerbose
private

Definition at line 58 of file L1TTestsSummary.h.