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)
void processHistograms ()

Private Attributes

int counterEvt_
 counter
int counterLS_
DQMStoredbe_
MonitorElementl1GctAllJetsOccEta_
MonitorElementl1GctAllJetsOccPhi_
MonitorElementl1GctCenJetsOccEta_
MonitorElementl1GctCenJetsOccPhi_
MonitorElementl1GctForJetsOccEta_
MonitorElementl1GctForJetsOccPhi_
MonitorElementl1GctIsoEmOccEta_
MonitorElementl1GctIsoEmOccPhi_
MonitorElementl1GctNonIsoEmOccEta_
MonitorElementl1GctNonIsoEmOccPhi_
MonitorElementl1GctTauJetsOccEta_
MonitorElementl1GctTauJetsOccPhi_
bool m_runInEndJob
bool m_runInEndLumi
bool m_runInEndRun
bool m_runInEventLoop
 prescale on number of events
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)),
  m_runInEventLoop(ps.getUntrackedParameter<bool>("runInEventLoop", false)),
  m_runInEndLumi(ps.getUntrackedParameter<bool>("runInEndLumi", false)),
  m_runInEndRun(ps.getUntrackedParameter<bool>("runInEndRun", false)),
  m_runInEndJob(ps.getUntrackedParameter<bool>("runInEndJob", false))

{
}
L1TGCTClient::~L1TGCTClient ( ) [virtual]

Destructor.

Definition at line 38 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 76 of file L1TGCTClient.cc.

References m_runInEventLoop, and processHistograms().

                                                                   {

    // there is no loop on events in the offline harvesting step
    // code here will not be executed offline

    if (m_runInEventLoop) {

        processHistograms();
    }

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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 40 of file L1TGCTClient.cc.

References DQMStore::book1D(), dbe_, ETABINS, ETAMAX, ETAMIN, l1GctAllJetsOccEta_, l1GctAllJetsOccPhi_, l1GctCenJetsOccEta_, l1GctCenJetsOccPhi_, l1GctForJetsOccEta_, l1GctForJetsOccPhi_, l1GctIsoEmOccEta_, l1GctIsoEmOccPhi_, l1GctNonIsoEmOccEta_, l1GctNonIsoEmOccPhi_, l1GctTauJetsOccEta_, l1GctTauJetsOccPhi_, monitorDir_, 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 64 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 62 of file L1TGCTClient.cc.

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

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file L1TGCTClient.cc.

References m_runInEndJob, and processHistograms().

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

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file L1TGCTClient.cc.

References m_runInEndLumi, and processHistograms().

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file L1TGCTClient.cc.

References m_runInEndRun, and processHistograms().

void L1TGCTClient::makeXProjection ( TH2F *  input,
MonitorElement output 
) [private]

Definition at line 148 of file L1TGCTClient.cc.

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

Referenced by processHistograms().

{
  // 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 162 of file L1TGCTClient.cc.

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

Referenced by processHistograms().

{
  // 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;
}
void L1TGCTClient::processHistograms ( ) [private]

Definition at line 105 of file L1TGCTClient.cc.

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

Referenced by analyze(), endJob(), endLuminosityBlock(), and endRun().

                                     {

    MonitorElement* Input;

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

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

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

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

    Input = dbe_->get("L1T/L1TGCT/ForJetsOccEtaPhi");
    if (Input!=NULL){
      makeXProjection(Input->getTH2F(),l1GctForJetsOccEta_);
      makeYProjection(Input->getTH2F(),l1GctForJetsOccPhi_);
    }

    Input = dbe_->get("L1T/L1TGCT/TauJetsOccEtaPhi");
    if (Input!=NULL){
      makeXProjection(Input->getTH2F(),l1GctTauJetsOccEta_);
      makeYProjection(Input->getTH2F(),l1GctTauJetsOccPhi_);
    }

}

Member Data Documentation

counter

Definition at line 62 of file L1TGCTClient.h.

int L1TGCTClient::counterLS_ [private]

Definition at line 61 of file L1TGCTClient.h.

Definition at line 59 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 77 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 78 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 79 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 80 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 81 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 82 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 73 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 74 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 75 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 76 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 83 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 84 of file L1TGCTClient.h.

Referenced by beginJob(), and processHistograms().

Definition at line 69 of file L1TGCTClient.h.

Referenced by endJob().

Definition at line 67 of file L1TGCTClient.h.

Referenced by endLuminosityBlock().

Definition at line 68 of file L1TGCTClient.h.

Referenced by endRun().

prescale on number of events

Definition at line 66 of file L1TGCTClient.h.

Referenced by analyze().

std::string L1TGCTClient::monitorDir_ [private]

Definition at line 60 of file L1TGCTClient.h.

Referenced by beginJob().

units of lumi sections

Definition at line 64 of file L1TGCTClient.h.

counter

Definition at line 63 of file L1TGCTClient.h.