CMS 3D CMS Logo

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

L1TGCTClient Class Reference

#include <L1TGCTClient.h>

Inheritance diagram for L1TGCTClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginJob (void)
 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 makeXProjection (TH2F *input, MonitorElement *output)
void makeYProjection (TH2F *input, MonitorElement *output)

Private Attributes

int counterEvt_
 counter
int counterLS_
DQMStoredbe_
MonitorElementl1GctAllJetsOccEta_
MonitorElementl1GctAllJetsOccPhi_
MonitorElementl1GctCenJetsOccEta_
MonitorElementl1GctCenJetsOccPhi_
MonitorElementl1GctForJetsOccEta_
MonitorElementl1GctForJetsOccPhi_
MonitorElementl1GctIsoEmOccEta_
 prescale on number of events
MonitorElementl1GctIsoEmOccPhi_
MonitorElementl1GctNonIsoEmOccEta_
MonitorElementl1GctNonIsoEmOccPhi_
MonitorElementl1GctTauJetsOccEta_
MonitorElementl1GctTauJetsOccPhi_
std::string monitorDir_
int prescaleEvt_
 units of lumi sections
int prescaleLS_
 counter

Detailed Description

Definition at line 18 of file L1TGCTClient.h.


Constructor & Destructor Documentation

L1TGCTClient::L1TGCTClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 24 of file L1TGCTClient.cc.

                                                   :
  monitorDir_(ps.getUntrackedParameter<string>("monitorDir","")),
  counterLS_(0), 
  counterEvt_(0), 
  prescaleLS_(ps.getUntrackedParameter<int>("prescaleLS", -1)),
  prescaleEvt_(ps.getUntrackedParameter<int>("prescaleEvt", -1))
{
}
L1TGCTClient::~L1TGCTClient ( ) [virtual]

Destructor.

Definition at line 33 of file L1TGCTClient.cc.

{}

Member Function Documentation

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

Analyze.

Implements edm::EDAnalyzer.

Definition at line 94 of file L1TGCTClient.cc.

{}
void L1TGCTClient::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 35 of file L1TGCTClient.cc.

References DQMStore::book1D(), dbe_, ETABINS, ETAMAX, ETAMIN, l1GctAllJetsOccEta_, l1GctAllJetsOccPhi_, l1GctCenJetsOccEta_, l1GctCenJetsOccPhi_, l1GctForJetsOccEta_, l1GctForJetsOccPhi_, l1GctIsoEmOccEta_, l1GctIsoEmOccPhi_, l1GctNonIsoEmOccEta_, l1GctNonIsoEmOccPhi_, l1GctTauJetsOccEta_, l1GctTauJetsOccPhi_, monitorDir_, cmsCodeRules::cppFunctionSkipper::operator, PHIBINS, PHIMAX, PHIMIN, and DQMStore::setCurrentFolder().

{
  // Get backendinterface  
  dbe_ = Service<DQMStore>().operator->();

  // Set to directory with ME in
  dbe_->setCurrentFolder(monitorDir_);
  
  l1GctIsoEmOccEta_ = dbe_->book1D("IsoEmOccEta","ISO EM  #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
  l1GctIsoEmOccPhi_ = dbe_->book1D("IsoEmOccPhi","ISO EM  #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
  l1GctNonIsoEmOccEta_ = dbe_->book1D("NonIsoEmOccEta","NON-ISO EM  #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
  l1GctNonIsoEmOccPhi_ = dbe_->book1D("NonIsoEmOccPhi","NON-ISO EM  #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
  l1GctAllJetsOccEta_ = dbe_->book1D("AllJetsOccEta","CENTRAL AND FORWARD JET  #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
  l1GctAllJetsOccPhi_ = dbe_->book1D("AllJetsOccPhi","CENTRAL AND FORWARD JET  #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
  l1GctCenJetsOccEta_ = dbe_->book1D("CenJetsOccEta","CENTRAL JET  #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
  l1GctCenJetsOccPhi_ = dbe_->book1D("CenJetsOccPhi","CENTRAL JET  #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
  l1GctForJetsOccEta_ = dbe_->book1D("ForJetsOccEta","FORWARD JET  #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
  l1GctForJetsOccPhi_ = dbe_->book1D("ForJetsOccPhi","FORWARD JET  #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
  l1GctTauJetsOccEta_ = dbe_->book1D("TauJetsOccEta","TAU JET  #eta OCCUPANCY", ETABINS, ETAMIN, ETAMAX);
  l1GctTauJetsOccPhi_ = dbe_->book1D("TauJetsOccPhi","TAU JET  #phi OCCUPANCY", PHIBINS, PHIMIN, PHIMAX);
}
void L1TGCTClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 59 of file L1TGCTClient.cc.

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

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file L1TGCTClient.cc.

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

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 129 of file L1TGCTClient.cc.

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

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 61 of file L1TGCTClient.cc.

References dbe_, DQMStore::get(), MonitorElement::getTH2F(), l1GctAllJetsOccEta_, l1GctAllJetsOccPhi_, l1GctCenJetsOccEta_, l1GctCenJetsOccPhi_, l1GctForJetsOccEta_, l1GctForJetsOccPhi_, l1GctIsoEmOccEta_, l1GctIsoEmOccPhi_, l1GctNonIsoEmOccEta_, l1GctNonIsoEmOccPhi_, l1GctTauJetsOccEta_, l1GctTauJetsOccPhi_, makeXProjection(), makeYProjection(), and NULL.

{
  if (dbe_->get("L1T/L1TGCT/IsoEmOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/IsoEmOccEtaPhi")->getTH2F(),l1GctIsoEmOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/IsoEmOccEtaPhi")->getTH2F(),l1GctIsoEmOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/NonIsoEmOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/NonIsoEmOccEtaPhi")->getTH2F(),l1GctNonIsoEmOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/NonIsoEmOccEtaPhi")->getTH2F(),l1GctNonIsoEmOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/AllJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/AllJetsOccEtaPhi")->getTH2F(),l1GctAllJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/AllJetsOccEtaPhi")->getTH2F(),l1GctAllJetsOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/CenJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/CenJetsOccEtaPhi")->getTH2F(),l1GctCenJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/CenJetsOccEtaPhi")->getTH2F(),l1GctCenJetsOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/ForJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/ForJetsOccEtaPhi")->getTH2F(),l1GctForJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/ForJetsOccEtaPhi")->getTH2F(),l1GctForJetsOccPhi_);
  }
  
  if (dbe_->get("L1T/L1TGCT/TauJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/TauJetsOccEtaPhi")->getTH2F(),l1GctTauJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/TauJetsOccEtaPhi")->getTH2F(),l1GctTauJetsOccPhi_);
  }
}
void L1TGCTClient::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 96 of file L1TGCTClient.cc.

References dbe_, DQMStore::get(), MonitorElement::getTH2F(), l1GctAllJetsOccEta_, l1GctAllJetsOccPhi_, l1GctCenJetsOccEta_, l1GctCenJetsOccPhi_, l1GctForJetsOccEta_, l1GctForJetsOccPhi_, l1GctIsoEmOccEta_, l1GctIsoEmOccPhi_, l1GctNonIsoEmOccEta_, l1GctNonIsoEmOccPhi_, l1GctTauJetsOccEta_, l1GctTauJetsOccPhi_, makeXProjection(), makeYProjection(), and NULL.

{
  if (dbe_->get("L1T/L1TGCT/IsoEmOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/IsoEmOccEtaPhi")->getTH2F(),l1GctIsoEmOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/IsoEmOccEtaPhi")->getTH2F(),l1GctIsoEmOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/NonIsoEmOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/NonIsoEmOccEtaPhi")->getTH2F(),l1GctNonIsoEmOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/NonIsoEmOccEtaPhi")->getTH2F(),l1GctNonIsoEmOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/AllJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/AllJetsOccEtaPhi")->getTH2F(),l1GctAllJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/AllJetsOccEtaPhi")->getTH2F(),l1GctAllJetsOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/CenJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/CenJetsOccEtaPhi")->getTH2F(),l1GctCenJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/CenJetsOccEtaPhi")->getTH2F(),l1GctCenJetsOccPhi_);
  }

  if (dbe_->get("L1T/L1TGCT/ForJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/ForJetsOccEtaPhi")->getTH2F(),l1GctForJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/ForJetsOccEtaPhi")->getTH2F(),l1GctForJetsOccPhi_);
  }
  
  if (dbe_->get("L1T/L1TGCT/TauJetsOccEtaPhi")!=NULL){
    makeXProjection(dbe_->get("L1T/L1TGCT/TauJetsOccEtaPhi")->getTH2F(),l1GctTauJetsOccEta_);
    makeYProjection(dbe_->get("L1T/L1TGCT/TauJetsOccEtaPhi")->getTH2F(),l1GctTauJetsOccPhi_);
  }
}
void L1TGCTClient::makeXProjection ( TH2F *  input,
MonitorElement output 
) [private]

Definition at line 131 of file L1TGCTClient.cc.

References MonitorElement::getNbinsX(), i, and MonitorElement::setBinContent().

Referenced by endLuminosityBlock(), and endRun().

{
  // Are the provided input and output consistent
  if (input->GetNbinsX() != output->getNbinsX()) return;
  
  // Make the projection
  TH1D* projX = input->ProjectionX();
  
  for (Int_t i=0; i<projX->GetNbinsX(); i++) {
    output->setBinContent(i+1,projX->GetBinContent(i+1));
  }
  delete projX;
}
void L1TGCTClient::makeYProjection ( TH2F *  input,
MonitorElement output 
) [private]

Definition at line 145 of file L1TGCTClient.cc.

References MonitorElement::getNbinsX(), i, and MonitorElement::setBinContent().

Referenced by endLuminosityBlock(), and endRun().

{
  // Are the provided input and output consistent
  if (input->GetNbinsY() != output->getNbinsX()) return;
  
  // Make the projection
  TH1D* projY = input->ProjectionY();
  
  for (Int_t i=0; i<projY->GetNbinsX(); i++) {
    output->setBinContent(i+1,projY->GetBinContent(i+1));
  }
  delete projY;
}

Member Data Documentation

counter

Definition at line 60 of file L1TGCTClient.h.

int L1TGCTClient::counterLS_ [private]

Definition at line 59 of file L1TGCTClient.h.

Definition at line 57 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 68 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 69 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 70 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 71 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 72 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 73 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

prescale on number of events

Definition at line 64 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 65 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 66 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 67 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 74 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

Definition at line 75 of file L1TGCTClient.h.

Referenced by beginJob(), endLuminosityBlock(), and endRun().

std::string L1TGCTClient::monitorDir_ [private]

Definition at line 58 of file L1TGCTClient.h.

Referenced by beginJob().

units of lumi sections

Definition at line 62 of file L1TGCTClient.h.

counter

Definition at line 61 of file L1TGCTClient.h.