◆ __mapbase_contains__()
def GaudiPython.Pythonizations.__mapbase_contains__ |
( |
|
self, |
|
|
|
key |
|
) |
| |
Check if the certainkey is in the map
>>> m = ... ## the map
>>> if 'a' in m : ... ## chekc the presence of the key in the map
Definition at line 361 of file Pythonizations.py.
363 Check if the certainkey is in the map
365 >>> m = ... ## the map
366 >>> if 'a' in m : ... ## chekc the presence of the key in the map
369 _num = self.count(key)
370 return False if 0 == _num
else True
◆ __mapbase_delitem__()
def GaudiPython.Pythonizations.__mapbase_delitem__ |
( |
|
self, |
|
|
|
key |
|
) |
| |
'Del-item' for MapBase-based maps:
>>> m = ... ## the map
>>> del m[key]
Definition at line 498 of file Pythonizations.py.
500 'Del-item' for MapBase-based maps:
502 >>> m = ... ## the map
506 _erased =
True if key
in self
else False
511 gbl.Gaudi.Utils.MapBase.__len__ =
lambda s: s.size()
512 gbl.Gaudi.Utils.MapBase.__iter__ = __mapbase_iter__
513 gbl.Gaudi.Utils.MapBase.keys = __mapbase_keys__
514 gbl.Gaudi.Utils.MapBase.__iteritems__ = __mapbase_iteritems__
515 gbl.Gaudi.Utils.MapBase.values = __mapbase_values__
516 gbl.Gaudi.Utils.MapBase.__contains__ = __mapbase_contains__
517 gbl.Gaudi.Utils.MapBase.get = __mapbase_get__
518 gbl.Gaudi.Utils.MapBase.__str__ = __mapbase_str__
519 gbl.Gaudi.Utils.MapBase.__repr__ = __mapbase_str__
520 gbl.Gaudi.Utils.MapBase.__setitem__ = __mapbase_setitem__
521 gbl.Gaudi.Utils.MapBase.__delitem__ = __mapbase_delitem__
522 gbl.Gaudi.Utils.MapBase.__getitem__ =
lambda s, key: s.at(key)
◆ __mapbase_get__()
def GaudiPython.Pythonizations.__mapbase_get__ |
( |
|
self, |
|
|
|
key, |
|
|
|
value = None |
|
) |
| |
Get the value for the certain key, or 'value' otherwise
>>> m = ... ## the map
>>> v = m.get ( key , 15 )
Definition at line 394 of file Pythonizations.py.
396 Get the value for the certain key, or 'value' otherwise
398 >>> m = ... ## the map
399 >>> v = m.get ( key , 15 )
◆ __mapbase_items__()
def GaudiPython.Pythonizations.__mapbase_items__ |
( |
|
self | ) |
|
Get the list of items
>>> m = ... ## the map
>>> items = m.keys() ## get the list of items
Definition at line 288 of file Pythonizations.py.
290 Get the list of items
292 >>> m = ... ## the map
293 >>> items = m.keys() ## get the list of items
298 for i
in range(0, _size):
299 _key = self.key_at(i)
300 _value = self.at(_key)
301 _items.append((_key, _value))
◆ __mapbase_iter__()
def GaudiPython.Pythonizations.__mapbase_iter__ |
( |
|
self | ) |
|
The iterator for MapBase-based containers
>>> m = ... ## the map
>>> for key in m : print(key , m[key])
Definition at line 179 of file Pythonizations.py.
181 The iterator for MapBase-based containers
183 >>> m = ... ## the map
184 >>> for key in m : print(key , m[key])
189 while _index < _size:
190 yield self.key_at(_index)
◆ __mapbase_iteritems__()
def GaudiPython.Pythonizations.__mapbase_iteritems__ |
( |
|
self | ) |
|
The iterator for MapBase-based containers
>>> m = ... ## the map
>>> for key,value in m.iteritems() : print(key, value)
Definition at line 217 of file Pythonizations.py.
219 The iterator for MapBase-based containers
221 >>> m = ... ## the map
222 >>> for key,value in m.iteritems() : print(key, value)
227 while _index < _size:
228 _key = self.key_at(_index)
229 yield (_key, self.at(_key))
◆ __mapbase_keys__()
def GaudiPython.Pythonizations.__mapbase_keys__ |
( |
|
self | ) |
|
Get the list of keys
>>> m = ... ## the map
>>> keys = m.keys() ## get the list of keys
Definition at line 253 of file Pythonizations.py.
257 >>> m = ... ## the map
258 >>> keys = m.keys() ## get the list of keys
263 for i
in range(0, _size):
264 _keys.append(self.key_at(i))
◆ __mapbase_setitem__()
def GaudiPython.Pythonizations.__mapbase_setitem__ |
( |
|
self, |
|
|
|
key, |
|
|
|
value |
|
) |
| |
'Set-item' for MapBase-based maps:
>>> m = ... ## the map
>>> m[key] = value ## set the item
Definition at line 464 of file Pythonizations.py.
466 'Set-item' for MapBase-based maps:
468 >>> m = ... ## the map
469 >>> m[key] = value ## set the item
472 _replaced =
True if key
in self
else False
473 self.update(key, value)
◆ __mapbase_str__()
def GaudiPython.Pythonizations.__mapbase_str__ |
( |
|
self | ) |
|
Representation of MapBase-based maps:
>>> m = ... ## the map
>>> print(map)
Definition at line 424 of file Pythonizations.py.
426 Representation of MapBase-based maps:
428 >>> m = ... ## the map
434 for i
in range(0, _size):
435 _key = self.key_at(i)
439 _result +=
" %s : %s " % (str(_key), str(_val))
◆ __mapbase_values__()
def GaudiPython.Pythonizations.__mapbase_values__ |
( |
|
self | ) |
|
Get the list of values
>>> m = ... ## the map
>>> values = m.values() ## get the list of values
Definition at line 325 of file Pythonizations.py.
327 Get the list of values
329 >>> m = ... ## the map
330 >>> values = m.values() ## get the list of values
335 for i
in range(0, _size):
336 _value = self.value_at(i)
337 _values.append(_value)
◆ _container__getitem__()
def GaudiPython.Pythonizations._container__getitem__ |
( |
|
self, |
|
|
|
k |
|
) |
| |
|
private |
◆ _container__iter__()
def GaudiPython.Pythonizations._container__iter__ |
( |
|
self | ) |
|
|
private |
Definition at line 87 of file Pythonizations.py.
88 if hasattr(self,
'containedObjects'):
89 sequential = self.containedObjects()
93 limit = self.__len__()
95 yield sequential.__getitem__(count)
◆ _container__len__()
def GaudiPython.Pythonizations._container__len__ |
( |
|
self | ) |
|
|
private |
◆ _contentsHisto1D()
def GaudiPython.Pythonizations._contentsHisto1D |
( |
|
h | ) |
|
|
private |
◆ _draw_aida_()
def GaudiPython.Pythonizations._draw_aida_ |
( |
|
self, |
|
|
* |
args |
|
) |
| |
|
private |
Draw AIDA histogram (through access to internal ROOT histogram
>>> aida = ... # get the historgam
>>> aida.Draw()
Definition at line 99 of file Pythonizations.py.
101 Draw AIDA histogram (through access to internal ROOT histogram
103 >>> aida = ... # get the historgam
107 _fun = gbl.Gaudi.Utils.Aida2ROOT.aida2root
109 return _root.Draw(*args)
112 gbl.AIDA.IHistogram1D.__str__ = _printHisto1D
113 gbl.AIDA.IHistogram1D.contents = _contentsHisto1D
114 gbl.AIDA.IHistogram2D.__str__ = _printHisto2D
◆ _printBitReference()
def GaudiPython.Pythonizations._printBitReference |
( |
|
b | ) |
|
|
private |
◆ _printFillStream()
def GaudiPython.Pythonizations._printFillStream |
( |
|
o | ) |
|
|
private |
Definition at line 65 of file Pythonizations.py.
67 s = gbl.stringstream()
71 out = o.__class__.__name__ +
' object'
72 if hasattr(o,
'hasKey')
and o.hasKey():
73 out +=
' key = ' + str(o.key())
75 out = o.__class__.__name__ +
' NULL object'
◆ _printHisto1D()
def GaudiPython.Pythonizations._printHisto1D |
( |
|
h | ) |
|
|
private |
Definition at line 36 of file Pythonizations.py.
38 return 'Histogram 1D "%s" %d bins [%f,%f]' % (h.title(), x.bins(),
39 x.lowerEdge(), x.upperEdge())
◆ _printHisto2D()
def GaudiPython.Pythonizations._printHisto2D |
( |
|
h | ) |
|
|
private |
Definition at line 47 of file Pythonizations.py.
48 x, y = h.xAxis(), h.yAxis()
49 return 'Histogram 2D "%s" %d xbins [%f,%f], %d ybins [%f,%f]' % \
50 (h.title(), x.bins(), x.lowerEdge(), x.upperEdge(),
51 y.bins(), y.lowerEdge(), y.upperEdge())
◆ _printStatusCode()
def GaudiPython.Pythonizations._printStatusCode |
( |
|
s | ) |
|
|
private |
◆ __getitem__
GaudiPython.Pythonizations.__getitem__ |
|
private |
◆ __iter__
GaudiPython.Pythonizations.__iter__ |
|
private |
◆ __len__
GaudiPython.Pythonizations.__len__ |
|
private |
◆ __repr__
GaudiPython.Pythonizations.__repr__ |
|
private |
◆ _eq
GaudiPython.Pythonizations._eq |
|
private |
◆ _execute_orig
GaudiPython.Pythonizations._execute_orig |
|
private |
◆ _ne
GaudiPython.Pythonizations._ne |
|
private |
◆ ctx
GaudiPython.Pythonizations.ctx |
◆ Draw
GaudiPython.Pythonizations.Draw |
◆ execute
GaudiPython.Pythonizations.execute |
◆ executeEvent
GaudiPython.Pythonizations.executeEvent |
Helpers for re-entrant interfaces.
GaudiPython is inherently single threaded and it's unpractical to use the new re-entrant interfaces. Moreover a lot of existing code (like GaudiMP) expects the old signatures.
Definition at line 562 of file Pythonizations.py.
◆ FAILURE
GaudiPython.Pythonizations.FAILURE |
◆ filterPassed
GaudiPython.Pythonizations.filterPassed |
◆ has_key
GaudiPython.Pythonizations.has_key |
◆ invalidate
GaudiPython.Pythonizations.invalidate |
◆ isExecuted
GaudiPython.Pythonizations.isExecuted |
◆ items
GaudiPython.Pythonizations.items |
◆ iteritems
GaudiPython.Pythonizations.iteritems |
◆ plot
GaudiPython.Pythonizations.plot |
◆ self
GaudiPython.Pythonizations.self |
◆ SUCCESS
GaudiPython.Pythonizations.SUCCESS |
◆ update
GaudiPython.Pythonizations.update |
def __mapbase_keys__(self)
def _printBitReference(b)
struct GAUDI_API map
Parametrisation class for map-like implementation.
def _draw_aida_(self, *args)
def __mapbase_iter__(self)
def __mapbase_items__(self)
def _container__getitem__(self, k)
def __mapbase_str__(self)
def __mapbase_values__(self)
def __mapbase_setitem__(self, key, value)
def __mapbase_delitem__(self, key)
def __mapbase_iteritems__(self)
def __mapbase_get__(self, key, value=None)
def __mapbase_contains__(self, key)
def _container__len__(self)
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
def _container__iter__(self)