CMS 3D CMS Logo

HLTEventInfoClient Class Reference

#include <DQM/HLTEvF/interface/HLTEventInfoClient.h>

Inheritance diagram for HLTEventInfoClient:

edm::EDAnalyzer edm::EDAnalyzer

List of all members.

Public Member Functions

 HLTEventInfoClient (const edm::ParameterSet &ps)
 Constructor.
 HLTEventInfoClient (const edm::ParameterSet &ps)
 Constructor.
virtual ~HLTEventInfoClient ()
 Destructor.
virtual ~HLTEventInfoClient ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze.
void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake Analyze.
void beginJob (const edm::EventSetup &c)
 BeginJob.
void beginJob (const edm::EventSetup &c)
 BeginJob.
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void endJob ()
 Endjob.
void endJob ()
 Endjob.
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic.
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 DQM Client Diagnostic.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.

Private Member Functions

TH1F * get1DHisto (string meName, DQMStore *dbi)
TH1F * get1DHisto (string meName, DQMStore *dbi)
TProfile * get1DProfile (string meName, DQMStore *dbi)
TProfile * get1DProfile (string meName, DQMStore *dbi)
TH2F * get2DHisto (string meName, DQMStore *dbi)
TH2F * get2DHisto (string meName, DQMStore *dbi)
TProfile2D * get2DProfile (string meName, DQMStore *dbi)
TProfile2D * get2DProfile (string meName, DQMStore *dbi)
void initialize ()
void initialize ()

Private Attributes

int counterEvt_
 counter
int counterLS_
DQMStoredbe_
DQMStoredbe_
std::string monitorDir_
int nChannels
 prescale on number of events
edm::ParameterSet parameters_
int prescaleEvt_
 units of lumi sections
int prescaleLS_
 counter
Float_t reportSummary
MonitorElementreportSummary_
MonitorElementreportSummary_
MonitorElementreportSummaryContent_ [20]
MonitorElementreportSummaryContent_ [20]
MonitorElementreportSummaryMap_
MonitorElementreportSummaryMap_
Float_t summaryContent [20]
Float_t summarySum
bool verbose_


Detailed Description

Definition at line 23 of file HLTEventInfoClient.h.


Constructor & Destructor Documentation

HLTEventInfoClient::HLTEventInfoClient ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 30 of file HLTEventInfoClient.cc.

References initialize(), and parameters_.

00031 {
00032   parameters_=ps;
00033   initialize();
00034 }

HLTEventInfoClient::~HLTEventInfoClient (  )  [virtual]

Destructor.

Definition at line 36 of file HLTEventInfoClient.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), and verbose_.

00036                                        {
00037  if(verbose_) cout <<"[TriggerDQM]: ending... " << endl;
00038 }

HLTEventInfoClient::HLTEventInfoClient ( const edm::ParameterSet ps  ) 

Constructor.

virtual HLTEventInfoClient::~HLTEventInfoClient (  )  [virtual]

Destructor.


Member Function Documentation

void HLTEventInfoClient::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Fake Analyze.

Implements edm::EDAnalyzer.

void HLTEventInfoClient::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 209 of file HLTEventInfoClient.cc.

References counterEvt_, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), prescaleEvt_, and verbose_.

00209                                                                          {
00210    
00211    counterEvt_++;
00212    if (prescaleEvt_<1) return;
00213    if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return;
00214 
00215    if(verbose_) cout << "HLTEventInfoClient::analyze" << endl;
00216 
00217 
00218 }

void HLTEventInfoClient::beginJob ( const edm::EventSetup c  )  [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

void HLTEventInfoClient::beginJob ( const edm::EventSetup c  )  [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file HLTEventInfoClient.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), GenMuonPlsPt100GeV_cfg::cout, dbe_, lat::endl(), MonitorElement::Fill(), DQMStore::get(), MonitorElement::getName(), histo, k, n, DQMStore::removeElement(), reportSummary_, reportSummaryContent_, reportSummaryMap_, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), summaryContent, and verbose_.

00066                                                           {
00067 
00068   if(verbose_) cout <<"[TriggerDQM]: Begin Job" << endl;
00069   // get backendinterface  
00070   dbe_ = Service<DQMStore>().operator->();
00071 
00072   dbe_->setCurrentFolder("HLT/EventInfo");
00073 
00074 //  sprintf(histo, "reportSummary");
00075   if ( reportSummary_ = dbe_->get("HLT/EventInfo/reportSumamry") ) {
00076       dbe_->removeElement(reportSummary_->getName()); 
00077    }
00078   
00079   reportSummary_ = dbe_->bookFloat("reportSummary");
00080 
00081   int nSubsystems = 20;
00082 
00083  //initialize reportSummary to 1
00084   if (reportSummary_) reportSummary_->Fill(1);
00085 
00086   dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
00087 
00088   
00089   char histo[100];
00090   
00091   for (int n = 0; n < nSubsystems; n++) {    
00092 
00093   switch(n){
00094   case 0 :   sprintf(histo,"hlt_dqm_EGamma");   break;
00095   case 1 :   sprintf(histo,"hlt_dqm_Muon");     break;
00096   case 2 :   sprintf(histo,"hlt_dqm_JetMet");   break;
00097   case 3 :   sprintf(histo,"hlt_dqm_BJets");    break;
00098   case 4 :   sprintf(histo,"hlt_dqm_Tau");      break;
00099   case 5 :   sprintf(histo,"hlt_dqm_Test1");    break;
00100   case 6 :   sprintf(histo,"hlt_dqm_Test2");    break;
00101   case 7 :   sprintf(histo,"hlt_dqm_Test3");    break;
00102   case 8 :   sprintf(histo,"hlt_dqm_Test4");    break;
00103   case 9 :   sprintf(histo,"hlt_dqm_Test5");    break;
00104   case 10 :  sprintf(histo,"hlt_dqm_Test6");    break;
00105   case 11 :  sprintf(histo,"hlt_dqm_Test7");    break;
00106   case 12 :  sprintf(histo,"hlt_dqm_Test8");    break;
00107   case 13 :  sprintf(histo,"hlt_dqm_Test9");    break;
00108   case 14 :  sprintf(histo,"hlt_dqm_Test10");   break;
00109   case 15 :  sprintf(histo,"hlt_dqm_Test11");   break;
00110   case 16 :  sprintf(histo,"hlt_dqm_Test12");   break;
00111   case 17 :  sprintf(histo,"hlt_dqm_Test13");   break;
00112   case 18 :  sprintf(histo,"hlt_dqm_Test14");   break;
00113   case 19 :  sprintf(histo,"hlt_dqm_Test15");   break;
00114   }
00115   
00116 
00117 
00118 
00119 
00120 
00121 
00122 
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 
00134 
00135 
00136 
00137   
00138 //  if( reportSummaryContent_[i] = dbe_->get("HLT/EventInfo/reportSummaryContents/" + histo) ) 
00139 //  {
00140 //       dbe_->removeElement(reportSummaryContent_[i]->getName());
00141 //   }
00142   
00143    reportSummaryContent_[n] = dbe_->bookFloat(histo);
00144   }
00145 
00146   //initialize reportSummaryContents to 1
00147   for (int k = 0; k < nSubsystems; k++) {
00148     summaryContent[k] = 1;
00149     reportSummaryContent_[k]->Fill(1.);
00150   }  
00151 
00152 
00153   dbe_->setCurrentFolder("HLT/EventInfo");
00154 
00155   if ( reportSummaryMap_ = dbe_->get("HLT/EventInfo/reportSummaryMap") ) {
00156   dbe_->removeElement(reportSummaryMap_->getName());
00157   }
00158 
00159 
00160   reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 5, 1, 6);
00161   reportSummaryMap_->setAxisTitle("", 1);
00162   reportSummaryMap_->setAxisTitle("", 2);
00163   reportSummaryMap_->setBinLabel(1,"EGAMMA",2);
00164   reportSummaryMap_->setBinLabel(2,"MUON",2);
00165   reportSummaryMap_->setBinLabel(3,"JETMET",2);
00166   reportSummaryMap_->setBinLabel(4,"BJETS",2);
00167   reportSummaryMap_->setBinLabel(5,"TAU",2);
00168   reportSummaryMap_->setBinLabel(1," ",1);
00169 
00170 }

void HLTEventInfoClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

void HLTEventInfoClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 177 of file HLTEventInfoClient.cc.

00177                                                                                                        {
00178    // optionally reset histograms here
00179 }

void HLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

void HLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 173 of file HLTEventInfoClient.cc.

00173                                                                          {
00174 }

void HLTEventInfoClient::endJob (  )  [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

void HLTEventInfoClient::endJob ( void   )  [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 225 of file HLTEventInfoClient.cc.

00225                                {
00226 }

void HLTEventInfoClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [protected, virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

void HLTEventInfoClient::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [protected, virtual]

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 181 of file HLTEventInfoClient.cc.

References MonitorElement::Fill(), k, m, reportSummary, reportSummary_, reportSummaryContent_, reportSummaryMap_, MonitorElement::setBinContent(), summaryContent, and summarySum.

00182                                                  {
00183 
00184   int nSubsystems = 20;
00185   for (int k = 0; k < nSubsystems; k++) {
00186     summaryContent[k] = 1;
00187     reportSummaryContent_[k]->Fill(1.);
00188   }
00189   summarySum = 0;
00190 
00191   for (int m = 0; m < nSubsystems; m++) {    
00192     summarySum += summaryContent[m];
00193   }
00194 
00195 
00196   reportSummary = summarySum / nSubsystems;;
00197   if (reportSummary_) reportSummary_->Fill(reportSummary);
00198 
00199 
00200   reportSummaryMap_->setBinContent(1,1,summaryContent[0]);//Egamma
00201   reportSummaryMap_->setBinContent(1,2,summaryContent[1]);//Muon
00202   reportSummaryMap_->setBinContent(1,3,summaryContent[2]);//JetMet
00203   reportSummaryMap_->setBinContent(1,4,summaryContent[3]);//BJets
00204   reportSummaryMap_->setBinContent(1,5,summaryContent[4]);//Taus
00205 
00206 }

void HLTEventInfoClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

void HLTEventInfoClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 221 of file HLTEventInfoClient.cc.

00221                                                                       {
00222 }

TH1F* HLTEventInfoClient::get1DHisto ( string  meName,
DQMStore dbi 
) [private]

TH1F * HLTEventInfoClient::get1DHisto ( string  meName,
DQMStore dbi 
) [private]

Definition at line 230 of file HLTEventInfoClient.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DQMStore::get(), MonitorElement::getTH1F(), NULL, and verbose_.

00231 {
00232 
00233   MonitorElement * me_ = dbi->get(meName);
00234 
00235   if (!me_) { 
00236     if(verbose_) cout << "ME NOT FOUND." << endl;
00237     return NULL;
00238   }
00239 
00240   return me_->getTH1F();
00241 }

TProfile* HLTEventInfoClient::get1DProfile ( string  meName,
DQMStore dbi 
) [private]

TProfile * HLTEventInfoClient::get1DProfile ( string  meName,
DQMStore dbi 
) [private]

Definition at line 274 of file HLTEventInfoClient.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DQMStore::get(), MonitorElement::getTProfile(), NULL, and verbose_.

00275 {
00276 
00277 
00278   MonitorElement * me_ = dbi->get(meName);
00279 
00280   if (!me_) { 
00281     if(verbose_) cout << "ME NOT FOUND." << endl;
00282     return NULL;
00283   }
00284 
00285   return me_->getTProfile();
00286 }

TH2F* HLTEventInfoClient::get2DHisto ( string  meName,
DQMStore dbi 
) [private]

TH2F * HLTEventInfoClient::get2DHisto ( string  meName,
DQMStore dbi 
) [private]

Definition at line 243 of file HLTEventInfoClient.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DQMStore::get(), MonitorElement::getTH2F(), NULL, and verbose_.

00244 {
00245 
00246 
00247   MonitorElement * me_ = dbi->get(meName);
00248 
00249   if (!me_) { 
00250     if(verbose_) cout << "ME NOT FOUND." << endl;
00251     return NULL;
00252   }
00253 
00254   return me_->getTH2F();
00255 }

TProfile2D* HLTEventInfoClient::get2DProfile ( string  meName,
DQMStore dbi 
) [private]

TProfile2D * HLTEventInfoClient::get2DProfile ( string  meName,
DQMStore dbi 
) [private]

Definition at line 259 of file HLTEventInfoClient.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), DQMStore::get(), MonitorElement::getTProfile2D(), NULL, and verbose_.

00260 {
00261 
00262 
00263   MonitorElement * me_ = dbi->get(meName);
00264 
00265   if (!me_) { 
00266      if(verbose_) cout << "ME NOT FOUND." << endl;
00267    return NULL;
00268   }
00269 
00270   return me_->getTProfile2D();
00271 }

void HLTEventInfoClient::initialize (  )  [private]

void HLTEventInfoClient::initialize (  )  [private]

Definition at line 41 of file HLTEventInfoClient.cc.

References counterEvt_, counterLS_, GenMuonPlsPt100GeV_cfg::cout, dbe_, lat::endl(), edm::ParameterSet::getUntrackedParameter(), monitorDir_, parameters_, prescaleEvt_, prescaleLS_, and verbose_.

Referenced by HLTEventInfoClient().

00041                                    { 
00042 
00043   counterLS_=0; 
00044   counterEvt_=0; 
00045   
00046   // get back-end interface
00047   dbe_ = Service<DQMStore>().operator->();
00048   
00049   // base folder for the contents of this job
00050   verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
00051   
00052   monitorDir_ = parameters_.getUntrackedParameter<string>("monitorDir","");
00053   if(verbose_) cout << "Monitor dir = " << monitorDir_ << endl;
00054     
00055   prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
00056   if(verbose_) cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
00057   
00058   prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
00059   if(verbose_) cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
00060   
00061 
00062       
00063 }


Member Data Documentation

int HLTEventInfoClient::counterEvt_ [private]

counter

Definition at line 70 of file HLTEventInfoClient.h.

Referenced by analyze(), and initialize().

int HLTEventInfoClient::counterLS_ [private]

Definition at line 69 of file HLTEventInfoClient.h.

Referenced by initialize().

DQMStore* HLTEventInfoClient::dbe_ [private]

Definition at line 66 of file HLTEventInfoClient.h.

DQMStore* HLTEventInfoClient::dbe_ [private]

Definition at line 66 of file HLTEventInfoClient.h.

Referenced by beginJob(), and initialize().

std::string HLTEventInfoClient::monitorDir_ [private]

Definition at line 67 of file HLTEventInfoClient.h.

Referenced by initialize().

int HLTEventInfoClient::nChannels [private]

prescale on number of events

Definition at line 73 of file HLTEventInfoClient.h.

edm::ParameterSet HLTEventInfoClient::parameters_ [private]

Definition at line 64 of file HLTEventInfoClient.h.

Referenced by HLTEventInfoClient(), and initialize().

int HLTEventInfoClient::prescaleEvt_ [private]

units of lumi sections

Definition at line 72 of file HLTEventInfoClient.h.

Referenced by analyze(), and initialize().

int HLTEventInfoClient::prescaleLS_ [private]

counter

Definition at line 71 of file HLTEventInfoClient.h.

Referenced by initialize().

Float_t HLTEventInfoClient::reportSummary [private]

Definition at line 74 of file HLTEventInfoClient.h.

Referenced by endLuminosityBlock().

MonitorElement* HLTEventInfoClient::reportSummary_ [private]

Definition at line 79 of file HLTEventInfoClient.h.

MonitorElement* HLTEventInfoClient::reportSummary_ [private]

Definition at line 79 of file HLTEventInfoClient.h.

Referenced by beginJob(), and endLuminosityBlock().

MonitorElement* HLTEventInfoClient::reportSummaryContent_[20] [private]

Definition at line 80 of file HLTEventInfoClient.h.

MonitorElement* HLTEventInfoClient::reportSummaryContent_[20] [private]

Definition at line 80 of file HLTEventInfoClient.h.

Referenced by beginJob(), and endLuminosityBlock().

MonitorElement* HLTEventInfoClient::reportSummaryMap_ [private]

Definition at line 81 of file HLTEventInfoClient.h.

MonitorElement* HLTEventInfoClient::reportSummaryMap_ [private]

Definition at line 81 of file HLTEventInfoClient.h.

Referenced by beginJob(), and endLuminosityBlock().

Float_t HLTEventInfoClient::summaryContent [private]

Definition at line 76 of file HLTEventInfoClient.h.

Referenced by beginJob(), and endLuminosityBlock().

Float_t HLTEventInfoClient::summarySum [private]

Definition at line 75 of file HLTEventInfoClient.h.

Referenced by endLuminosityBlock().

bool HLTEventInfoClient::verbose_ [private]

Definition at line 68 of file HLTEventInfoClient.h.

Referenced by analyze(), beginJob(), get1DHisto(), get1DProfile(), get2DHisto(), get2DProfile(), initialize(), and ~HLTEventInfoClient().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:29 2009 for CMSSW by  doxygen 1.5.4