CMS 3D CMS Logo

GenEventProcIDProducer Class Reference

Author:
Luca Lista, INFN
More...

Inheritance diagram for GenEventProcIDProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 GenEventProcIDProducer (const edm::ParameterSet &)
 constructor

Private Member Functions

void produce (edm::Event &evt, const edm::EventSetup &es)

Private Attributes

edm::InputTag src_


Detailed Description

Author:
Luca Lista, INFN

Author:
Filip Moortgat, ETH
Version:
Id
GenEventProcIDProducer.cc,v 1.2 2007/09/19 07:21:23 llista Exp

Definition at line 17 of file GenEventProcIDProducer.cc.


Constructor & Destructor Documentation

GenEventProcIDProducer::GenEventProcIDProducer ( const edm::ParameterSet p  ) 

constructor

Definition at line 36 of file GenEventProcIDProducer.cc.

00036                                                                        :
00037   src_( p.getParameter<InputTag>( "src" ) ) {
00038   produces<int>();
00039 }


Member Function Documentation

void GenEventProcIDProducer::produce ( edm::Event evt,
const edm::EventSetup es 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 42 of file GenEventProcIDProducer.cc.

References lat::endl(), TtGenEvtProducer_cfi::genEvt, edm::Event::getByLabel(), edm::errors::InvalidReference, edm::Event::put(), and src_.

00042                                                                        {
00043   Handle<HepMCProduct> mc;
00044   evt.getByLabel( src_, mc );
00045   const GenEvent * genEvt = mc->GetEvent();
00046   if( genEvt == 0 ) 
00047     throw edm::Exception( edm::errors::InvalidReference ) 
00048       << "HepMC has null pointer to GenEvent" << endl;
00049   auto_ptr<int> process_id( new int(1) );
00050   (*process_id) = genEvt->signal_process_id();
00051   evt.put( process_id );
00052 }


Member Data Documentation

edm::InputTag GenEventProcIDProducer::src_ [private]

Definition at line 24 of file GenEventProcIDProducer.cc.

Referenced by produce().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:21:12 2009 for CMSSW by  doxygen 1.5.4