CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

DQMOfflineHLTEventInfoClient Class Reference

#include <DQMOfflineHLTEventInfoClient.h>

Inheritance diagram for DQMOfflineHLTEventInfoClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Protected Member Functions

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

Private Member Functions

void initialize ()

Private Attributes

MonitorElementCertificationSummary_
std::vector< MonitorElement * > CertificationSummaryContent_
MonitorElementCertificationSummaryMap_
int counterEvt_
 counter
int counterLS_
DQMStoredbe_
edm::ParameterSet parameters_
int prescaleEvt_
 units of lumi sections
int prescaleLS_
 counter
MonitorElementreportSummary_
 prescale on number of events
std::vector< MonitorElement * > reportSummaryContent_
MonitorElementreportSummaryMap_
bool verbose_

Detailed Description

Definition at line 21 of file DQMOfflineHLTEventInfoClient.h.


Constructor & Destructor Documentation

DQMOfflineHLTEventInfoClient::DQMOfflineHLTEventInfoClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 88 of file DQMOfflineHLTEventInfoClient.cc.

DQMOfflineHLTEventInfoClient::~DQMOfflineHLTEventInfoClient ( ) [virtual]

Destructor.

Definition at line 94 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

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

Member Function Documentation

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

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 210 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

                                                                                   {
   
   counterEvt_++;
   if (prescaleEvt_<1) return;
   if (prescaleEvt_>0 && counterEvt_%prescaleEvt_ != 0) return;

   if(verbose_) cout << "DQMOfflineHLTEventInfoClient::analyze" << endl;


}
void DQMOfflineHLTEventInfoClient::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 121 of file DQMOfflineHLTEventInfoClient.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), gather_cfg::cout, dbe_, MonitorElement::Fill(), DQMStore::get(), cppFunctionSkipper::operator, DQMStore::removeElement(), MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

                                           {

  if(verbose_) cout <<"[TriggerDQM]: Begin Job" << endl;
  // get backendinterface  
  dbe_ = Service<DQMStore>().operator->();

  dbe_->setCurrentFolder("HLT/EventInfo");

  // reportSummary
  reportSummary_ = dbe_->get("HLT/EventInfo/reportSummary");

  if ( reportSummary_  ) {
      dbe_->removeElement(reportSummary_->getName()); 
   }
  
  reportSummary_ = dbe_->bookFloat("reportSummary");
  //initialize reportSummary to 1
  if (reportSummary_) reportSummary_->Fill(1);

  // CertificationSummary
  CertificationSummary_ = dbe_->get("HLT/EventInfo/CertificationSummary");

  if ( CertificationSummary_  ) {
      dbe_->removeElement(CertificationSummary_->getName()); 
   }
  
  CertificationSummary_ = dbe_->bookFloat("CertificationSummary");
  //initialize CertificationSummary to 1
  if (CertificationSummary_) CertificationSummary_->Fill(1);

  //initialize reportSummary to 1
  if (reportSummary_) reportSummary_->Fill(1);

  //  OK HERE

  // reportSummaryMap
  dbe_->setCurrentFolder("HLT/EventInfo");

  reportSummaryMap_ = dbe_->get("HLT/EventInfo/reportSummaryMap");
  if ( reportSummaryMap_  ) {
  dbe_->removeElement(reportSummaryMap_->getName());
  }


  reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 6, 1, 7);
  reportSummaryMap_->setAxisTitle("", 1);
  reportSummaryMap_->setAxisTitle("", 2);
  reportSummaryMap_->setBinLabel(1,"Muon",2);
  reportSummaryMap_->setBinLabel(2,"Electron",2);
  reportSummaryMap_->setBinLabel(3,"Photon",2);
  reportSummaryMap_->setBinLabel(4,"JetMET",2);
  reportSummaryMap_->setBinLabel(5,"BJet",2);
  reportSummaryMap_->setBinLabel(6,"Tau",2);
  reportSummaryMap_->setBinLabel(1," ",1);


  CertificationSummaryMap_ = dbe_->get("HLT/EventInfo/CertificationSummaryMap");
  if ( CertificationSummaryMap_  ) {
  dbe_->removeElement(CertificationSummaryMap_->getName());
  }


  CertificationSummaryMap_ = dbe_->book2D("CertificationSummaryMap", "CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
  CertificationSummaryMap_->setAxisTitle("", 1);
  CertificationSummaryMap_->setAxisTitle("", 2);
  CertificationSummaryMap_->setBinLabel(1,"Muon",2);
  CertificationSummaryMap_->setBinLabel(2,"Electron",2);
  CertificationSummaryMap_->setBinLabel(3,"Photon",2);
  CertificationSummaryMap_->setBinLabel(4,"JetMET",2);
  CertificationSummaryMap_->setBinLabel(5,"BJet",2);
  CertificationSummaryMap_->setBinLabel(6,"Tau",2);
  CertificationSummaryMap_->setBinLabel(1," ",1);

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

Reimplemented from edm::EDAnalyzer.

Definition at line 201 of file DQMOfflineHLTEventInfoClient.cc.

                                                                                                                 {
   // optionally reset histograms here
}
void DQMOfflineHLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 197 of file DQMOfflineHLTEventInfoClient.cc.

                                                                                   {
}
void DQMOfflineHLTEventInfoClient::endJob ( void  ) [protected, virtual]

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 286 of file DQMOfflineHLTEventInfoClient.cc.

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

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 205 of file DQMOfflineHLTEventInfoClient.cc.

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 222 of file DQMOfflineHLTEventInfoClient.cc.

References dbe_, MonitorElement::Fill(), DQMStore::get(), MonitorElement::getFloatValue(), m, and DQMStore::setCurrentFolder().

                                                                                {

  float summarySum = 0;
  float reportSummary = 0;

  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
  MonitorElement* HLT_Muon = dbe_->get("HLT_Muon");
  if(HLT_Muon) reportSummaryContent_.push_back(HLT_Muon);

  MonitorElement * HLT_Electron = dbe_->get("HLT_Electron");
  if(HLT_Electron) reportSummaryContent_.push_back(HLT_Electron);

  MonitorElement * HLT_Photon = dbe_->get("HLT_Photon");
  if(HLT_Photon) reportSummaryContent_.push_back(HLT_Photon);

  MonitorElement * HLT_Tau = dbe_->get("HLT_Tau");
  if(HLT_Tau) reportSummaryContent_.push_back(HLT_Tau);


  int nSubsystems = reportSummaryContent_.size();

  for (int m = 0; m < nSubsystems; m++) {    
    summarySum += (reportSummaryContent_[m])->getFloatValue();
  }


  if(nSubsystems > 0) {
    reportSummary = summarySum / nSubsystems;;
  }
  else {
    reportSummary = 1;
  }

  reportSummary_->Fill(reportSummary);
  CertificationSummary_->Fill(reportSummary);

  float muonValue = 1;
  if(HLT_Muon) muonValue = HLT_Muon->getFloatValue();

  float electronValue = 1;
  if(HLT_Electron) electronValue = HLT_Electron->getFloatValue();

  float photonValue = 1;
  if(HLT_Photon) photonValue = HLT_Photon->getFloatValue();

  float tauValue = 1;
  if(HLT_Tau) tauValue = HLT_Tau->getFloatValue();

  reportSummaryMap_->setBinContent(1,1,muonValue);//Muon
  reportSummaryMap_->setBinContent(1,2,electronValue);//Electron
  reportSummaryMap_->setBinContent(1,3,photonValue);//Photon
  reportSummaryMap_->setBinContent(1,4,1);//JetMET
  reportSummaryMap_->setBinContent(1,5,1);//BJet
  reportSummaryMap_->setBinContent(1,6,tauValue);//Tau

  CertificationSummaryMap_->setBinContent(1,1,muonValue);//Muon
  CertificationSummaryMap_->setBinContent(1,2,electronValue);//Electron
  CertificationSummaryMap_->setBinContent(1,3,photonValue);//Photon
  CertificationSummaryMap_->setBinContent(1,4,1);//JetMET
  CertificationSummaryMap_->setBinContent(1,5,1);//BJet
  CertificationSummaryMap_->setBinContent(1,6,tauValue);//Tau
}
void DQMOfflineHLTEventInfoClient::initialize ( ) [private]

Definition at line 99 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout, dbe_, and cppFunctionSkipper::operator.

                                             { 

  counterLS_=0; 
  counterEvt_=0; 
  
  // get back-end interface
  dbe_ = Service<DQMStore>().operator->();
  
  // base folder for the contents of this job
  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
  
  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
  if(verbose_) cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)"<< endl;
  
  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
  if(verbose_) cout << "DQM event prescale = " << prescaleEvt_ << " events(s)"<< endl;
  /*
  */
  
}

Member Data Documentation

Definition at line 72 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 73 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 74 of file DQMOfflineHLTEventInfoClient.h.

counter

Definition at line 63 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 62 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 60 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 58 of file DQMOfflineHLTEventInfoClient.h.

units of lumi sections

Definition at line 65 of file DQMOfflineHLTEventInfoClient.h.

counter

Definition at line 64 of file DQMOfflineHLTEventInfoClient.h.

prescale on number of events

Definition at line 68 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 69 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 70 of file DQMOfflineHLTEventInfoClient.h.

Definition at line 61 of file DQMOfflineHLTEventInfoClient.h.