HPS-MC
lcio_count_job.py
Go to the documentation of this file.
1 """!
2 @file lcio_count_job.py
3 
4 Job to count number of events in LCIO file.
5 """
6 from hpsmc.tools import LCIOCount
7 
8 job.description = 'LCIO count'
9 
10 output_files = sorted(job.output_files.keys())
11 if len(output_files) < 1:
12  raise Exception("Not enough output files were provided (at least 1 required).")
13 
14 nevents = job.params['nevents']
15 
16 count = LCIOCount(minevents=nevents, inputs=output_files)
17 
18 job.add([count])
Count events in LCIO files.
Definition: tools.py:1487
Tools that can be used in HPSMC jobs.
Definition: tools.py:1