Belle II Software development
printTOPVariables.py
1#!/usr/bin/env python3
2
3
10
11# ---------------------------------------------------------------------
12# Print all available TOP variables
13# usage: basf2 top/examples/printTOPVariables.py
14# ---------------------------------------------------------------------
15
16from variables import variables
17import basf2.utils as b2utils
18from ROOT import gSystem
19
20# load top library
21gSystem.Load('libtop.so')
22
23allVars = variables.getVariables()
24vars = []
25for v in allVars:
26 vars.append((v.group, v.name, v.description))
27
28rows = []
29current_group = ''
30for (group, name, description) in vars:
31 if 'TOP' in group:
32 if current_group != group:
33 current_group = group
34 rows.append([group])
35 rows.append([name, description])
36
37b2utils.pretty_print_description_list(rows)