Loading [MathJax]/extensions/tex2jax.js
◆ __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 378 of file Pythonizations.py.
380 Check if the certainkey is in the map
382 >>> m = ... ## the map
383 >>> if 'a' in m : ... ## chekc the presence of the key in the map
386 _num = self.count(key)
387 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 515 of file Pythonizations.py.
517 'Del-item' for MapBase-based maps:
519 >>> m = ... ## the map
523 _erased =
True if key
in self
else False
528 gbl.Gaudi.Utils.MapBase.__len__ =
lambda s: s.size()
529 gbl.Gaudi.Utils.MapBase.__iter__ = __mapbase_iter__
530 gbl.Gaudi.Utils.MapBase.keys = __mapbase_keys__
531 gbl.Gaudi.Utils.MapBase.__iteritems__ = __mapbase_iteritems__
532 gbl.Gaudi.Utils.MapBase.values = __mapbase_values__
533 gbl.Gaudi.Utils.MapBase.__contains__ = __mapbase_contains__
534 gbl.Gaudi.Utils.MapBase.get = __mapbase_get__
535 gbl.Gaudi.Utils.MapBase.__str__ = __mapbase_str__
536 gbl.Gaudi.Utils.MapBase.__repr__ = __mapbase_str__
537 gbl.Gaudi.Utils.MapBase.__setitem__ = __mapbase_setitem__
538 gbl.Gaudi.Utils.MapBase.__delitem__ = __mapbase_delitem__
539 gbl.Gaudi.Utils.MapBase.__getitem__ =
lambda s, key: s.at(key)
540 gbl.Gaudi.Utils.MapBase.items = __mapbase_iteritems__
◆ __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 411 of file Pythonizations.py.
413 Get the value for the certain key, or 'value' otherwise
415 >>> m = ... ## the map
416 >>> 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 305 of file Pythonizations.py.
307 Get the list of items
309 >>> m = ... ## the map
310 >>> items = m.keys() ## get the list of items
315 for i
in range(0, _size):
316 _key = self.key_at(i)
317 _value = self.at(_key)
318 _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 196 of file Pythonizations.py.
198 The iterator for MapBase-based containers
200 >>> m = ... ## the map
201 >>> for key in m : print(key , m[key])
206 while _index < _size:
207 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 234 of file Pythonizations.py.
236 The iterator for MapBase-based containers
238 >>> m = ... ## the map
239 >>> for key,value in m.iteritems() : print(key, value)
244 while _index < _size:
245 _key = self.key_at(_index)
246 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 270 of file Pythonizations.py.
274 >>> m = ... ## the map
275 >>> keys = m.keys() ## get the list of keys
280 for i
in range(0, _size):
281 _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 481 of file Pythonizations.py.
483 'Set-item' for MapBase-based maps:
485 >>> m = ... ## the map
486 >>> m[key] = value ## set the item
489 _replaced =
True if key
in self
else False
490 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 441 of file Pythonizations.py.
443 Representation of MapBase-based maps:
445 >>> m = ... ## the map
451 for i
in range(0, _size):
452 _key = self.key_at(i)
456 _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 342 of file Pythonizations.py.
344 Get the list of values
346 >>> m = ... ## the map
347 >>> values = m.values() ## get the list of values
352 for i
in range(0, _size):
353 _value = self.value_at(i)
354 _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 95 of file Pythonizations.py.
96 if hasattr(self,
"containedObjects"):
97 sequential = self.containedObjects()
101 limit = self.__len__()
103 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 107 of file Pythonizations.py.
109 Draw AIDA histogram (through access to internal ROOT histogram
111 >>> aida = ... # get the historgam
115 _fun = gbl.Gaudi.Utils.Aida2ROOT.aida2root
117 return _root.Draw(*args)
120 gbl.AIDA.IHistogram1D.__str__ = _printHisto1D
121 gbl.AIDA.IHistogram1D.contents = _contentsHisto1D
122 gbl.AIDA.IHistogram2D.__str__ = _printHisto2D
◆ _printBitReference()
def GaudiPython.Pythonizations._printBitReference |
( |
|
b | ) |
|
|
private |
◆ _printFillStream()
def GaudiPython.Pythonizations._printFillStream |
( |
|
o | ) |
|
|
private |
Definition at line 73 of file Pythonizations.py.
75 s = gbl.stringstream()
79 out = o.__class__.__name__ +
" object"
80 if hasattr(o,
"hasKey")
and o.hasKey():
81 out +=
" key = " + str(o.key())
83 out = o.__class__.__name__ +
" NULL object"
◆ _printHisto1D()
def GaudiPython.Pythonizations._printHisto1D |
( |
|
h | ) |
|
|
private |
Definition at line 34 of file Pythonizations.py.
36 return 'Histogram 1D "%s" %d bins [%f,%f]' % (
◆ _printHisto2D()
def GaudiPython.Pythonizations._printHisto2D |
( |
|
h | ) |
|
|
private |
Definition at line 49 of file Pythonizations.py.
50 x, y = h.xAxis(), h.yAxis()
51 return 'Histogram 2D "%s" %d xbins [%f,%f], %d ybins [%f,%f]' % (
◆ _printStatusCode()
def GaudiPython.Pythonizations._printStatusCode |
( |
|
s | ) |
|
|
private |
◆ __all__
GaudiPython.Pythonizations.__all__ |
|
private |
(c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".
# # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. #
File: GaudiPython/Pythonizations.py Author: Pere Mato (pere..nosp@m.mato.nosp@m.@cern.nosp@m..ch)
Definition at line 17 of file Pythonizations.py.
◆ __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 574 of file Pythonizations.py.
◆ FAILURE
GaudiPython.Pythonizations.FAILURE |
◆ filterPassed
GaudiPython.Pythonizations.filterPassed |
◆ invalidate
GaudiPython.Pythonizations.invalidate |
◆ isExecuted
GaudiPython.Pythonizations.isExecuted |
◆ 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)