Belle II Software  release-05-01-25
runEventT0DQM.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
20 
21 import os
22 from basf2 import *
23 
24 # main path
25 main = create_path()
26 
27 # read in a sample
28 input_file = 'cdst_hadronEvents.root'
29 main.add_module("RootInput", inputFileName=input_file)
30 
31 # register the HistoManager and specify output file
32 main.add_module("HistoManager", histoFileName="EventT0DQM.root")
33 
34 # run the DQM module
35 eventT0DQMmodule = main.add_module("EventT0DQM")
36 eventT0DQMmodule.set_log_level(LogLevel.INFO) # LogLevel.DEBUG / LogLevel.INFO
37 eventT0DQMmodule.set_debug_level(21)
38 
39 # == Show progress
40 main.add_module('Progress')
41 
42 # Process events
43 process(main)
44 
45 print(statistics)