Belle II Software development
TrgEclDQM.py
1#!/usr/bin/env python3
2
3
10
11# -----------------------------------------------------------------------------------
12#
13# Example of ECL trigger DQM Module
14#
15# usage : %> basf2 TrgEclDQM.py [input sroot file name]
16#
17# -----------------------------------------------------------------------------------
18
19import basf2 as b2
20
21import sys # get argv
22argvs = sys.argv # get arg
23argc = len(argvs) # of arg
24if argc != 2:
25 sys.exit("ztsim02.py> # of arg is strange. Exit.")
26if argc == 2:
27 f_in_root = argvs[1]
28
29
30b2.set_log_level(b2.LogLevel.INFO)
31
32main = b2.create_path()
33
34# input
35input = b2.register_module('RootInput')
36input.param('inputFileName', f_in_root)
37main.add_module(input)
38
39histo = b2.register_module('HistoManager')
40histo.param("histoFileName", "./histo_output.root")
41
42# Unpacker
43trgeclUnpacker = b2.register_module("TRGECLUnpacker")
44main.add_module(trgeclUnpacker)
45main.add_module(histo)
46
47# DQM
48trgecldqm = b2.register_module('TRGECLDQM')
49main.add_module(trgecldqm)
50
51progress = b2.register_module('Progress')
52main.add_module(progress)
53
54b2.process(main)
55
56print(b2.statistics)