Exemple #1
0
def main():
    # Run as follows: batch.py [list of files] or batch.py *

    for i in range( 1, len(sys.argv) ):
        input_name = sys.argv[i]
        # only process root files
        if input_name.endswith('.root'):
            output_name = input_name.replace('.root','_simplified.root')
            full_simplify.main( input_name, output_name )

    # Clean up this directory a bit
    os.system('rm -rf Auto* __pycache__ good_blocks_of_data.temp');
Exemple #2
0
def main():
    # Run as: master.py [list of files]
    
    # First, make sure ALL of the programs are compiled
    programs = ['./gate_builder', './gate_builder_organize', './charge_balance']
    if False in [os.path.isfile(x) for x in programs]:
        print('Cannot locate all files')
        return None

    for fname in sys.argv:
        if fname.endswith('.root'):
            output_name = fname.replace('.root', '_simplified.root')
            full_simplify.main( fname, output_name )
            for exe in programs:
                print('running', exe, 'on', output_name)
                os.system(exe+' '+output_name + ' 2>/dev/null')