|
def | _tool_ (self, interface, typename, name=None, parent=None, create=True) |
|
def | _service_ (self, interface, name, create=True) |
|
def | _init_ (self, name, **args) |
|
def | _initialize_ (self) |
|
def | _initialize_histo_ (self) |
|
def | _initialize_tuple_ (self) |
|
def | _evtSvc (self, location=None) |
|
def | _detSvc (self) |
|
def | _histoSvc (self, address=None) |
|
def | _get (self, location) |
|
def | _getDet (self, location) |
|
def | _get_ (self, location, rootInTES=True) |
|
def | _exist_ (self, location, rootInTES=True) |
|
def | _ntupleSvc (self) |
|
def | _evtcolSvc (self) |
|
def | _finalize_ (self) |
|
def | _success_ (self) |
|
def | _hasProperty_ (self, pname) |
|
def | _getProperty_ (self, pname) |
|
def | _setProperty_ (self, pname, pvalue) |
|
def | _get_attr_ (self, pname) |
|
def | _set_attr_ (self, pname, pvalue) |
|
def | _start_ (self) |
|
def | _execute_ (self) |
|
def | _stop_ (self) |
|
def | _plot1D_ (s, *a) |
|
def | _plot2D_ (s, *a) |
|
def | _plot3D_ (s, *a) |
|
def | _profile1D_ (s, *a) |
|
def | _profile2D_ (s, *a) |
|
def | _decorate_plots_ (klasses) |
|
def | _nTuple_ (s, *a) |
|
def | _evtCol_ (s, *a) |
|
def | _decorate_tuples_ (klasses) |
|
def | _t_nTuple_ (s, *a) |
|
def | _t_ntuple_ (s, *a) |
|
def | _t_valid_ (s, *a) |
|
def | _t_write_ (s, *a) |
|
def | _t_column_ (s, *a) |
|
def | _t_column_ll_ (s, *a) |
|
def | _t_column_ull_ (s, *a) |
|
def | _t_array_ (s, *a) |
|
def | _t_matrix_ (s, *a) |
|
def | _t_farray_ (s, *a) |
|
def | _t_fmatrix_ (s, *a) |
|
def | _decorate_algs_ (klasses) |
|
def | mapvct (func, sequence, ovct=None) |
|
def | _get_all_tools_ (self, method) |
|
def | _Tools_a_ (self) |
|
def | _Tools_t_ (self) |
|
def | _get_counter_ (self, method, name) |
|
def | _Counter_a_ (self, name) |
|
def | _Counter_t_ (self, name) |
|
def | _get_all_histos_ (component, method, name) |
|
def | _Histos_a_ (self, name=None) |
|
def | _Histos_t_ (self, name=None) |
|
def | _help_ () |
|
◆ _Counter_a_()
def GaudiPython.GaudiAlgs._Counter_a_ |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
private |
Retrieve the counter managed GaudiCommon<TYPE> base by name:
>>> alg = ... ## get the algorithm
>>> cnt = alg.Counter('#accept') ## get the counter
>>> print(cnt)
Definition at line 1455 of file GaudiAlgs.py.
1457 Retrieve the counter managed GaudiCommon<TYPE> base by name:
1459 >>> alg = ... ## get the algorithm
1460 >>> cnt = alg.Counter('#accept') ## get the counter
1464 _cmp = getattr(self,
'_ialg')
1466 self.retrieveInterface()
1467 _cmp = getattr(self,
'_ialg')
◆ _Counter_t_()
def GaudiPython.GaudiAlgs._Counter_t_ |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
private |
Retrieve the counter managed GaudiCommon<TYPE> base by name:
>>> tool = ... ## get the tool
>>> cnt = tool.Counter('#accept') ## get the counter
>>> print(cnt)
Definition at line 1474 of file GaudiAlgs.py.
1476 Retrieve the counter managed GaudiCommon<TYPE> base by name:
1478 >>> tool = ... ## get the tool
1479 >>> cnt = tool.Counter('#accept') ## get the counter
1483 _cmp = getattr(self,
'_itool')
1485 self.retrieveInterface()
1486 _cmp = getattr(self,
'_itool')
1493 cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString
1494 cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString
1495 cpp.StatEntity.__repr__ = cpp.StatEntity.toString
1496 cpp.StatEntity.__str__ = cpp.StatEntity.toString
◆ _decorate_algs_()
def GaudiPython.GaudiAlgs._decorate_algs_ |
( |
|
klasses | ) |
|
|
private |
Definition at line 1340 of file GaudiAlgs.py.
1342 if not issubclass(t, list)
and \
1343 not issubclass(t, tuple):
1345 for _alg
in klasses:
1346 for key
in _alg_map_:
1347 setattr(_alg, key, _alg_map_[key])
◆ _decorate_plots_()
def GaudiPython.GaudiAlgs._decorate_plots_ |
( |
|
klasses | ) |
|
|
private |
Definition at line 1115 of file GaudiAlgs.py.
1117 if not issubclass(t, list)
and \
1118 not issubclass(t, tuple):
1120 for klass
in klasses:
1121 klass.plot = _plot1D_
1122 klass.plot1D = _plot1D_
1123 klass.plot2D = _plot2D_
1124 klass.plot3D = _plot3D_
1125 klass.profile1D = _profile1D_
1126 klass.profile2D = _profile2D_
◆ _decorate_tuples_()
def GaudiPython.GaudiAlgs._decorate_tuples_ |
( |
|
klasses | ) |
|
|
private |
Definition at line 1155 of file GaudiAlgs.py.
1157 if not issubclass(t, list)
and \
1158 not issubclass(t, tuple):
1160 for klass
in klasses:
1161 klass.nTuple = _nTuple_
1162 klass.evtCol = _evtCol_
1163 klass.ntupleSvc = _ntupleSvc
1164 klass.tupleSvc = _ntupleSvc
1165 klass.ntupSvc = _ntupleSvc
1166 klass.tupSvc = _ntupleSvc
1167 klass.evtColSvc = _evtcolSvc
1168 klass.evtcolSvc = _evtcolSvc
◆ _detSvc()
def GaudiPython.GaudiAlgs._detSvc |
( |
|
self | ) |
|
|
private |
Trivial helper function to access Detector Data and Event Data Service
Usage:
# get detector data service
svc = self.detSvc()
# get the data
lhcb = self.detSvc('/dd/Structure/LHCb')
Definition at line 361 of file GaudiAlgs.py.
363 Trivial helper function to access Detector Data and Event Data Service
366 # get detector data service
370 lhcb = self.detSvc('/dd/Structure/LHCb')
374 return self._detSvc_[location]
◆ _evtCol_()
def GaudiPython.GaudiAlgs._evtCol_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
Definition at line 1144 of file GaudiAlgs.py.
1146 Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
1148 return TupleAlgDecorator.evtCol(s, *a)
1151 _nTuple_.__doc__ +=
'\n' + TupleAlgDecorator.nTuple.__doc__
1152 _evtCol_.__doc__ +=
'\n' + TupleAlgDecorator.evtCol.__doc__
◆ _evtcolSvc()
def GaudiPython.GaudiAlgs._evtcolSvc |
( |
|
self | ) |
|
|
private |
Trivial function to access Event Collection Service
Definition at line 474 of file GaudiAlgs.py.
476 Trivial function to access Event Collection Service
478 return self._evtcolSvc_
◆ _evtSvc()
def GaudiPython.GaudiAlgs._evtSvc |
( |
|
self, |
|
|
|
location = None |
|
) |
| |
|
private |
Trivial helper function to access Event Data and Event Data Service
Usage:
# get event data service
svc = self.evtSvc()
# get the data
hits = self.evtSvc('MC/Calo/Hits')
Definition at line 325 of file GaudiAlgs.py.
325 def _evtSvc(self, location=None):
327 Trivial helper function to access Event Data and Event Data Service
331 # get event data service
335 hits = self.evtSvc('MC/Calo/Hits')
339 return self._evtSvc_[location]
◆ _execute_()
def GaudiPython.GaudiAlgs._execute_ |
( |
|
self | ) |
|
|
private |
The fictive 'execute' method, which MUST be overwitten by user
Definition at line 959 of file GaudiAlgs.py.
961 The fictive 'execute' method, which MUST be overwitten by user
964 'Execute method is not implemented for %s' % self.name())
967 GaudiAlgo.execute = _execute_
968 HistoAlgo.execute = _execute_
969 TupleAlgo.execute = _execute_
◆ _exist_()
def GaudiPython.GaudiAlgs._exist_ |
( |
|
self, |
|
|
|
location, |
|
|
|
rootInTES = True |
|
) |
| |
|
private |
Check the object in Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour
Definition at line 451 of file GaudiAlgs.py.
451 def _exist_(self, location, rootInTES=True):
453 Check the object in Transient Event Store using GaudiCommon machinery,
454 respecting RootInTES behaviour
456 return AlgDecorator.exist_(self, location, rootInTES)
◆ _finalize_()
def GaudiPython.GaudiAlgs._finalize_ |
( |
|
self | ) |
|
|
private |
The default finalization : finalize the base C++ class
Definition at line 483 of file GaudiAlgs.py.
485 The default finalization : finalize the base C++ class
487 status = self._Base.finalize_(self)
◆ _get()
def GaudiPython.GaudiAlgs._get |
( |
|
self, |
|
|
|
location |
|
) |
| |
|
private |
Trivial function to access the data in TES using the data service
Definition at line 417 of file GaudiAlgs.py.
417 def _get(self, location):
419 Trivial function to access the data in TES using the data service
421 return self._evtSvc_[location]
◆ _get_()
def GaudiPython.GaudiAlgs._get_ |
( |
|
self, |
|
|
|
location, |
|
|
|
rootInTES = True |
|
) |
| |
|
private |
Get the object from Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour
Definition at line 439 of file GaudiAlgs.py.
439 def _get_(self, location, rootInTES=True):
441 Get the object from Transient Event Store using GaudiCommon machinery,
442 respecting RootInTES behaviour
444 return AlgDecorator.get_(self, location, rootInTES)
◆ _get_all_histos_()
def GaudiPython.GaudiAlgs._get_all_histos_ |
( |
|
component, |
|
|
|
method, |
|
|
|
name |
|
) |
| |
|
private |
Get All histogram form the component
Definition at line 1501 of file GaudiAlgs.py.
1503 Get All histogram form the component
1506 for _his
in (
std.vector(
'AIDA::IProfile2D*'),
1513 _fun = getattr(HistoDecorator, method)
1514 _num = _fun(component, _ids, _his)
1515 if _ids.size() != _num
or _his.size() != _num:
1516 raise RuntimeError(
'Unable to extract Histos!')
1517 for _i
in range(0, _num):
1520 _id = _id.numericID()
1522 _id = _id.literalID()
1524 _id = _is.idAsString()
1525 _res[_id] = _his[_i]
1530 id = cpp.GaudiAlg.ID(name)
1531 for i
in (name, id.literalID(), id.numericID(), id.idAsString(), id):
1532 h = _res.get(i,
None)
◆ _get_all_tools_()
def GaudiPython.GaudiAlgs._get_all_tools_ |
( |
|
self, |
|
|
|
method |
|
) |
| |
|
private |
Get all tools
Definition at line 1382 of file GaudiAlgs.py.
1387 _func = getattr(AlgDecorator, method)
1388 _num = _func(self, _tools)
1389 if _tools.size() != _num:
1390 raise RuntimeError(
'Unable to extract Tools')
1392 for _tool
in _tools:
1393 _res += [
iAlgTool(_tool.name(), _tool)]
◆ _get_attr_()
def GaudiPython.GaudiAlgs._get_attr_ |
( |
|
self, |
|
|
|
pname |
|
) |
| |
|
private |
Get the attribute (or property)
- if the attribute name corresponds to the property name, property value is returned
Definition at line 538 of file GaudiAlgs.py.
540 Get the attribute (or property)
541 - if the attribute name corresponds to the property name, property value is returned
543 if self.hasProperty(pname):
544 return self._ialg.__getattr__(pname)
549 return getattr(self._ialg, pname)
550 except AttributeError:
552 raise AttributeError(
'attribute/property %s does not exist' % pname)
◆ _get_counter_()
def GaudiPython.GaudiAlgs._get_counter_ |
( |
|
self, |
|
|
|
method, |
|
|
|
name |
|
) |
| |
|
private |
get the counter
Definition at line 1444 of file GaudiAlgs.py.
1448 _func = getattr(AlgDecorator, method)
1449 return _func(self, name)
◆ _getDet()
def GaudiPython.GaudiAlgs._getDet |
( |
|
self, |
|
|
|
location |
|
) |
| |
|
private |
Trivial function to access the data in TDS using data service
Definition at line 428 of file GaudiAlgs.py.
430 Trivial function to access the data in TDS using data service
432 return self._detSvc_[location]
◆ _getProperty_()
def GaudiPython.GaudiAlgs._getProperty_ |
( |
|
self, |
|
|
|
pname |
|
) |
| |
|
private |
Get the property by name
Definition at line 512 of file GaudiAlgs.py.
514 Get the property by name
516 if not self.hasProperty(pname):
517 raise AttributeError(
'property %s does not exist' % pname)
518 return self._ialg.__getattr__(pname)
◆ _hasProperty_()
def GaudiPython.GaudiAlgs._hasProperty_ |
( |
|
self, |
|
|
|
pname |
|
) |
| |
|
private |
The trivial function which checks the existence of the property with given name
Definition at line 501 of file GaudiAlgs.py.
503 The trivial function which checks the existence of the property with given name
505 return cpp.Gaudi.Utils.hasProperty(self, pname)
◆ _help_()
def GaudiPython.GaudiAlgs._help_ |
( |
| ) |
|
|
private |
Definition at line 1615 of file GaudiAlgs.py.
1616 print(__doc__, __author__)
1617 print(
'\t\t\tDoc-string for class GaudiAlgo \n', GaudiAlgo.__doc__)
1618 print(
'\t\t\tDoc-string for class HistoAlgo \n', HistoAlgo.__doc__)
1619 print(
'\t\t\tDoc-string for class TupleAlgo \n', TupleAlgo.__doc__)
◆ _Histos_a_()
def GaudiPython.GaudiAlgs._Histos_a_ |
( |
|
self, |
|
|
|
name = None |
|
) |
| |
|
private |
Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
>>> alg = ... ## get the algorithm
>>> histos = alg.Histos() ## get all histograms & profiles
>>> for key in histos :
... print(key, histos[key])
Retrive the histogram with the certain ID :
>>> alg = ... ## get the algorithm
>>> histo = alg.Histos('some histo ID') ## get the histo by ID
>>> print(histo)
Definition at line 1542 of file GaudiAlgs.py.
1544 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1546 >>> alg = ... ## get the algorithm
1547 >>> histos = alg.Histos() ## get all histograms & profiles
1548 >>> for key in histos :
1549 ... print(key, histos[key])
1551 Retrive the histogram with the certain ID :
1553 >>> alg = ... ## get the algorithm
1554 >>> histo = alg.Histos('some histo ID') ## get the histo by ID
1558 _cmp = getattr(self,
'_ialg')
1560 self.retrieveInterface()
1561 _cmp = getattr(self,
'_ialg')
◆ _Histos_t_()
def GaudiPython.GaudiAlgs._Histos_t_ |
( |
|
self, |
|
|
|
name = None |
|
) |
| |
|
private |
Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
>>> tool = ... ## get the tool
>>> histos = tool.Histos() ## get all histograms & profiles
>>> for key in histos :
... print(key, histos[key])
Retrive the historgam with certain ID :
>>> tool = ... ## get the tool
>>> histo = tool.Histos('some histo ID') ## get the histo by ID
>>> print(histo)
Definition at line 1568 of file GaudiAlgs.py.
1570 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1572 >>> tool = ... ## get the tool
1573 >>> histos = tool.Histos() ## get all histograms & profiles
1574 >>> for key in histos :
1575 ... print(key, histos[key])
1577 Retrive the historgam with certain ID :
1579 >>> tool = ... ## get the tool
1580 >>> histo = tool.Histos('some histo ID') ## get the histo by ID
1584 _cmp = getattr(self,
'_itool')
1586 self.retrieveInterface()
1587 _cmp = getattr(self,
'_itool')
1593 _Tools_a_.__doc__ +=
'\n' + AlgDecorator._tools_a_.__doc__
1594 _Tools_t_.__doc__ +=
'\n' + AlgDecorator._tools_t_.__doc__
1595 _Counter_a_.__doc__ +=
'\n' + AlgDecorator._counter_a_.__doc__
1596 _Counter_t_.__doc__ +=
'\n' + AlgDecorator._counter_t_.__doc__
1597 _Histos_a_.__doc__ +=
'\n' + HistoDecorator._histos_a_.__doc__
1598 _Histos_t_.__doc__ +=
'\n' + HistoDecorator._histos_t_.__doc__
1600 iAlgorithm.Tools = _Tools_a_
1601 iAlgTool.Tools = _Tools_t_
1602 iAlgorithm.Counter = _Counter_a_
1603 iAlgTool.Counter = _Counter_t_
1604 iAlgorithm.Histos = _Histos_a_
1605 iAlgTool.Histos = _Histos_t_
◆ _histoSvc()
def GaudiPython.GaudiAlgs._histoSvc |
( |
|
self, |
|
|
|
address = None |
|
) |
| |
|
private |
Trivial helper function to access Histogram Data and Histogram Data Service
Usage:
# get histogram data service
svc = self.histoSvc()
# get the data
histo = self.histoSvc('/stat/Calo/1')
Definition at line 396 of file GaudiAlgs.py.
398 Trivial helper function to access Histogram Data and Histogram Data Service
402 # get histogram data service
403 svc = self.histoSvc()
406 histo = self.histoSvc('/stat/Calo/1')
409 return self._histoSvc_
410 return self._histoSvc_[address]
◆ _init_()
def GaudiPython.GaudiAlgs._init_ |
( |
|
self, |
|
|
|
name, |
|
|
** |
args |
|
) |
| |
|
private |
The constructor from unique algorithm instance name & parameters
Definition at line 208 of file GaudiAlgs.py.
208 def _init_(self, name, **args):
210 The constructor from unique algorithm instance name & parameters
212 self._Base.__init__(self, self, name)
214 algMgr = appMgr._algmgr
215 status = algMgr.addAlgorithm(self)
216 if status.isFailure():
217 raise RuntimeError(
'Unable to add Algorithm "' + name +
'"')
220 setattr(self, key, args[key])
222 if 'GaudiPythonAlgos' not in appMgr.__dict__:
223 appMgr.__dict__[
'GaudiPythonAlgos'] = []
224 appMgr.__dict__[
'GaudiPythonAlgos'].append(self)
◆ _initialize_()
def GaudiPython.GaudiAlgs._initialize_ |
( |
|
self | ) |
|
|
private |
The default initialization (initialization of base C++ class + data)
Definition at line 234 of file GaudiAlgs.py.
236 The default initialization (initialization of base C++ class + data)
238 status = self._Base.initialize_(self)
239 if status.isFailure():
243 _e = self._Base.evtSvc(self)
244 _s = InterfaceCast(cpp.IService)(_e)
245 self._evtSvc_ = iDataSvc(_s.name(), _e)
247 _d = self._Base.detSvc(self)
248 _s = InterfaceCast(cpp.IService)(_d)
249 self._detSvc_ = iDataSvc(_s.name(), _d)
◆ _initialize_histo_()
def GaudiPython.GaudiAlgs._initialize_histo_ |
( |
|
self | ) |
|
|
private |
The default initialization (initialization of base C++ class + data members)
Definition at line 261 of file GaudiAlgs.py.
263 The default initialization (initialization of base C++ class + data members)
266 if status.isFailure():
270 _h = self._Base.histoSvc(self)
271 _s = InterfaceCast(cpp.IService)(_h)
272 self._histoSvc_ = iHistogramSvc(_s.name(), _h)
◆ _initialize_tuple_()
def GaudiPython.GaudiAlgs._initialize_tuple_ |
( |
|
self | ) |
|
|
private |
The default initialization (initialization of base C++ class + data members)
Definition at line 284 of file GaudiAlgs.py.
286 The default initialization (initialization of base C++ class + data members)
289 if status.isFailure():
293 if self.produceNTuples():
294 _n = self._Base.ntupleSvc(self)
295 _s = InterfaceCast(cpp.IService)(_n)
296 self._ntupleSvc_ = iNTupleSvc(_s.name(), _n)
298 if self.produceEvtCols():
299 _n = self._Base.evtColSvc(self)
300 _s = InterfaceCast(cpp.IService)(_n)
301 self._evtcolSvc_ = iNTupleSvc(_s.name(), _n)
◆ _nTuple_()
def GaudiPython.GaudiAlgs._nTuple_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Retrieve (book-on-demand) N-Tuple object
Definition at line 1134 of file GaudiAlgs.py.
1136 Retrieve (book-on-demand) N-Tuple object
1138 return TupleAlgDecorator.nTuple(s, *a)
◆ _ntupleSvc()
def GaudiPython.GaudiAlgs._ntupleSvc |
( |
|
self | ) |
|
|
private |
Trivial function to access N-Tuple Service
Definition at line 463 of file GaudiAlgs.py.
465 Trivial function to access N-Tuple Service
467 return self._ntupleSvc_
◆ _plot1D_()
def GaudiPython.GaudiAlgs._plot1D_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
The basic method to fill (book-on-demand) 1D-histogram
The histogram will be created/booked dautomatically according to the
specifications:
- literal or numerical ID (optional)
- title
- low edge
- high edge
- number of bins (default is 100)
The reference to the histogram is returned and could be used for later manipulations
Definition at line 987 of file GaudiAlgs.py.
989 The basic method to fill (book-on-demand) 1D-histogram
991 The histogram will be created/booked dautomatically according to the
994 - literal or numerical ID (optional)
998 - number of bins (default is 100)
1000 The reference to the histogram is returned and could be used for later manipulations
1003 return HistoDecorator.plot1D(s, *a)
◆ _plot2D_()
def GaudiPython.GaudiAlgs._plot2D_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
The basic method to fill (book-on-demand) 2D-histogram
The histogram will be created/booked dautomatically according to the
specifications:
- literal or numerical ID (optional)
- title
- low X-edge
- high X-edge
- low Y-edge
- high Y-edge
- number of X-bins (default is 50)
- number of Y-bins (default is 50)
The reference to the histogram is returned and could be used for later manipulations
Definition at line 1009 of file GaudiAlgs.py.
1011 The basic method to fill (book-on-demand) 2D-histogram
1013 The histogram will be created/booked dautomatically according to the
1016 - literal or numerical ID (optional)
1022 - number of X-bins (default is 50)
1023 - number of Y-bins (default is 50)
1025 The reference to the histogram is returned and could be used for later manipulations
1028 return HistoDecorator.plot2D(s, *a)
◆ _plot3D_()
def GaudiPython.GaudiAlgs._plot3D_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
The basic method to fill (book-on-demand) 3D-histogram
The histogram will be created/booked dautomatically according to the
specifications:
- literal or numerical ID (optional)
- title
- low X-edge
- high X-edge
- low Y-edge
- high Y-edge
- low Z-edge
- high Z-edge
- number of X-bins (default is 10)
- number of Y-bins (default is 10)
- number of Y-bins (default is 10)
The reference to the histogram is returned and could be used for later manipulations
Definition at line 1034 of file GaudiAlgs.py.
1036 The basic method to fill (book-on-demand) 3D-histogram
1038 The histogram will be created/booked dautomatically according to the
1041 - literal or numerical ID (optional)
1049 - number of X-bins (default is 10)
1050 - number of Y-bins (default is 10)
1051 - number of Y-bins (default is 10)
1053 The reference to the histogram is returned and could be used for later manipulations
1056 return HistoDecorator.plot3D(s, *a)
◆ _profile1D_()
def GaudiPython.GaudiAlgs._profile1D_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
The basic method to fill (book-on-demand) 1D profile histogram
The profile histogram will be created/booked dautomatically
according to the specifications:
- literal or numerical ID (optional)
- title
- low X-edge
- high X-edge
- number of X-bins (default is 100)
The reference to the histogram is returned and could be used for later manipulations
Definition at line 1062 of file GaudiAlgs.py.
1064 The basic method to fill (book-on-demand) 1D profile histogram
1066 The profile histogram will be created/booked dautomatically
1067 according to the specifications:
1069 - literal or numerical ID (optional)
1073 - number of X-bins (default is 100)
1075 The reference to the histogram is returned and could be used for later manipulations
1078 return HistoDecorator.profile1D(s, *a)
◆ _profile2D_()
def GaudiPython.GaudiAlgs._profile2D_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
The basic method to fill (book-on-demand) 2D profile histiogram
The profile histogram will be created/booked automatically
according to the specifications:
- literal or numerical ID (optional)
- title
- low X-edge
- high X-edge
- low Y-edge
- high Y-edge
- number of X-bins (default is 50)
- number of Y-bins (default is 50)
The reference to the histogram is returned and could be used for later manipulations
Definition at line 1084 of file GaudiAlgs.py.
1086 The basic method to fill (book-on-demand) 2D profile histiogram
1088 The profile histogram will be created/booked automatically
1089 according to the specifications:
1091 - literal or numerical ID (optional)
1097 - number of X-bins (default is 50)
1098 - number of Y-bins (default is 50)
1100 The reference to the histogram is returned and could be used for later manipulations
1103 return HistoDecorator.profile2D(s, *a)
1108 _plot1D_.__doc__ +=
'\n' + HistoDecorator.plot1D.__doc__
1109 _plot2D_.__doc__ +=
'\n' + HistoDecorator.plot2D.__doc__
1110 _plot3D_.__doc__ +=
'\n' + HistoDecorator.plot3D.__doc__
1111 _profile1D_.__doc__ +=
'\n' + HistoDecorator.profile1D.__doc__
1112 _profile2D_.__doc__ +=
'\n' + HistoDecorator.profile2D.__doc__
◆ _service_()
def GaudiPython.GaudiAlgs._service_ |
( |
|
self, |
|
|
|
interface, |
|
|
|
name, |
|
|
|
create = True |
|
) |
| |
|
private |
Useful method to locate a service:
Usage:
ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
Definition at line 180 of file GaudiAlgs.py.
180 def _service_(self, interface, name, create=True):
182 Useful method to locate a service:
186 ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
190 interface = cpp.IInterface
191 _svc = AlgDecorator.svc_(self, name, create)
194 _svc = InterfaceCast(interface)(_svc)
196 self.Warning(
'Invalid cast to interface %s' % interface)
◆ _set_attr_()
def GaudiPython.GaudiAlgs._set_attr_ |
( |
|
self, |
|
|
|
pname, |
|
|
|
pvalue |
|
) |
| |
|
private |
Set the attribute (or property) :
- if the attribute name corresponds to the property name, the property is updated
Definition at line 559 of file GaudiAlgs.py.
561 Set the attribute (or property) :
562 - if the attribute name corresponds to the property name, the property is updated
564 if not self.hasProperty(pname):
565 self.__dict__[pname] = pvalue
567 self._ialg.__setattr__(pname, pvalue)
◆ _setProperty_()
def GaudiPython.GaudiAlgs._setProperty_ |
( |
|
self, |
|
|
|
pname, |
|
|
|
pvalue |
|
) |
| |
|
private |
Set the property from the value
Definition at line 525 of file GaudiAlgs.py.
527 Set the property from the value
529 if not self.hasProperty(pname):
530 raise AttributeError(
'property %s does not exist' % pname)
531 return self._ialg.__setattr__(pname, pvalue)
◆ _start_()
def GaudiPython.GaudiAlgs._start_ |
( |
|
self | ) |
|
|
private |
The stub 'start' method needed by the internal implementation of PyAlg<>.
Definition at line 946 of file GaudiAlgs.py.
948 The stub 'start' method needed by the internal implementation of PyAlg<>.
954 GaudiAlgo.start = _start_
955 HistoAlgo.start = _start_
956 TupleAlgo.start = _start_
◆ _stop_()
def GaudiPython.GaudiAlgs._stop_ |
( |
|
self | ) |
|
|
private |
The stub 'stop' method needed by the internal implementation of PyAlg<>.
Definition at line 972 of file GaudiAlgs.py.
974 The stub 'stop' method needed by the internal implementation of PyAlg<>.
980 GaudiAlgo.stop = _stop_
981 HistoAlgo.stop = _stop_
982 TupleAlgo.stop = _stop_
◆ _success_()
def GaudiPython.GaudiAlgs._success_ |
( |
|
self | ) |
|
|
private |
◆ _t_array_()
def GaudiPython.GaudiAlgs._t_array_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the fixed-size array column
Definition at line 1263 of file GaudiAlgs.py.
1265 Fill the fixed-size array column
1267 return _Dec.array(s, *a)
◆ _t_column_()
def GaudiPython.GaudiAlgs._t_column_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the certain column to n-tuple
Definition at line 1242 of file GaudiAlgs.py.
1244 Fill the certain column to n-tuple
1246 return _Dec.column(s, *a)
◆ _t_column_ll_()
def GaudiPython.GaudiAlgs._t_column_ll_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the 'long long' column
Definition at line 1249 of file GaudiAlgs.py.
1251 Fill the 'long long' column
1253 return _Dec.column_ll(s, *a)
◆ _t_column_ull_()
def GaudiPython.GaudiAlgs._t_column_ull_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the 'unsigned long long' column
Definition at line 1256 of file GaudiAlgs.py.
1258 Fill the 'unsigned long long' column
1260 return _Dec.column_ull(s, *a)
◆ _t_farray_()
def GaudiPython.GaudiAlgs._t_farray_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the floating-size array column
Definition at line 1277 of file GaudiAlgs.py.
1279 Fill the floating-size array column
1281 return _Dec.farray(s, *a)
◆ _t_fmatrix_()
def GaudiPython.GaudiAlgs._t_fmatrix_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the floating-size matrix column
Definition at line 1284 of file GaudiAlgs.py.
1286 Fill the floating-size matrix column
1288 return _Dec.fmatrix(s, *a)
1291 _t_nTuple_.__doc__ +=
'\n' + _Dec.nTuple.__doc__
1292 _t_ntuple_.__doc__ +=
'\n' + _Dec.ntuple.__doc__
1293 _t_valid_.__doc__ +=
'\n' + _Dec.valid.__doc__
1294 _t_write_.__doc__ +=
'\n' + _Dec.write.__doc__
1295 _t_column_.__doc__ +=
'\n' + _Dec.column.__doc__
1296 _t_column_ll_.__doc__ +=
'\n' + _Dec.column_ll.__doc__
1297 _t_column_ull_.__doc__ +=
'\n' + _Dec.column_ull.__doc__
1298 _t_array_.__doc__ +=
'\n' + _Dec.array.__doc__
1299 _t_matrix_.__doc__ +=
'\n' + _Dec.matrix.__doc__
1300 _t_farray_.__doc__ +=
'\n' + _Dec.farray.__doc__
1301 _t_fmatrix_.__doc__ +=
'\n' + _Dec.fmatrix.__doc__
1303 Tuple.nTuple = _t_nTuple_
1304 Tuple.ntuple = _t_ntuple_
1305 Tuple.valid = _t_valid_
1306 Tuple.write = _t_write_
1307 Tuple.column = _t_column_
1308 Tuple.column_ll = _t_column_ll_
1309 Tuple.column_ull = _t_column_ull_
1310 Tuple.array = _t_array_
1311 Tuple.matrix = _t_matrix_
1312 Tuple.farray = _t_farray_
1313 Tuple.fmatrix = _t_fmatrix_
◆ _t_matrix_()
def GaudiPython.GaudiAlgs._t_matrix_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the fixed-size matrix column
Definition at line 1270 of file GaudiAlgs.py.
1272 Fill the fixed-size matrix column
1274 return _Dec.matrix(s, *a)
◆ _t_nTuple_()
def GaudiPython.GaudiAlgs._t_nTuple_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Access to underlying INTuple object
Definition at line 1214 of file GaudiAlgs.py.
1216 Access to underlying INTuple object
1218 return _Dec.nTuple(s, *a)
◆ _t_ntuple_()
def GaudiPython.GaudiAlgs._t_ntuple_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Access to underlying NTuple::Tuple object
Definition at line 1221 of file GaudiAlgs.py.
1223 Access to underlying NTuple::Tuple object
1225 return _Dec.ntuple(s, *a)
◆ _t_valid_()
def GaudiPython.GaudiAlgs._t_valid_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Valid NTuple::Tuple object?
Definition at line 1228 of file GaudiAlgs.py.
1230 Valid NTuple::Tuple object?
1232 return _Dec.valid(s, *a)
◆ _t_write_()
def GaudiPython.GaudiAlgs._t_write_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Commit the row/record to n-tuple
Definition at line 1235 of file GaudiAlgs.py.
1237 Commit the row/record to n-tuple
1239 return _Dec.write(s, *a)
◆ _tool_()
def GaudiPython.GaudiAlgs._tool_ |
( |
|
self, |
|
|
|
interface, |
|
|
|
typename, |
|
|
|
name = None , |
|
|
|
parent = None , |
|
|
|
create = True |
|
) |
| |
|
private |
Useful method to locate the tool a certain
Usage:
# locate public tool
t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
# locate private tool
t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
# locate public tool with defined name
t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
# locate private tool with defined name
t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
# locate public tool with defined name
t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
# locate private tool with defined name
t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)
Definition at line 129 of file GaudiAlgs.py.
129 def _tool_(self, interface, typename, name=None, parent=None, create=True):
131 Useful method to locate the tool a certain
136 t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
137 # locate private tool
138 t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
139 # locate public tool with defined name
140 t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
141 # locate private tool with defined name
142 t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
143 # locate public tool with defined name
144 t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
145 # locate private tool with defined name
146 t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)
150 interface = cpp.IAlgTool
154 typename +=
'/' + name
155 _tool = AlgDecorator.tool_(self, typename, parent, create)
158 _tool = InterfaceCast(interface)(_tool)
160 self.Warning(
'Invalid cast to interface %s' % interface)
◆ _Tools_a_()
def GaudiPython.GaudiAlgs._Tools_a_ |
( |
|
self | ) |
|
|
private |
Retrieve the list of tools,
aquired by component through GaudiCommon<TYPE> base:
>>> alg = ... ## get the algorithm
>>> tools = alg.Tools() ## get the tools
>>> for tool in tools :
... print(tool)
Definition at line 1400 of file GaudiAlgs.py.
1402 Retrieve the list of tools,
1403 aquired by component through GaudiCommon<TYPE> base:
1405 >>> alg = ... ## get the algorithm
1406 >>> tools = alg.Tools() ## get the tools
1407 >>> for tool in tools :
1411 _cmp = getattr(self,
'_ialg')
1413 self.retrieveInterface()
1414 _cmp = getattr(self,
'_ialg')
◆ _Tools_t_()
def GaudiPython.GaudiAlgs._Tools_t_ |
( |
|
self | ) |
|
|
private |
Retrieve the list of tools,
aquired by component through GaudiCommon<TYPE> base:
>>> tool = ... ## get the tool
>>> tools = tool.Tools() ## get the tools
>>> for t in tools :
... print(t)
Definition at line 1421 of file GaudiAlgs.py.
1423 Retrieve the list of tools,
1424 aquired by component through GaudiCommon<TYPE> base:
1426 >>> tool = ... ## get the tool
1427 >>> tools = tool.Tools() ## get the tools
1428 >>> for t in tools :
1432 _cmp = getattr(self,
'_itool')
1434 self.retrieveInterface()
1435 _cmp = getattr(self,
'_itool')
◆ mapvct()
def GaudiPython.GaudiAlgs.mapvct |
( |
|
func, |
|
|
|
sequence, |
|
|
|
ovct = None |
|
) |
| |
Helper function to fill histogram/ntuple using 'map'-operation
Definition at line 1360 of file GaudiAlgs.py.
1360 def mapvct(func, sequence, ovct=None):
1361 """ Helper function to fill histogram/ntuple using 'map'-operation """
1366 if hasattr(sequence,
'size'):
1367 vct.reserve(vct.size() + sequence.size())
1368 elif hasattr(sequence,
'__len__'):
1369 vct.reserve(vct.size() + len(sequence))
1370 for object
in sequence:
1371 vct.push_back(
func(object))
◆ __all__
tuple GaudiPython.GaudiAlgs.__all__ |
|
private |
◆ __author__
string GaudiPython.GaudiAlgs.__author__ = 'Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr' |
|
private |
◆ _alg_map_
GaudiPython.GaudiAlgs._alg_map_ |
|
private |
◆ _Dec
GaudiPython.GaudiAlgs._Dec |
|
private |
◆ _detSvc_
GaudiPython.GaudiAlgs._detSvc_ |
|
private |
◆ _evtcolSvc_
GaudiPython.GaudiAlgs._evtcolSvc_ |
|
private |
◆ _evtSvc_
GaudiPython.GaudiAlgs._evtSvc_ |
|
private |
◆ _GaudiAlgorithm
GaudiPython.GaudiAlgs._GaudiAlgorithm |
|
private |
◆ _GaudiHistoAlg
GaudiPython.GaudiAlgs._GaudiHistoAlg |
|
private |
◆ _GaudiTupleAlg
GaudiPython.GaudiAlgs._GaudiTupleAlg |
|
private |
◆ _histoSvc_
GaudiPython.GaudiAlgs._histoSvc_ |
|
private |
◆ _ialg
GaudiPython.GaudiAlgs._ialg |
|
private |
◆ _ntupleSvc_
GaudiPython.GaudiAlgs._ntupleSvc_ |
|
private |
◆ AlgDecorator
GaudiPython.GaudiAlgs.AlgDecorator |
◆ column
GaudiPython.GaudiAlgs.column |
◆ HID
GaudiPython.GaudiAlgs.HID |
◆ HistoDecorator
GaudiPython.GaudiAlgs.HistoDecorator |
◆ HistoID
GaudiPython.GaudiAlgs.HistoID |
◆ iAlgorithm
◆ iAlgTool
◆ Matrix
GaudiPython.GaudiAlgs.Matrix |
◆ std
GaudiPython.GaudiAlgs.std |
◆ TID
GaudiPython.GaudiAlgs.TID |
◆ Tuple
GaudiPython.GaudiAlgs.Tuple |
◆ TupleAlgDecorator
GaudiPython.GaudiAlgs.TupleAlgDecorator |
◆ TupleDecorator
GaudiPython.GaudiAlgs.TupleDecorator |
◆ TupleID
GaudiPython.GaudiAlgs.TupleID |
◆ Vector
GaudiPython.GaudiAlgs.Vector |
def _get_all_tools_(self, method)
def _hasProperty_(self, pname)
def _decorate_algs_(klasses)
def _decorate_plots_(klasses)
def mapvct(func, sequence, ovct=None)
def _get_attr_(self, pname)
def _set_attr_(self, pname, pvalue)
def _initialize_histo_(self)
def _Counter_t_(self, name)
def _get_counter_(self, method, name)
def _get_(self, location, rootInTES=True)
def _decorate_tuples_(klasses)
def _Histos_a_(self, name=None)
def _getDet(self, location)
def _Counter_a_(self, name)
def _Histos_t_(self, name=None)
def _t_column_ull_(s, *a)
def _service_(self, interface, name, create=True)
def _exist_(self, location, rootInTES=True)
def _get_all_histos_(component, method, name)
def _initialize_tuple_(self)
def _init_(self, name, **args)
def _setProperty_(self, pname, pvalue)
def _getProperty_(self, pname)
def _histoSvc(self, address=None)
def _evtSvc(self, location=None)
def _tool_(self, interface, typename, name=None, parent=None, create=True)
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.