Belle II Software development
runTOPTBCComparator.py
1#!/usr/bin/env python3
2
3
10
11# Usage: basf2 runTOPTBCComparator.py calSetList.txt
12
13import basf2 as b2
14import sys
15
16b2.set_log_level(b2.LogLevel.INFO)
17
18# Create path
19main = b2.create_path()
20
21# Set number of events to generate
22eventinfosetter = b2.register_module('EventInfoSetter')
23eventinfosetter.param('evtNumList', [1])
24main.add_module(eventinfosetter)
25
26# Gearbox: access to database (xml files)
27gearbox = b2.register_module('Gearbox')
28argvs = sys.argv
29main.add_module(gearbox)
30
31# Geometry
32geometry = b2.register_module('Geometry')
33geometry.param('useDB', False)
34geometry.param('components', ['TOP'])
35main.add_module(geometry)
36
37# TOP's data quality module
38histo = b2.register_module("HistoManager")
39main.add_module(histo)
40
41# compare
42comparator = b2.register_module('TOPTBCComparator')
43comparator.param('inputDirectorList', sys.argv[1])
44main.add_module(comparator)
45
46# Print progress
47progress = b2.register_module('Progress')
48main.add_module(progress)
49
50# Process events
51b2.process(main)
52
53# Print statistics
54print(b2.statistics)