This page is adapted from https://wiki.physik.uzh.ch/lhcb/gaudi:browsing-dst. This will primarily focus on exploring what is in a DST so that you know

Try this:

>SetupPanoramix (or SetupBender See if the code works with other projects)

>python

Once in Python, do the following:

>>>from LHCbConfig import *

>>>import GaudiPython as gaudi

>>>import gaudigadgets

>>>appMgr = gaudi.AppMgr()

>>>sel = appMgr.evtsel()

>>>sel.open(['PFN:~/path/to/myDSTfile.dst'])

>>>evt = appMgr.evtsvc()

>>>appMgr.run(1)

>>>evt.dump()

>>>evt.ls()


What did we do?
  • We opened python, imporeted some useful modules, then ran AppMgr().
  • After that, we used the the event service (evtsvc)
  • Using this we let appMgr run over 1 event
  • Then we dumped the event information
  • Finally, you can literally ls through the directories to see what's there. For instance, if you are running MC, try

>>>evt.ls('/Event/AllStreams/Phys')

Helpful? Email me if you have any comments.

NB: if you get stuck trying to figure out what's going on, try dir(evt), or just dir() what you don't understand.

-- Main.AdamDavis - 17-Sep-2012
Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2012-09-17 - AdamDavis
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback