The Gaudi Framework  v38r0 (2143aa4c)
GaudiPartProp.Nodes Namespace Reference

Functions

def _decorate (nodes, opers)
 Decorate the nodes. More...
 

Variables

 __author__
 
 __version__
 
 Decays
 
 std
 
 Gaudi
 
 _decorated
 decorate the nodes More...
 
 opers = Decays.Dict.NodeOps,
 nodes operations More...
 
 iNode
 full list of known nodes More...
 
 Node
 
 Any
 
 Pid
 
 CC
 
 Lepton
 
 Nu
 
 Ell
 
 EllPlus
 
 EllMinus
 
 Hadron
 
 Meson
 
 Baryon
 
 Charged
 
 Positive
 
 Negative
 
 Neutral
 
 HasQuark
 
 JSpin
 
 SSpin
 
 LSpin
 
 Nucleus
 
 Or
 
 And
 
 Not
 
 Invalid
 
 _Node
 
 PosId
 
 NegId
 
 Up
 
 Down
 
 Strange
 
 Charm
 
 Beauty
 
 Bottom
 
 Top
 
 Xu
 
 Xd
 
 Xs
 
 Xc
 
 Xb
 
 Xt
 
 Scalar
 
 Spinor
 
 Vector
 
 Tensor
 
 OneHalf
 
 ThreeHalf
 
 FiveHalf
 
 CTau
 
 LongLived_
 
 LongLived
 
 ShortLived_
 
 ShortLived
 
 Stable
 
 StableCharged
 
 Mass
 
 Light
 
 Heavy
 
 Symbol
 
 NodeList
 

Function Documentation

◆ _decorate()

def GaudiPartProp.Nodes._decorate (   nodes,
  opers 
)
private

Decorate the nodes.

Decorate the functions

Definition at line 45 of file Nodes.py.

45 def _decorate(nodes, opers):
46  """
47  Decorate the functions
48  """
49 
50 
51  if hasattr(opers, "__call__"):
52 
53  def _call_(self, arg):
54  """
55  Evaluate the functor
56 
57  >>> fun = ... # get the functor
58  >>> arg = ... # get the argument
59  >>> res = fun ( arg )
60  """
61  result = opers.__call__(self, arg)
62  return True if result else False
63 
64  _call_.__doc__ = opers.__call__.__doc__
65 
66 
67  if hasattr(opers, "__or__"):
68 
69  def _or_(self, arg):
70  """
71  LOGICAL or
72 
73  >>> fun1 = ... # get the functor
74  >>> fun2 = ... # get the functor
75  >>> fun = fun1 | fun2
76  """
77  return opers.__or__(self, arg)
78 
79  _or_.__doc__ = opers.__or__.__doc__
80 
81 
82  if hasattr(opers, "__ror__"):
83 
84  def _ror_(self, arg):
85  """
86  LOGICAL or
87 
88  >>> fun1 = ... # get the functor
89  >>> fun2 = ... # get the functor
90  >>> fun = fun1 | fun2
91  """
92  return opers.__ror__(self, arg)
93 
94  _or_.__doc__ = opers.__or__.__doc__
95 
96 
97  if hasattr(opers, "__and__"):
98 
99  def _and_(self, arg):
100  """
101  LOGICAL and
102 
103  >>> fun1 = ... # get the functor
104  >>> fun2 = ... # get the functor
105  >>> fun = fun1 & fun2
106  """
107  return opers.__and__(self, arg)
108 
109  _and_.__doc__ = opers.__and__.__doc__
110 
111 
112  if hasattr(opers, "__rand__"):
113 
114  def _rand_(self, arg):
115  """
116  LOGICAL and
117 
118  >>> fun1 = ... # get the functor
119  >>> fun2 = ... # get the functor
120  >>> fun = fun1 & fun2
121  """
122  return opers.__rand__(self, arg)
123 
124  _rand_.__doc__ = opers.__rand__.__doc__
125 
126 
127  if hasattr(opers, "__invert__"):
128 
129  def _invert_(self, *arg):
130  """
131  LOGICAL negation
132 
133  >>> fun1 = ... # get the functor
134  >>> fun = ~fun2
135  """
136  return opers.__invert__(self, *arg)
137 
138  _invert_.__doc__ = opers.__invert__.__doc__
139 
140 
141  if hasattr(opers, "__rshift__"):
142 
143  def _rshift_(self, arg):
144  """
145  Streamers
146 
147  >>> fun1 = ... # get the functor
148  >>> fun1 = ... # get the functor
149  >>> fun = fun1 >> fun2
150  """
151  return opers.__rshift__(self, arg)
152 
153  _rshift_.__doc__ = opers.__rshift__.__doc__
154 
155 
156  if hasattr(opers, "__rrshift__"):
157 
158  def _rrshift_(self, arg):
159  """
160  Evaluate the functor as streametr shift
161 
162  >>> fun = ... # get the functor
163  >>> arg = ... # get the argument
164  >>> res = arg >> fun
165  """
166  result = opers.__rrshift__(self, arg)
167  return True if result else False
168 
169  _rrshift_.__doc__ = opers.__rrshift__.__doc__
170 
171  for node in nodes:
172  if _call_:
173  node.__call__ = _call_
174  if _or_:
175  node.__or__ = _or_
176  if _ror_:
177  node.__ror__ = _ror_
178  if _and_:
179  node.__and__ = _and_
180  if _rand_:
181  node.__rand__ = _rand_
182  if _rshift_:
183  node.__rshift__ = _rshift_
184  if _rrshift_:
185  node.__rrshift__ = _rrshift_
186  if _invert_:
187  node.__invert__ = _invert_
188 
189  node.__repr__ = lambda s: s.toString()
190  node.__str__ = lambda s: s.toString()
191 
192  return nodes
193 
194 

Variable Documentation

◆ __author__

GaudiPartProp.Nodes.__author__
private

Definition at line 24 of file Nodes.py.

◆ __version__

GaudiPartProp.Nodes.__version__
private

Definition at line 25 of file Nodes.py.

◆ _decorated

GaudiPartProp.Nodes._decorated
private

decorate the nodes

Definition at line 196 of file Nodes.py.

◆ _Node

GaudiPartProp.Nodes._Node
private

Definition at line 272 of file Nodes.py.

◆ And

GaudiPartProp.Nodes.And

Definition at line 269 of file Nodes.py.

◆ Any

GaudiPartProp.Nodes.Any

Definition at line 248 of file Nodes.py.

◆ Baryon

GaudiPartProp.Nodes.Baryon

Definition at line 258 of file Nodes.py.

◆ Beauty

GaudiPartProp.Nodes.Beauty

Definition at line 281 of file Nodes.py.

◆ Bottom

GaudiPartProp.Nodes.Bottom

Definition at line 282 of file Nodes.py.

◆ CC

GaudiPartProp.Nodes.CC

Definition at line 250 of file Nodes.py.

◆ Charged

GaudiPartProp.Nodes.Charged

Definition at line 259 of file Nodes.py.

◆ Charm

GaudiPartProp.Nodes.Charm

Definition at line 280 of file Nodes.py.

◆ CTau

GaudiPartProp.Nodes.CTau

Definition at line 302 of file Nodes.py.

◆ Decays

GaudiPartProp.Nodes.Decays

Definition at line 38 of file Nodes.py.

◆ Down

GaudiPartProp.Nodes.Down

Definition at line 278 of file Nodes.py.

◆ Ell

GaudiPartProp.Nodes.Ell

Definition at line 253 of file Nodes.py.

◆ EllMinus

GaudiPartProp.Nodes.EllMinus

Definition at line 255 of file Nodes.py.

◆ EllPlus

GaudiPartProp.Nodes.EllPlus

Definition at line 254 of file Nodes.py.

◆ FiveHalf

GaudiPartProp.Nodes.FiveHalf

Definition at line 300 of file Nodes.py.

◆ Gaudi

GaudiPartProp.Nodes.Gaudi

Definition at line 40 of file Nodes.py.

◆ Hadron

GaudiPartProp.Nodes.Hadron

Definition at line 256 of file Nodes.py.

◆ HasQuark

GaudiPartProp.Nodes.HasQuark

Definition at line 263 of file Nodes.py.

◆ Heavy

GaudiPartProp.Nodes.Heavy

Definition at line 311 of file Nodes.py.

◆ iNode

GaudiPartProp.Nodes.iNode

full list of known nodes

Definition at line 245 of file Nodes.py.

◆ Invalid

GaudiPartProp.Nodes.Invalid

Definition at line 271 of file Nodes.py.

◆ JSpin

GaudiPartProp.Nodes.JSpin

Definition at line 264 of file Nodes.py.

◆ Lepton

GaudiPartProp.Nodes.Lepton

Definition at line 251 of file Nodes.py.

◆ Light

GaudiPartProp.Nodes.Light

Definition at line 310 of file Nodes.py.

◆ LongLived

GaudiPartProp.Nodes.LongLived

Definition at line 304 of file Nodes.py.

◆ LongLived_

GaudiPartProp.Nodes.LongLived_

Definition at line 303 of file Nodes.py.

◆ LSpin

GaudiPartProp.Nodes.LSpin

Definition at line 266 of file Nodes.py.

◆ Mass

GaudiPartProp.Nodes.Mass

Definition at line 309 of file Nodes.py.

◆ Meson

GaudiPartProp.Nodes.Meson

Definition at line 257 of file Nodes.py.

◆ Negative

GaudiPartProp.Nodes.Negative

Definition at line 261 of file Nodes.py.

◆ NegId

GaudiPartProp.Nodes.NegId

Definition at line 275 of file Nodes.py.

◆ Neutral

GaudiPartProp.Nodes.Neutral

Definition at line 262 of file Nodes.py.

◆ Node

GaudiPartProp.Nodes.Node

Definition at line 246 of file Nodes.py.

◆ NodeList

GaudiPartProp.Nodes.NodeList

Definition at line 314 of file Nodes.py.

◆ Not

GaudiPartProp.Nodes.Not

Definition at line 270 of file Nodes.py.

◆ Nu

GaudiPartProp.Nodes.Nu

Definition at line 252 of file Nodes.py.

◆ Nucleus

GaudiPartProp.Nodes.Nucleus

Definition at line 267 of file Nodes.py.

◆ OneHalf

GaudiPartProp.Nodes.OneHalf

Definition at line 298 of file Nodes.py.

◆ opers

GaudiPartProp.Nodes.opers = Decays.Dict.NodeOps,

nodes operations

Definition at line 240 of file Nodes.py.

◆ Or

GaudiPartProp.Nodes.Or

Definition at line 268 of file Nodes.py.

◆ Pid

GaudiPartProp.Nodes.Pid

Definition at line 249 of file Nodes.py.

◆ PosId

GaudiPartProp.Nodes.PosId

Definition at line 274 of file Nodes.py.

◆ Positive

GaudiPartProp.Nodes.Positive

Definition at line 260 of file Nodes.py.

◆ Scalar

GaudiPartProp.Nodes.Scalar

Definition at line 293 of file Nodes.py.

◆ ShortLived

GaudiPartProp.Nodes.ShortLived

Definition at line 306 of file Nodes.py.

◆ ShortLived_

GaudiPartProp.Nodes.ShortLived_

Definition at line 305 of file Nodes.py.

◆ Spinor

GaudiPartProp.Nodes.Spinor

Definition at line 294 of file Nodes.py.

◆ SSpin

GaudiPartProp.Nodes.SSpin

Definition at line 265 of file Nodes.py.

◆ Stable

GaudiPartProp.Nodes.Stable

Definition at line 307 of file Nodes.py.

◆ StableCharged

GaudiPartProp.Nodes.StableCharged

Definition at line 308 of file Nodes.py.

◆ std

GaudiPartProp.Nodes.std

Definition at line 39 of file Nodes.py.

◆ Strange

GaudiPartProp.Nodes.Strange

Definition at line 279 of file Nodes.py.

◆ Symbol

GaudiPartProp.Nodes.Symbol

Definition at line 312 of file Nodes.py.

◆ Tensor

GaudiPartProp.Nodes.Tensor

Definition at line 296 of file Nodes.py.

◆ ThreeHalf

GaudiPartProp.Nodes.ThreeHalf

Definition at line 299 of file Nodes.py.

◆ Top

GaudiPartProp.Nodes.Top

Definition at line 283 of file Nodes.py.

◆ Up

GaudiPartProp.Nodes.Up

Definition at line 277 of file Nodes.py.

◆ Vector

GaudiPartProp.Nodes.Vector

Definition at line 295 of file Nodes.py.

◆ Xb

GaudiPartProp.Nodes.Xb

Definition at line 289 of file Nodes.py.

◆ Xc

GaudiPartProp.Nodes.Xc

Definition at line 288 of file Nodes.py.

◆ Xd

GaudiPartProp.Nodes.Xd

Definition at line 286 of file Nodes.py.

◆ Xs

GaudiPartProp.Nodes.Xs

Definition at line 287 of file Nodes.py.

◆ Xt

GaudiPartProp.Nodes.Xt

Definition at line 291 of file Nodes.py.

◆ Xu

GaudiPartProp.Nodes.Xu

Definition at line 285 of file Nodes.py.

GaudiPartProp.Nodes._decorate
def _decorate(nodes, opers)
Decorate the nodes.
Definition: Nodes.py:45