ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/CMSSW/PhysicsTools/PythonAnalysis/examples/MCTruth2.py
Revision: 1.2
Committed: Sat Mar 3 03:49:59 2007 UTC (18 years, 2 months ago) by hegner
Content type: text/x-python
Branch: MAIN
Changes since 1.1: +4 -11 lines
Log Message:
Updated documentation.

File Contents

# User Rev Content
1 hegner 1.2 from PhysicsTools.PythonAnalysis.cmstools import *
2 hegner 1.1 from ROOT import *
3    
4     # prepare the FWLite autoloading mechanism
5     gSystem.Load("libFWCoreFWLite.so")
6     AutoLibraryLoader.enable()
7    
8     # access the event tree
9 hegner 1.2 events = EventTree("generatorOutput.root")
10 hegner 1.1
11 hegner 1.2 # event loop
12 hegner 1.1 for event in events:
13 hegner 1.2 genEvent = event.VtxSmeared.GetEvent()
14 hegner 1.1 print genEvent