The Gaudi Framework  master (37c0b60a)
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 46 of file Nodes.py.

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

Variable Documentation

◆ __author__

GaudiPartProp.Nodes.__author__
private

Definition at line 25 of file Nodes.py.

◆ __version__

GaudiPartProp.Nodes.__version__
private

Definition at line 26 of file Nodes.py.

◆ _decorated

GaudiPartProp.Nodes._decorated
private

decorate the nodes

Definition at line 197 of file Nodes.py.

◆ _Node

GaudiPartProp.Nodes._Node
private

Definition at line 273 of file Nodes.py.

◆ And

GaudiPartProp.Nodes.And

Definition at line 270 of file Nodes.py.

◆ Any

GaudiPartProp.Nodes.Any

Definition at line 249 of file Nodes.py.

◆ Baryon

GaudiPartProp.Nodes.Baryon

Definition at line 259 of file Nodes.py.

◆ Beauty

GaudiPartProp.Nodes.Beauty

Definition at line 282 of file Nodes.py.

◆ Bottom

GaudiPartProp.Nodes.Bottom

Definition at line 283 of file Nodes.py.

◆ CC

GaudiPartProp.Nodes.CC

Definition at line 251 of file Nodes.py.

◆ Charged

GaudiPartProp.Nodes.Charged

Definition at line 260 of file Nodes.py.

◆ Charm

GaudiPartProp.Nodes.Charm

Definition at line 281 of file Nodes.py.

◆ CTau

GaudiPartProp.Nodes.CTau

Definition at line 303 of file Nodes.py.

◆ Decays

GaudiPartProp.Nodes.Decays

Definition at line 39 of file Nodes.py.

◆ Down

GaudiPartProp.Nodes.Down

Definition at line 279 of file Nodes.py.

◆ Ell

GaudiPartProp.Nodes.Ell

Definition at line 254 of file Nodes.py.

◆ EllMinus

GaudiPartProp.Nodes.EllMinus

Definition at line 256 of file Nodes.py.

◆ EllPlus

GaudiPartProp.Nodes.EllPlus

Definition at line 255 of file Nodes.py.

◆ FiveHalf

GaudiPartProp.Nodes.FiveHalf

Definition at line 301 of file Nodes.py.

◆ Gaudi

GaudiPartProp.Nodes.Gaudi

Definition at line 41 of file Nodes.py.

◆ Hadron

GaudiPartProp.Nodes.Hadron

Definition at line 257 of file Nodes.py.

◆ HasQuark

GaudiPartProp.Nodes.HasQuark

Definition at line 264 of file Nodes.py.

◆ Heavy

GaudiPartProp.Nodes.Heavy

Definition at line 312 of file Nodes.py.

◆ iNode

GaudiPartProp.Nodes.iNode

full list of known nodes

Definition at line 246 of file Nodes.py.

◆ Invalid

GaudiPartProp.Nodes.Invalid

Definition at line 272 of file Nodes.py.

◆ JSpin

GaudiPartProp.Nodes.JSpin

Definition at line 265 of file Nodes.py.

◆ Lepton

GaudiPartProp.Nodes.Lepton

Definition at line 252 of file Nodes.py.

◆ Light

GaudiPartProp.Nodes.Light

Definition at line 311 of file Nodes.py.

◆ LongLived

GaudiPartProp.Nodes.LongLived

Definition at line 305 of file Nodes.py.

◆ LongLived_

GaudiPartProp.Nodes.LongLived_

Definition at line 304 of file Nodes.py.

◆ LSpin

GaudiPartProp.Nodes.LSpin

Definition at line 267 of file Nodes.py.

◆ Mass

GaudiPartProp.Nodes.Mass

Definition at line 310 of file Nodes.py.

◆ Meson

GaudiPartProp.Nodes.Meson

Definition at line 258 of file Nodes.py.

◆ Negative

GaudiPartProp.Nodes.Negative

Definition at line 262 of file Nodes.py.

◆ NegId

GaudiPartProp.Nodes.NegId

Definition at line 276 of file Nodes.py.

◆ Neutral

GaudiPartProp.Nodes.Neutral

Definition at line 263 of file Nodes.py.

◆ Node

GaudiPartProp.Nodes.Node

Definition at line 247 of file Nodes.py.

◆ NodeList

GaudiPartProp.Nodes.NodeList

Definition at line 315 of file Nodes.py.

◆ Not

GaudiPartProp.Nodes.Not

Definition at line 271 of file Nodes.py.

◆ Nu

GaudiPartProp.Nodes.Nu

Definition at line 253 of file Nodes.py.

◆ Nucleus

GaudiPartProp.Nodes.Nucleus

Definition at line 268 of file Nodes.py.

◆ OneHalf

GaudiPartProp.Nodes.OneHalf

Definition at line 299 of file Nodes.py.

◆ opers

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

nodes operations

Definition at line 241 of file Nodes.py.

◆ Or

GaudiPartProp.Nodes.Or

Definition at line 269 of file Nodes.py.

◆ Pid

GaudiPartProp.Nodes.Pid

Definition at line 250 of file Nodes.py.

◆ PosId

GaudiPartProp.Nodes.PosId

Definition at line 275 of file Nodes.py.

◆ Positive

GaudiPartProp.Nodes.Positive

Definition at line 261 of file Nodes.py.

◆ Scalar

GaudiPartProp.Nodes.Scalar

Definition at line 294 of file Nodes.py.

◆ ShortLived

GaudiPartProp.Nodes.ShortLived

Definition at line 307 of file Nodes.py.

◆ ShortLived_

GaudiPartProp.Nodes.ShortLived_

Definition at line 306 of file Nodes.py.

◆ Spinor

GaudiPartProp.Nodes.Spinor

Definition at line 295 of file Nodes.py.

◆ SSpin

GaudiPartProp.Nodes.SSpin

Definition at line 266 of file Nodes.py.

◆ Stable

GaudiPartProp.Nodes.Stable

Definition at line 308 of file Nodes.py.

◆ StableCharged

GaudiPartProp.Nodes.StableCharged

Definition at line 309 of file Nodes.py.

◆ std

GaudiPartProp.Nodes.std

Definition at line 40 of file Nodes.py.

◆ Strange

GaudiPartProp.Nodes.Strange

Definition at line 280 of file Nodes.py.

◆ Symbol

GaudiPartProp.Nodes.Symbol

Definition at line 313 of file Nodes.py.

◆ Tensor

GaudiPartProp.Nodes.Tensor

Definition at line 297 of file Nodes.py.

◆ ThreeHalf

GaudiPartProp.Nodes.ThreeHalf

Definition at line 300 of file Nodes.py.

◆ Top

GaudiPartProp.Nodes.Top

Definition at line 284 of file Nodes.py.

◆ Up

GaudiPartProp.Nodes.Up

Definition at line 278 of file Nodes.py.

◆ Vector

GaudiPartProp.Nodes.Vector

Definition at line 296 of file Nodes.py.

◆ Xb

GaudiPartProp.Nodes.Xb

Definition at line 290 of file Nodes.py.

◆ Xc

GaudiPartProp.Nodes.Xc

Definition at line 289 of file Nodes.py.

◆ Xd

GaudiPartProp.Nodes.Xd

Definition at line 287 of file Nodes.py.

◆ Xs

GaudiPartProp.Nodes.Xs

Definition at line 288 of file Nodes.py.

◆ Xt

GaudiPartProp.Nodes.Xt

Definition at line 292 of file Nodes.py.

◆ Xu

GaudiPartProp.Nodes.Xu

Definition at line 286 of file Nodes.py.

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