|
| getVariable (self, *args) |
|
| getVariables (self, *args) |
|
| addAlias (self, alias, variable) |
|
| printAliases (self) |
|
| clearAliases (self) |
|
| resolveAlias (self, alias) |
|
| addCollection (self, *args) |
|
| getCollection (self, collection) |
|
| resolveCollections (self, *args) |
|
| checkDeprecatedVariable (self, variable) |
|
| evaluate (self, variable, particle) |
|
| evaluateVariables (self, variables, plist) |
|
| getNames (self) |
|
| getAliasNames (self) |
|
| assertValidName (self, variable) |
|
Wrapper around the variable manager class.
This is necessary for avoiding to import ROOT globally when 'variables' is imported.
Definition at line 13 of file __init__.py.
◆ _instance()
Return an instance to the variable manager.
Definition at line 20 of file __init__.py.
20 def _instance(self):
21 '''
22 Return an instance to the variable manager.
23 '''
24
25 import ROOT
26 instance = ROOT.Belle2.Variable.Manager.Instance()
27 return instance
28
◆ addAlias()
addAlias |
( |
| self, |
|
|
| alias, |
|
|
| variable ) |
Wrapper around Manager::addAlias(const std::string& alias, const std::string& variable).
Definition at line 45 of file __init__.py.
45 def addAlias(self, alias, variable):
46 '''
47 Wrapper around Manager::addAlias(const std::string& alias, const std::string& variable).
48 '''
49 instance = PythonVariableManager._instance()
50 if not instance.addAlias(alias, variable):
51 raise RuntimeError(f"Failed to add alias '{alias}' for variable '{variable}'")
52 return alias
53
◆ addCollection()
addCollection |
( |
| self, |
|
|
* | args ) |
Wrapper around Manager::addCollection(const std::string& collection, const std::vector<std::string>& variables)
Definition at line 75 of file __init__.py.
75 def addCollection(self, *args):
76 '''
77 Wrapper around Manager::addCollection(const std::string& collection, const std::vector<std::string>& variables)
78 '''
79 instance = PythonVariableManager._instance()
80 if not instance.addCollection(*args):
81 raise RuntimeError(f"Failed to add collection with args: {args}")
82
◆ assertValidName()
assertValidName |
( |
| self, |
|
|
| variable ) |
Wrapper around Manager::assertValidName(const std::string& name).
Definition at line 132 of file __init__.py.
132 def assertValidName(self, variable):
133 '''
134 Wrapper around Manager::assertValidName(const std::string& name).
135 '''
136 instance = PythonVariableManager._instance()
137 instance.assertValidName(variable)
138
139
◆ checkDeprecatedVariable()
checkDeprecatedVariable |
( |
| self, |
|
|
| variable ) |
Wrapper around Manager::checkDeprecatedVariable(const std::string& name).
Definition at line 97 of file __init__.py.
97 def checkDeprecatedVariable(self, variable):
98 '''
99 Wrapper around Manager::checkDeprecatedVariable(const std::string& name).
100 '''
101 instance = PythonVariableManager._instance()
102 instance.checkDeprecatedVariable(variable)
103
◆ clearAliases()
Wrapper around Manager::clearAliases().
Definition at line 61 of file __init__.py.
61 def clearAliases(self):
62 '''
63 Wrapper around Manager::clearAliases().
64 '''
65 instance = PythonVariableManager._instance()
66 instance.clearAliases()
67
◆ evaluate()
evaluate |
( |
| self, |
|
|
| variable, |
|
|
| particle ) |
Wrapper around Manager::evaluate(const std::string& varName, const Particle* p).
Definition at line 104 of file __init__.py.
104 def evaluate(self, variable, particle):
105 '''
106 Wrapper around Manager::evaluate(const std::string& varName, const Particle* p).
107 '''
108 instance = PythonVariableManager._instance()
109 return instance.evaluate(variable, particle)
110
◆ evaluateVariables()
evaluateVariables |
( |
| self, |
|
|
| variables, |
|
|
| plist ) |
Wrapper around Manager::evaluateVariables(const std::vector<std::string>& varNames, const ParticleList* plist).
Definition at line 111 of file __init__.py.
111 def evaluateVariables(self, variables, plist):
112 '''
113 Wrapper around Manager::evaluateVariables(const std::vector<std::string>& varNames, const ParticleList* plist).
114 '''
115 instance = PythonVariableManager._instance()
116 return instance.evaluateVariables(variables, plist.obj())
117
◆ getAliasNames()
Wrapper around Manager::getAliasNames().
Definition at line 125 of file __init__.py.
125 def getAliasNames(self):
126 '''
127 Wrapper around Manager::getAliasNames().
128 '''
129 instance = PythonVariableManager._instance()
130 return instance.getAliasNames()
131
◆ getCollection()
getCollection |
( |
| self, |
|
|
| collection ) |
Wrapper around Manager::getCollection(const std::string& collection).
Definition at line 83 of file __init__.py.
83 def getCollection(self, collection):
84 '''
85 Wrapper around Manager::getCollection(const std::string& collection).
86 '''
87 instance = PythonVariableManager._instance()
88 return instance.getCollection(collection)
89
◆ getNames()
Wrapper around Manager::getNames().
Definition at line 118 of file __init__.py.
118 def getNames(self):
119 '''
120 Wrapper around Manager::getNames().
121 '''
122 instance = PythonVariableManager._instance()
123 return instance.getNames()
124
◆ getVariable()
getVariable |
( |
| self, |
|
|
* | args ) |
Wrapper around Manager::getVariable(std::string name) and
Manager::getVariable(const std::string& functionName, const std::vector<std::string>& functionArguments).
Definition at line 29 of file __init__.py.
29 def getVariable(self, *args):
30 '''
31 Wrapper around Manager::getVariable(std::string name) and
32 Manager::getVariable(const std::string& functionName, const std::vector<std::string>& functionArguments).
33 '''
34 instance = PythonVariableManager._instance()
35 return instance.getVariable(*args)
36
◆ getVariables()
getVariables |
( |
| self, |
|
|
* | args ) |
Wrapper around Manager::getVariables(const std::vector<std::string>& variables) and
Manager::getVariables().
Definition at line 37 of file __init__.py.
37 def getVariables(self, *args):
38 '''
39 Wrapper around Manager::getVariables(const std::vector<std::string>& variables) and
40 Manager::getVariables().
41 '''
42 instance = PythonVariableManager._instance()
43 return instance.getVariables(*args)
44
◆ printAliases()
Wrapper around Manager::printAliases().
Definition at line 54 of file __init__.py.
54 def printAliases(self):
55 '''
56 Wrapper around Manager::printAliases().
57 '''
58 instance = PythonVariableManager._instance()
59 instance.printAliases()
60
◆ resolveAlias()
resolveAlias |
( |
| self, |
|
|
| alias ) |
Wrapper around Manager::resolveAlias(const std::string& alias).
Definition at line 68 of file __init__.py.
68 def resolveAlias(self, alias):
69 '''
70 Wrapper around Manager::resolveAlias(const std::string& alias).
71 '''
72 instance = PythonVariableManager._instance()
73 return instance.resolveAlias(alias)
74
◆ resolveCollections()
resolveCollections |
( |
| self, |
|
|
* | args ) |
Wrapper around Manager::resolveCollections(const std::vector<std::string>& variables).
Definition at line 90 of file __init__.py.
90 def resolveCollections(self, *args):
91 '''
92 Wrapper around Manager::resolveCollections(const std::vector<std::string>& variables).
93 '''
94 instance = PythonVariableManager._instance()
95 return instance.resolveCollections(*args)
96
The documentation for this class was generated from the following file: