4@begin_doc_example{python}
5@file iguana_ex_python_00_run_functions.py
6@brief Python version of `iguana_ex_cpp_00_run_functions.cc` (for more details, see this `.cc` file)
15pyiguana.include(
'hipo4/reader.h',
'iguana/algorithms/AlgorithmSequence.h')
17from cppyy.gbl
import hipo, iguana
20inFile = sys.argv[1]
if len(sys.argv)>1
else 'data.hipo'
21numEvents = int(sys.argv[2])
if len(sys.argv)>2
else 3
23reader = hipo.reader(inFile)
24banks = reader.getBanks([
32seq.Add(
'clas12::EventBuilderFilter')
33seq.Add(
'clas12::SectorFinder')
34seq.Add(
'clas12::MomentumCorrection')
37seq.SetOption(
'clas12::EventBuilderFilter',
'log',
'debug')
38seq.SetOption(
'clas12::MomentumCorrection',
'log',
'debug')
40seq.SetOption(
'clas12::EventBuilderFilter',
'pids', [11, 211, -211])
43 print(f
'{"="*30} {message} {"="*30}')
48while(reader.next(banks)
and (numEvents==0
or iEvent < numEvents)):
User-level class for running a sequence of algorithms.
void prettyPrint(std::string header, hipo::bank &bank)
show a bank along with a header