CMS 3D CMS Logo

HcalLedAnalyzer Class Reference

#include <CalibCalorimetry/HcalStandardModules/interface/HcalLedAnalyzer.h>

Inheritance diagram for HcalLedAnalyzer:

edm::EDAnalyzer

List of all members.

Public Member Functions

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

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginJob (const edm::EventSetup &c)
void endJob (void)

Private Attributes

int led_sample
int m_ievt
int m_inputPedestals_run
std::string m_inputPedestals_source
std::string m_inputPedestals_tag
HcalPedestalsm_inputPeds
HcalLedAnalysism_ledAnal


Detailed Description

Definition at line 21 of file HcalLedAnalyzer.h.


Constructor & Destructor Documentation

HcalLedAnalyzer::HcalLedAnalyzer ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 52 of file HcalLedAnalyzer.cc.

References edm::ParameterSet::getUntrackedParameter(), HcalLedAnalysis::LedSetup(), m_inputPedestals_run, m_inputPedestals_source, m_inputPedestals_tag, and m_ledAnal.

00052                                                          {
00053   m_ledAnal = new HcalLedAnalysis(ps);
00054   m_ledAnal->LedSetup(ps.getUntrackedParameter<std::string>("outputFileHist", "HcalLedAnalyzer.root"));
00055 //  m_startSample = ps.getUntrackedParameter<int>("firstSample", 0);
00056 //  m_endSample = ps.getUntrackedParameter<int>("lastSample", 19);
00057   m_inputPedestals_source = ps.getUntrackedParameter<std::string>("inputPedestalsSource", "");
00058   m_inputPedestals_tag = ps.getUntrackedParameter<std::string>("inputPedsTag", "");
00059   m_inputPedestals_run = ps.getUntrackedParameter<int>("inputPedsRun", 1);
00060 
00061   // CORAL required variables to be set, even if not needed
00062   if (!::getenv("CORAL_AUTH_USER")) ::putenv("CORAL_AUTH_USER=blah");
00063   if (!::getenv("CORAL_AUTH_PASSWORD")) ::putenv("CORAL_AUTH_PASSWORD=blah"); 
00064 }

HcalLedAnalyzer::~HcalLedAnalyzer (  ) 

Destructor.

Definition at line 66 of file HcalLedAnalyzer.cc.

00066                                  {
00067 //  delete m_ledAnal;
00068 }


Member Function Documentation

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

Analyze.

get digis

Implements edm::EDAnalyzer.

Definition at line 90 of file HcalLedAnalyzer.cc.

References calib, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), edm::EventSetup::get(), edm::Event::getByType(), m_ievt, m_ledAnal, and HcalLedAnalysis::processLedEvent().

00090                                                                                {
00091 
00092   m_ievt++;
00093 
00095   edm::Handle<HBHEDigiCollection> hbhe; e.getByType(hbhe);
00096   edm::Handle<HODigiCollection> ho;     e.getByType(ho);
00097   edm::Handle<HFDigiCollection> hf;     e.getByType(hf);
00098 
00099   // get calib digis
00100   edm::Handle<HcalCalibDigiCollection> calib;  e.getByType(calib);
00101 
00102   // get testbeam specific laser info from the TDC.  This probably will not work
00103   // outside of the testbeam, but it should be easy to modify the Handle/getByType
00104   // to get the correct stuff 
00105 
00106   //edm::Handle<HcalTBTiming> timing; e.getByType(timing);
00107 
00108   // get conditions
00109   edm::ESHandle<HcalDbService> conditions;
00110   eventSetup.get<HcalDbRecord>().get(conditions);
00111 
00112 //  int runNumber = e.id().run();
00113 //  m_ledAnal->processLedEvent(*hbhe, *ho, *hf, *calib, *conditions, *runNumber);
00114 
00115   m_ledAnal->processLedEvent(*hbhe, *ho, *hf, *calib, *conditions);
00116 
00117 
00118   if(m_ievt%1000 == 0)
00119     std::cout << "HcalLedAnalyzer: analyzed " << m_ievt << " events" << std::endl;
00120 
00121   return;
00122 }

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

Reimplemented from edm::EDAnalyzer.

Definition at line 70 of file HcalLedAnalyzer.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), getObject(), led_sample, m_ievt, m_inputPedestals_run, m_inputPedestals_source, and m_inputPedestals_tag.

00070                                                     {
00071   m_ievt = 0;
00072   led_sample = 1;
00073   HcalPedestals* inputPeds=0;
00074 // get pedestals
00075   if (!m_inputPedestals_source.empty ()) {
00076     inputPeds = new HcalPedestals ();
00077     if (!getObject (inputPeds, m_inputPedestals_source, m_inputPedestals_tag, m_inputPedestals_run)) {
00078       std::cerr << "HcalLedAnalyzer-> Failed to get pedestal values" << std::endl;
00079     }
00080     //m_ledAnal->doPeds(inputPeds);
00081     delete inputPeds;
00082   }
00083 }

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

Reimplemented from edm::EDAnalyzer.

Definition at line 85 of file HcalLedAnalyzer.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), HcalLedAnalysis::LedDone(), and m_ledAnal.

00085                                  {
00086   m_ledAnal->LedDone();
00087   std::cout<<"Getting out"<<std::endl;
00088 }


Member Data Documentation

int HcalLedAnalyzer::led_sample [private]

Definition at line 45 of file HcalLedAnalyzer.h.

Referenced by beginJob().

int HcalLedAnalyzer::m_ievt [private]

Definition at line 44 of file HcalLedAnalyzer.h.

Referenced by analyze(), and beginJob().

int HcalLedAnalyzer::m_inputPedestals_run [private]

Definition at line 55 of file HcalLedAnalyzer.h.

Referenced by beginJob(), and HcalLedAnalyzer().

std::string HcalLedAnalyzer::m_inputPedestals_source [private]

Definition at line 53 of file HcalLedAnalyzer.h.

Referenced by beginJob(), and HcalLedAnalyzer().

std::string HcalLedAnalyzer::m_inputPedestals_tag [private]

Definition at line 54 of file HcalLedAnalyzer.h.

Referenced by beginJob(), and HcalLedAnalyzer().

HcalPedestals* HcalLedAnalyzer::m_inputPeds [private]

Definition at line 48 of file HcalLedAnalyzer.h.

HcalLedAnalysis* HcalLedAnalyzer::m_ledAnal [private]

Definition at line 47 of file HcalLedAnalyzer.h.

Referenced by analyze(), endJob(), and HcalLedAnalyzer().


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