14 from ROOT
import Belle2
16 Makes analysis variables (which can be used in many of the functions defined
17 in :mod:`modularAnalysis`) available to Python.
18 Details can be found in the VariableManager section at https://software.belle2.org/
20 from ROOT
import gSystem
21 gSystem.Load(
'libanalysis.so')
27 def std_vector(*args):
29 Creates an std::vector which can be passed to pyROOT
31 v = ROOT.std.vector(type(args[0]))()
37 def getCommandLineOptions():
38 """ Parses the command line options and returns the corresponding arguments. """
39 parser = argparse.ArgumentParser()
40 parser.add_argument(
'--no-pager', dest=
'pager', default=
True, action=
'store_false',
41 help=
'Use a pager to show output or print to terminal.')
42 args = parser.parse_args()
46 def printVars(changedVariableNames=None):
48 Print list of all available variables.
51 if changedVariableNames:
52 print(changedVariableNames)
53 print(
'Available variables in Variable::Manager:')
54 allVars = variables.getVariables()
57 vars.append((v.group, v.name, v.description))
61 for (group, name, description)
in sorted(vars):
62 if current_group != group:
65 rows.append([name, description])
66 b2utils.pretty_print_description_list(rows)
71 Return all PSNM trigger bit names
77 size = Belle2.TRGSummary.c_ntrgWords * Belle2.TRGSummary.c_trgWordSize
78 return [bits.getoutbitname(i)
for i
in range(size)
if bits.getoutbitname(i) !=
'']
Class to access a DBObjPtr from Python.
static Manager & Instance()
get singleton instance.
static DBStore & Instance()
Instance of a singleton DBStore.