# Set up the path to SModelS installation folder
import sys; sys.path.append("."); import smodels_paths
# Import those parts of smodels that are needed for this exercise
from smodels.theory import lheReader, lheDecomposer, crossSection
from smodels.installation import installDirectory
from smodels.tools import asciiGraph
# Load an input file containing LHE events and start the LHE reader
filename="%s/inputFiles/lhe/gluino_squarks.lhe" % installDirectory()
reader = lheReader.LheReader ( filename )
# Read the next event and generate the corresponding element
event=reader.next()
element=lheDecomposer.elementFromEvent (event)
# Print the corresponding ASCII graph
print (asciiGraph.asciidraw ( element ) )
# Do the same for the next event:
event=reader.next()
element=lheDecomposer.elementFromEvent ( event )
print (asciiGraph.asciidraw ( element ))