CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
CandidateBenchmarkAnalyzer Class Reference

#include <CandidateBenchmarkAnalyzer.h>

Inheritance diagram for CandidateBenchmarkAnalyzer:
BenchmarkAnalyzer CandidateBenchmark edm::EDAnalyzer Benchmark edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginJob ()
 
 CandidateBenchmarkAnalyzer (const edm::ParameterSet &parameterSet)
 
void endJob ()
 
- Public Member Functions inherited from BenchmarkAnalyzer
 BenchmarkAnalyzer ()
 
 BenchmarkAnalyzer (const edm::ParameterSet &)
 
virtual ~BenchmarkAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 
- Public Member Functions inherited from CandidateBenchmark
 CandidateBenchmark (Mode mode)
 
template<class C >
void fill (const C &candidates)
 
void fillOne (const reco::Candidate &candidate)
 fill histograms with a given particle More...
 
void setup ()
 book histograms More...
 
void setup (const edm::ParameterSet &parameterSet)
 book histograms More...
 
virtual ~CandidateBenchmark ()
 
- Public Member Functions inherited from Benchmark
 Benchmark (Mode mode=DEFAULT)
 
bool isInRange (float pt, float eta, float phi) const
 
virtual void setDirectory (TDirectory *dir)
 
void setParameters (Mode mode)
 
void setRange (float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
 
void write ()
 write to the TFile, in plain ROOT mode. No need to call this function in DQM mode More...
 
virtual ~Benchmark ()
 

Public Attributes

edm::EDGetTokenT< edm::View
< reco::Candidate > > 
myColl_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from Benchmark
enum  Mode { DEFAULT, DQMOFFLINE, VALIDATION }
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Static Public Attributes inherited from Benchmark
static DQMStoreDQM_ = 0
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Member Functions inherited from Benchmark
TH1F * book1D (const char *histname, const char *title, int nbins, float xmin, float xmax)
 book a 1D histogram, either with DQM or plain root. More...
 
TH2F * book2D (const char *histname, const char *title, int nbinsx, float xmin, float xmax, int nbinsy, float ymin, float ymax)
 book a 2D histogram, either with DQM or plain root. More...
 
TH2F * book2D (const char *histname, const char *title, int nbinsx, float *xbins, int nbinsy, float ymin, float ymax)
 book a 2D histogram, either with DQM or plain root. More...
 
TProfile * bookProfile (const char *histname, const char *title, int nbinsx, float xmin, float xmax, float ymin, float ymax, const char *option)
 book a TProfile histogram, either with DQM or plain root. More...
 
TProfile * bookProfile (const char *histname, const char *title, int nbinsx, float *xbins, float ymin, float ymax, const char *option)
 book a TProfile histogram, either with DQM or plain root. More...
 
- Protected Attributes inherited from BenchmarkAnalyzer
std::string benchmarkLabel_
 benchmark label More...
 
edm::InputTag inputLabel_
 input collection More...
 
std::string outputFile_
 name of the output root file More...
 
- Protected Attributes inherited from CandidateBenchmark
TH1F * charge_
 
TH1F * eta_
 
bool histogramBooked_
 
TH1F * pdgId_
 COLIN add this histo. More...
 
TH1F * phi_
 
TH1F * pt_
 
- Protected Attributes inherited from Benchmark
TDirectory * dir_
 
float etaMax_
 
float etaMin_
 
Mode mode_
 
float phiMax_
 
float phiMin_
 
float ptMax_
 
float ptMin_
 

Detailed Description

Definition at line 13 of file CandidateBenchmarkAnalyzer.h.

Constructor & Destructor Documentation

CandidateBenchmarkAnalyzer::CandidateBenchmarkAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 18 of file CandidateBenchmarkAnalyzer.cc.

References edm::ParameterSet::getParameter(), BenchmarkAnalyzer::inputLabel_, myColl_, and Benchmark::setRange().

18  :
19  BenchmarkAnalyzer(parameterSet),
20  CandidateBenchmark( (Benchmark::Mode) parameterSet.getParameter<int>("mode") )
21 {
22 
23  setRange( parameterSet.getParameter<double>("ptMin"),
24  parameterSet.getParameter<double>("ptMax"),
25  parameterSet.getParameter<double>("etaMin"),
26  parameterSet.getParameter<double>("etaMax"),
27  parameterSet.getParameter<double>("phiMin"),
28  parameterSet.getParameter<double>("phiMax") );
29 
30  myColl_ = consumes< View<Candidate> >(inputLabel_);
31 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::Candidate > > myColl_
edm::InputTag inputLabel_
input collection
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:52

Member Function Documentation

void CandidateBenchmarkAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 43 of file CandidateBenchmarkAnalyzer.cc.

References runEdmFileComparison::collection, CandidateBenchmark::fill(), edm::Event::getByToken(), and myColl_.

44  {
45 
46 
48  iEvent.getByToken(myColl_, collection);
49 
50  fill( *collection );
51 }
edm::EDGetTokenT< edm::View< reco::Candidate > > myColl_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void fill(const C &candidates)
void CandidateBenchmarkAnalyzer::beginJob ( void  )
virtual

Implements BenchmarkAnalyzer.

Definition at line 35 of file CandidateBenchmarkAnalyzer.cc.

References BenchmarkAnalyzer::beginJob(), and CandidateBenchmark::setup().

36 {
37 
39  setup();
40 }
virtual void beginJob()=0
void setup()
book histograms
void CandidateBenchmarkAnalyzer::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 54 of file CandidateBenchmarkAnalyzer.cc.

54  {
55 }

Member Data Documentation

edm::EDGetTokenT< edm::View<reco::Candidate> > CandidateBenchmarkAnalyzer::myColl_

Definition at line 22 of file CandidateBenchmarkAnalyzer.h.

Referenced by analyze(), and CandidateBenchmarkAnalyzer().