Definition at line 53 of file cafana.py.
def cafana.PyCAFAna.__init__ |
( |
|
self, |
|
|
|
cppyy |
|
) |
| |
def cafana.PyCAFAna.__getattr__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
Definition at line 100 of file cafana.py.
101 return getattr(self._cppyy.gbl.ana, name)
def __getattr__(self, name)
def cafana.PyCAFAna.CCut |
( |
|
self, |
|
|
|
body |
|
) |
| |
Construct a new Cut given the C++ body as a string
Definition at line 91 of file cafana.py.
92 '''Construct a new Cut given the C++ body as a string''' 93 cut =
'pycut_'+self._cppyy.gbl.ana.UniqueName()
94 text =
'#include "StandardRecord/Proxy/SRProxy.h"\nbool '+cut+
'_func(const caf::SRProxy* srp){\nconst caf::SRProxy& sr = *srp;\n'+body+
'\n}\nconst ana::Cut '+cut+
'('+cut+
'_func);' 95 self._cppyy.cppdef(text)
96 return getattr(self._cppyy.gbl, cut)
def cafana.PyCAFAna.convert_to_vector |
( |
|
self, |
|
|
|
elems, |
|
|
|
elemtype |
|
) |
| |
Helper function to convert a python list to a std::vector
Definition at line 71 of file cafana.py.
72 '''Helper function to convert a python list to a std::vector''' 73 ret = self._cppyy.gbl.std.vector(elemtype)()
74 for e
in elems: ret.push_back(e)
def convert_to_vector(self, elems, elemtype)
def cafana.PyCAFAna.CVar |
( |
|
self, |
|
|
|
body |
|
) |
| |
Construct a new Var given the C++ body as a string
Definition at line 78 of file cafana.py.
Referenced by cafana.PyCAFAna.SimpleVar().
79 '''Construct a new Var given the C++ body as a string''' 80 var =
'pyvar_'+self._cppyy.gbl.ana.UniqueName()
81 text =
'#include "StandardRecord/Proxy/SRProxy.h"\ndouble '+var+
'_func(const caf::SRProxy* srp){\nconst caf::SRProxy& sr = *srp;\n'+body+
'\n}\nconst ana::Var '+var+
'('+var+
'_func);' 82 self._cppyy.cppdef(text)
83 return getattr(self._cppyy.gbl, var)
def cafana.PyCAFAna.SimpleVar |
( |
|
self, |
|
|
|
name |
|
) |
| |
Equivalent of the SIMPLEVAR() macro
Definition at line 86 of file cafana.py.
References cafana.PyCAFAna.CVar().
87 '''Equivalent of the SIMPLEVAR() macro''' 88 return self.
CVar(
'return sr.'+name+
';')
def SimpleVar(self, name)
The documentation for this class was generated from the following file:
- /cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-01-18/CAFAna/cafana.py