Belle II Software  release-05-01-25
run_hlt.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 # Usage:
5 # basf2 run_hlt.py -i inputfilename.sroot -o outputfilename.sroot
6 # you can take the output file of rawdata_simulation.py as the input file
7 
8 import basf2
9 
10 from rawdata import add_raw_seqoutput, add_unpackers
11 from softwaretrigger import constants
12 from softwaretrigger.processing import add_hlt_processing
13 
14 # You could use your own components here or just use the default for the HLT (everything except PXD)
15 # e.g. without SVD
16 # components = ["CDC", "ECL", "TOP", "ARICH", "KLM"]
17 # if you leave out the components in all calls, the default will be used
18 components = constants.DEFAULT_HLT_COMPONENTS
19 
20 main_path = basf2.create_path()
21 
22 main_path.add_module("SeqRootInput", inputFileName="hlt_rawdata_simulation.sroot")
23 
24 # adding the HistoManager is important because the add_hlt_processing call
25 # adds DQM modules which will crash, if the HistoManager is not registered
26 main_path.add_module("HistoManager")
27 
28 add_hlt_processing(main_path, store_array_debug_prescale=1, components=components)
29 
30 add_raw_seqoutput(main_path, additionalObjects=["SoftwareTriggerResults", "SoftwareTriggerVariables", "ROIs"])
31 
32 basf2.print_path(main_path)
33 basf2.process(main_path)
34 
35 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25
softwaretrigger.processing
Definition: processing.py:1