Belle II Software development
TrgEclQAM.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 != 3:
25 sys.exit("ztsim02.py> # of arg is strange. Exit.")
26if argc == 3:
27 f_in_root = argvs[1]
28 f_out_root = argvs[2]
29
30
31b2.set_log_level(b2.LogLevel.INFO)
32
33main = b2.create_path()
34
35# input
36input = b2.register_module('RootInput')
37input.param('inputFileName', f_in_root)
38main.add_module(input)
39
40
41# Unpacker
42trgeclUnpacker = b2.register_module("TRGECLUnpacker")
43trggdlUnpacker = b2.register_module("TRGGDLUnpacker")
44trggdlsummary = b2.register_module("TRGGDLSummary")
45
46main.add_module(trgeclUnpacker)
47main.add_module(trggdlUnpacker)
48main.add_module(trggdlsummary)
49
50
51# QAM
52trgeclqam = b2.register_module('TRGECLQAM')
53trgeclqam.param('outputFileName', f_out_root)
54main.add_module(trgeclqam)
55
56progress = b2.register_module('Progress')
57main.add_module(progress)
58
59b2.process(main)
60
61print(b2.statistics)