Belle II Software  release-05-02-19
rawdata_simulation.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 # Usage:
5 # basf2 rawdata_simulation.py -o outputfilename.sroot
6 
7 
8 import basf2
9 
10 from simulation import add_simulation
11 from softwaretrigger import constants
12 
13 from rawdata import add_packers
14 
15 # You could use your own components here or just use the default for the HLT (everything except PXD)
16 # e.g. without SVD
17 # components = ["CDC", "ECL", "TOP", "ARICH", "KLM"]
18 # if you leave out the components in all calls, the default will be used
19 components = constants.DEFAULT_HLT_COMPONENTS
20 
21 main_path = basf2.create_path()
22 
23 main_path.add_module("EventInfoSetter", evtNumList=[10])
24 main_path.add_module("EvtGenInput")
25 
26 add_simulation(main_path, components)
27 add_packers(main_path, components=components)
28 
29 main_path.add_module("SeqRootOutput",
30  outputFileName="hlt_rawdata_simulation.sroot",
31  saveObjs=["EventMetaData"] + constants.RAWDATA_OBJECTS)
32 
33 basf2.print_path(main_path)
34 basf2.process(main_path)
35 
36 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25