ATLAS Offline Software
example_evgenanalysis.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
2 
3 include("EvgenProdTools/StdAnalysisSetup.py")
4 
5 class MyAna(EvgenAnalysisAlg):
6 
7  def __init__(self, name="MyAna"):
8  super(MyAna, self).__init__(name=name)
9 
10  def execute(self):
11  evtcoll = self.evtStore[self.McEventKey]
12  evt = evtcoll[0]
13  #evt.weights().push_back(3.142)
14  print evt.particles_size(), ":", [w for w in evt.weights()]
15  return StatusCode.Success
16 
17 
18 svcMgr.EventSelector.InputCollections = ["mc.evnt.pool.root"]
19 topSeq += MyAna()
example_evgenanalysis.MyAna
Definition: example_evgenanalysis.py:5
python.Include.include
include
Definition: Include.py:318
example_evgenanalysis.MyAna.__init__
def __init__(self, name="MyAna")
Definition: example_evgenanalysis.py:7
example_evgenanalysis.MyAna.execute
def execute(self)
Definition: example_evgenanalysis.py:10