Example #1
0
_usage = 'usage: %prog [options] binfile'
_synopsis = 'Run the full EEE analysis, from the binary files to the dqm'

# Set up the command-line switches.
from e3pipe.misc.E3OptionParser import E3OptionParser
parser = E3OptionParser(_usage, _synopsis)
parser.add_option('-s',
                  '--suffix',
                  type=str,
                  default=None,
                  dest='suffix',
                  help='a text label to be attached to the output file names')
(opts, args) = parser.parse_args()

# Make sure we are passing some argument.
if not len(args) == 1:
    parser.print_help()
    parser.error('Please provide a single input file.')
rawFilePath = args[0]

# Print the start message.
from e3pipe.__logging__ import startmsg
startmsg()

# Import the necessary stuff.
from e3pipe.tasks.e3recon import e3recon

# And now we are ready to go.
e3recon(rawFilePath, copyFiles=True, suffix=opts.suffix)
Example #2
0
_usage = 'usage: %prog [options]'
_synopsis = 'Single event display for the DST files'


# Set up the command-line switches.
from e3pipe.misc.E3OptionParser import E3OptionParser
parser = E3OptionParser(_usage, _synopsis)
parser.add_option('-r', '--refit', action = 'store_true',
                  default = False, dest = 'refit',
                  help = 're-fit the track points')
(opts, args) = parser.parse_args()

# Print the start message.
from e3pipe.__logging__ import startmsg
startmsg()

# Import the necessary stuff.
from e3pipe.display.E3EventDisplay import E3EventDisplay
import os

# And now we are ready to go.
display = E3EventDisplay(*args)

# Start the event loop.
answer = ''
msg = 'Press q to quit, s to save or type a number...'
event = 0
while answer != 'q':
    display.display(event, refit = opts.refit)
    event += 1