CMS 3D CMS Logo

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

L1TCSCTFClient Class Reference

#include <L1TCSCTFClient.h>

Inheritance diagram for L1TCSCTFClient:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Fake 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 initialize ()
void processHistograms ()

Private Attributes

int counterEvt
 counter
int counterLS
MonitorElementcsctferrors_
DQMStoredbe
std::string input_dir
bool m_runInEndJob
bool m_runInEndLumi
bool m_runInEndRun
bool m_runInEventLoop
 prescale on number of events
std::string output_dir
edm::ParameterSet parameters
int prescaleEvt
 units of lumi sections
int prescaleLS
 counter

Detailed Description

Definition at line 13 of file L1TCSCTFClient.h.


Constructor & Destructor Documentation

L1TCSCTFClient::L1TCSCTFClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 15 of file L1TCSCTFClient.cc.

References Parameters::parameters.

                                                       {
  parameters=ps;
  initialize();
}
L1TCSCTFClient::~L1TCSCTFClient ( ) [virtual]

Destructor.

Definition at line 20 of file L1TCSCTFClient.cc.

{}

Member Function Documentation

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

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 71 of file L1TCSCTFClient.cc.

References reco_calib_source_client_cfg::prescaleEvt.

                                                                     {

   counterEvt++;
   if (prescaleEvt<1) return;
   if (prescaleEvt>0 && counterEvt%prescaleEvt!=0) return;
   
   // there is no loop on events in the offline harvesting step
   // code here will not be executed offline

   if (m_runInEventLoop) {

       processHistograms();
   }

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

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 43 of file L1TCSCTFClient.cc.

References cmsCodeRules::cppFunctionSkipper::operator, and o2o::output_dir.

                                 {
  // get backendinterface
  dbe = Service<DQMStore>().operator->();

  // do your thing
  dbe->setCurrentFolder(output_dir);
  csctferrors_ = dbe->book1D("csctferrors_","CSCTF Errors",6,0,6);
  dbe->setCurrentFolder(input_dir);
}
void L1TCSCTFClient::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file L1TCSCTFClient.cc.

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

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 54 of file L1TCSCTFClient.cc.

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

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 98 of file L1TCSCTFClient.cc.

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

DQM Client Diagnostic.

Reimplemented from edm::EDAnalyzer.

Definition at line 61 of file L1TCSCTFClient.cc.

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file L1TCSCTFClient.cc.

void L1TCSCTFClient::initialize ( ) [private]
void L1TCSCTFClient::processHistograms ( ) [private]

Definition at line 108 of file L1TCSCTFClient.cc.

References newFWLiteAna::bin, benchmark_cfg::errors, and MonitorElement::getTH1F().

                                       {

    dbe->setCurrentFolder(input_dir);

    vector<string> meVec = dbe->getMEs();
    for(vector<string>::const_iterator it=meVec.begin(); it!=meVec.end(); it++){
      string full_path = input_dir + "/" + (*it);
      MonitorElement *me =dbe->get(full_path);
      if( !me ){
         LogInfo("TriggerDQM")<<full_path<<" NOT FOUND.";
         continue;
      }

      //  But for now we only do a simple workaround
      if( (*it) != "CSCTF_errors" ) continue;
      TH1F *errors = me->getTH1F();
      csctferrors_->getTH1F()->Reset();
      if(!errors) continue;
      for(int bin=1; bin<=errors->GetXaxis()->GetNbins(); bin++)
         csctferrors_->Fill(bin-0.5,errors->GetBinContent(bin));
    }

}

Member Data Documentation

counter

Definition at line 57 of file L1TCSCTFClient.h.

Definition at line 56 of file L1TCSCTFClient.h.

Definition at line 69 of file L1TCSCTFClient.h.

Definition at line 54 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::input_dir [private]

Definition at line 55 of file L1TCSCTFClient.h.

Definition at line 64 of file L1TCSCTFClient.h.

Definition at line 62 of file L1TCSCTFClient.h.

Definition at line 63 of file L1TCSCTFClient.h.

prescale on number of events

Definition at line 61 of file L1TCSCTFClient.h.

std::string L1TCSCTFClient::output_dir [private]

Definition at line 55 of file L1TCSCTFClient.h.

Definition at line 52 of file L1TCSCTFClient.h.

units of lumi sections

Definition at line 59 of file L1TCSCTFClient.h.

counter

Definition at line 58 of file L1TCSCTFClient.h.