#include <CaloTowersExample.h>
Public Member Functions | |
CaloTowersExample (const edm::ParameterSet &) | |
Private Member Functions | |
void | analyze (const edm::Event &, const edm::EventSetup &) |
void | beginJob () |
void | endJob () |
Private Attributes | |
std::string | CaloTowersAlgorithm |
TH1F | h_et |
TFile * | m_file |
Definition at line 15 of file CaloTowersExample.h.
CaloTowersExample::CaloTowersExample | ( | const edm::ParameterSet & | cfg | ) |
Definition at line 20 of file CaloTowersExample.cc.
: CaloTowersAlgorithm( cfg.getParameter<string>( "CaloTowersAlgorithm" ) ) { }
void CaloTowersExample::analyze | ( | const edm::Event & | evt, |
const edm::EventSetup & | es | ||
) | [private, virtual] |
Implements edm::EDAnalyzer.
Definition at line 32 of file CaloTowersExample.cc.
References ExpressReco_HICollisions_FallBack::caloTowers, CaloTowersAlgorithm, edm::Event::getByLabel(), and h_et.
{ //Get the CaloTower collection Handle<CaloTowerCollection> caloTowers; evt.getByLabel( CaloTowersAlgorithm, caloTowers ); //Loop over the two leading CaloJets and fill some histograms for( CaloTowerCollection::const_iterator cal = caloTowers->begin(); cal != caloTowers->end(); ++ cal ) { h_et.Fill( cal->et() ); } }
void CaloTowersExample::beginJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 25 of file CaloTowersExample.cc.
void CaloTowersExample::endJob | ( | void | ) | [private, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 45 of file CaloTowersExample.cc.
References m_file.
{ //Write out the histogram file. m_file->Write(); }
std::string CaloTowersExample::CaloTowersAlgorithm [private] |
Definition at line 23 of file CaloTowersExample.h.
Referenced by analyze().
TH1F CaloTowersExample::h_et [private] |
Definition at line 24 of file CaloTowersExample.h.
Referenced by analyze(), and beginJob().
TFile* CaloTowersExample::m_file [private] |
Definition at line 25 of file CaloTowersExample.h.
Referenced by beginJob(), and endJob().