CMS 3D CMS Logo

HepMCProductAnalyzer Class Reference

Description: allows to print content of HepMCProducts. More...

#include <IOMC/HepMCProductAnalyzer/src/HepMCProductAnalyzer.cc>

Inheritance diagram for HepMCProductAnalyzer:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 HepMCProductAnalyzer (const edm::ParameterSet &)
 ~HepMCProductAnalyzer ()

Private Attributes

std::string label_


Detailed Description

Description: allows to print content of HepMCProducts.

Implementation: <Notes on="" implementation>="">

Definition at line 42 of file HepMCProductAnalyzer.h.


Constructor & Destructor Documentation

HepMCProductAnalyzer::HepMCProductAnalyzer ( const edm::ParameterSet iConfig  )  [explicit]

Definition at line 10 of file HepMCProductAnalyzer.cc.

00010                                                                          :
00011 label_(iConfig.getUntrackedParameter("moduleLabel",std::string("source")))
00012 {
00013    //now do what ever initialization is needed
00014 
00015 }

HepMCProductAnalyzer::~HepMCProductAnalyzer (  ) 

Definition at line 18 of file HepMCProductAnalyzer.cc.

00019 {
00020  
00021    // do anything here that needs to be done at desctruction time
00022    // (e.g. close files, deallocate resources etc.)
00023 
00024 }


Member Function Documentation

void HepMCProductAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 33 of file HepMCProductAnalyzer.cc.

References edm::Event::getByType().

00034 {
00035    using namespace edm;
00036 
00037    Handle<HepMCProduct> evt;
00038 //   iEvent.getByLabel("PythiaSource",evt);
00039 //   iEvent.getByLabel("MCFileSource",evt);
00040 
00041 //   if there is an ambiguity: get by label
00042 //   iEvent.getByLabel(label_, evt);
00043 
00044 // if no ambiguity one can do get by type
00045    iEvent.getByType(evt);
00046 
00047    evt->GetEvent()->print();
00048 
00049 
00050 }


Member Data Documentation

std::string HepMCProductAnalyzer::label_ [private]

Definition at line 52 of file HepMCProductAnalyzer.h.


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