|
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, location=None) |
|
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 GaudiAlg.Algs._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 1454 of file Algs.py.
1456 Retrieve the counter managed GaudiCommon<TYPE> base by name:
1458 >>> alg = ... ## get the algorithm
1459 >>> cnt = alg.Counter('#accept') ## get the counter
1463 _cmp = getattr(self,
"_ialg")
1465 self.retrieveInterface()
1466 _cmp = getattr(self,
"_ialg")
◆ _Counter_t_()
def GaudiAlg.Algs._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 1473 of file Algs.py.
1475 Retrieve the counter managed GaudiCommon<TYPE> base by name:
1477 >>> tool = ... ## get the tool
1478 >>> cnt = tool.Counter('#accept') ## get the counter
1482 _cmp = getattr(self,
"_itool")
1484 self.retrieveInterface()
1485 _cmp = getattr(self,
"_itool")
1492 cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString
1493 cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString
1494 cpp.StatEntity.__repr__ = cpp.StatEntity.toString
1495 cpp.StatEntity.__str__ = cpp.StatEntity.toString
◆ _decorate_algs_()
def GaudiAlg.Algs._decorate_algs_ |
( |
|
klasses | ) |
|
|
private |
Definition at line 1340 of file Algs.py.
1342 if not issubclass(t, list)
and not issubclass(t, tuple):
1344 for _alg
in klasses:
1345 for key
in _alg_map_:
1346 setattr(_alg, key, _alg_map_[key])
◆ _decorate_plots_()
def GaudiAlg.Algs._decorate_plots_ |
( |
|
klasses | ) |
|
|
private |
Definition at line 1115 of file Algs.py.
1117 if not issubclass(t, list)
and not issubclass(t, tuple):
1119 for klass
in klasses:
1120 klass.plot = _plot1D_
1121 klass.plot1D = _plot1D_
1122 klass.plot2D = _plot2D_
1123 klass.plot3D = _plot3D_
1124 klass.profile1D = _profile1D_
1125 klass.profile2D = _profile2D_
◆ _decorate_tuples_()
def GaudiAlg.Algs._decorate_tuples_ |
( |
|
klasses | ) |
|
|
private |
Definition at line 1154 of file Algs.py.
1156 if not issubclass(t, list)
and not issubclass(t, tuple):
1158 for klass
in klasses:
1159 klass.nTuple = _nTuple_
1160 klass.evtCol = _evtCol_
1161 klass.ntupleSvc = _ntupleSvc
1162 klass.tupleSvc = _ntupleSvc
1163 klass.ntupSvc = _ntupleSvc
1164 klass.tupSvc = _ntupleSvc
1165 klass.evtColSvc = _evtcolSvc
1166 klass.evtcolSvc = _evtcolSvc
◆ _detSvc()
def GaudiAlg.Algs._detSvc |
( |
|
self, |
|
|
|
location = None |
|
) |
| |
|
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 359 of file Algs.py.
359 def _detSvc(self, location=None):
361 Trivial helper function to access Detector Data and Event Data Service
364 # get detector data service
368 lhcb = self.detSvc('/dd/Structure/LHCb')
372 return self._detSvc_[location]
◆ _evtCol_()
def GaudiAlg.Algs._evtCol_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
Definition at line 1143 of file Algs.py.
1145 Retrieve (book-on-demand) N-Tuple object for Event Tag Collections
1147 return TupleAlgDecorator.evtCol(s, *a)
1150 _nTuple_.__doc__ +=
"\n" + TupleAlgDecorator.nTuple.__doc__
1151 _evtCol_.__doc__ +=
"\n" + TupleAlgDecorator.evtCol.__doc__
◆ _evtcolSvc()
def GaudiAlg.Algs._evtcolSvc |
( |
|
self | ) |
|
|
private |
Trivial function to access Event Collection Service
Definition at line 472 of file Algs.py.
474 Trivial function to access Event Collection Service
476 return self._evtcolSvc_
◆ _evtSvc()
def GaudiAlg.Algs._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 323 of file Algs.py.
323 def _evtSvc(self, location=None):
325 Trivial helper function to access Event Data and Event Data Service
329 # get event data service
333 hits = self.evtSvc('MC/Calo/Hits')
337 return self._evtSvc_[location]
◆ _execute_()
def GaudiAlg.Algs._execute_ |
( |
|
self | ) |
|
|
private |
The fictive 'execute' method, which MUST be overwitten by user
Definition at line 960 of file Algs.py.
962 The fictive 'execute' method, which MUST be overwitten by user
964 raise RuntimeError(
"Execute method is not implemented for %s" % self.name())
967 GaudiAlgo.execute = _execute_
968 HistoAlgo.execute = _execute_
969 TupleAlgo.execute = _execute_
◆ _exist_()
def GaudiAlg.Algs._exist_ |
( |
|
self, |
|
|
|
location, |
|
|
|
rootInTES = True |
|
) |
| |
|
private |
Check the object in Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour
Definition at line 449 of file Algs.py.
449 def _exist_(self, location, rootInTES=True):
451 Check the object in Transient Event Store using GaudiCommon machinery,
452 respecting RootInTES behaviour
454 return AlgDecorator.exist_(self, location, rootInTES)
◆ _finalize_()
def GaudiAlg.Algs._finalize_ |
( |
|
self | ) |
|
|
private |
The default finalization : finalize the base C++ class
Definition at line 481 of file Algs.py.
483 The default finalization : finalize the base C++ class
485 status = self._Base.finalize_(self)
◆ _get()
def GaudiAlg.Algs._get |
( |
|
self, |
|
|
|
location |
|
) |
| |
|
private |
Trivial function to access the data in TES using the data service
Definition at line 415 of file Algs.py.
415 def _get(self, location):
417 Trivial function to access the data in TES using the data service
419 return self._evtSvc_[location]
◆ _get_()
def GaudiAlg.Algs._get_ |
( |
|
self, |
|
|
|
location, |
|
|
|
rootInTES = True |
|
) |
| |
|
private |
Get the object from Transient Event Store using GaudiCommon machinery,
respecting RootInTES behaviour
Definition at line 437 of file Algs.py.
437 def _get_(self, location, rootInTES=True):
439 Get the object from Transient Event Store using GaudiCommon machinery,
440 respecting RootInTES behaviour
442 return AlgDecorator.get_(self, location, rootInTES)
◆ _get_all_histos_()
def GaudiAlg.Algs._get_all_histos_ |
( |
|
component, |
|
|
|
method, |
|
|
|
name |
|
) |
| |
|
private |
Get All histogram form the component
Definition at line 1500 of file Algs.py.
1502 Get All histogram form the component
1514 _fun = getattr(HistoDecorator, method)
1515 _num = _fun(component, _ids, _his)
1516 if _ids.size() != _num
or _his.size() != _num:
1517 raise RuntimeError(
"Unable to extract Histos!")
1518 for _i
in range(0, _num):
1521 _id = _id.numericID()
1523 _id = _id.literalID()
1525 _id = _id.idAsString()
1526 _res[_id] = _his[_i]
1531 id = cpp.GaudiAlg.ID(name)
1532 for i
in (name, id.literalID(), id.numericID(), id.idAsString(), id):
1533 h = _res.get(i,
None)
◆ _get_all_tools_()
def GaudiAlg.Algs._get_all_tools_ |
( |
|
self, |
|
|
|
method |
|
) |
| |
|
private |
Get all tools
Definition at line 1381 of file Algs.py.
1386 _func = getattr(AlgDecorator, method)
1387 _num = _func(self, _tools)
1388 if _tools.size() != _num:
1389 raise RuntimeError(
"Unable to extract Tools")
1391 for _tool
in _tools:
1392 _res += [
iAlgTool(_tool.name(), _tool)]
◆ _get_attr_()
def GaudiAlg.Algs._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 536 of file Algs.py.
538 Get the attribute (or property)
539 - if the attribute name corresponds to the property name, property value is returned
541 if self.hasProperty(pname):
547 return getattr(self._ialg, pname)
548 except AttributeError:
550 raise AttributeError(
"attribute/property %s does not exist" % pname)
◆ _get_counter_()
def GaudiAlg.Algs._get_counter_ |
( |
|
self, |
|
|
|
method, |
|
|
|
name |
|
) |
| |
|
private |
get the counter
Definition at line 1443 of file Algs.py.
1447 _func = getattr(AlgDecorator, method)
1448 return _func(self, name)
◆ _getDet()
def GaudiAlg.Algs._getDet |
( |
|
self, |
|
|
|
location |
|
) |
| |
|
private |
Trivial function to access the data in TDS using data service
Definition at line 426 of file Algs.py.
428 Trivial function to access the data in TDS using data service
430 return self._detSvc_[location]
◆ _getProperty_()
def GaudiAlg.Algs._getProperty_ |
( |
|
self, |
|
|
|
pname |
|
) |
| |
|
private |
Get the property by name
Definition at line 510 of file Algs.py.
512 Get the property by name
514 if not self.hasProperty(pname):
515 raise AttributeError(
"property %s does not exist" % pname)
◆ _hasProperty_()
def GaudiAlg.Algs._hasProperty_ |
( |
|
self, |
|
|
|
pname |
|
) |
| |
|
private |
The trivial function which checks the existence of the property with given name
Definition at line 499 of file Algs.py.
501 The trivial function which checks the existence of the property with given name
503 return cpp.Gaudi.Utils.hasProperty(self, pname)
◆ _help_()
def GaudiAlg.Algs._help_ |
( |
| ) |
|
|
private |
Definition at line 1616 of file Algs.py.
1617 print(__doc__, __author__)
1618 print(
"\t\t\tDoc-string for class GaudiAlgo \n", GaudiAlgo.__doc__)
1619 print(
"\t\t\tDoc-string for class HistoAlgo \n", HistoAlgo.__doc__)
1620 print(
"\t\t\tDoc-string for class TupleAlgo \n", TupleAlgo.__doc__)
◆ _Histos_a_()
def GaudiAlg.Algs._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 1543 of file Algs.py.
1545 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1547 >>> alg = ... ## get the algorithm
1548 >>> histos = alg.Histos() ## get all histograms & profiles
1549 >>> for key in histos :
1550 ... print(key, histos[key])
1552 Retrive the histogram with the certain ID :
1554 >>> alg = ... ## get the algorithm
1555 >>> histo = alg.Histos('some histo ID') ## get the histo by ID
1559 _cmp = getattr(self,
"_ialg")
1561 self.retrieveInterface()
1562 _cmp = getattr(self,
"_ialg")
◆ _Histos_t_()
def GaudiAlg.Algs._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 1569 of file Algs.py.
1571 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base:
1573 >>> tool = ... ## get the tool
1574 >>> histos = tool.Histos() ## get all histograms & profiles
1575 >>> for key in histos :
1576 ... print(key, histos[key])
1578 Retrive the historgam with certain ID :
1580 >>> tool = ... ## get the tool
1581 >>> histo = tool.Histos('some histo ID') ## get the histo by ID
1585 _cmp = getattr(self,
"_itool")
1587 self.retrieveInterface()
1588 _cmp = getattr(self,
"_itool")
1594 _Tools_a_.__doc__ +=
"\n" + AlgDecorator._tools_a_.__doc__
1595 _Tools_t_.__doc__ +=
"\n" + AlgDecorator._tools_t_.__doc__
1596 _Counter_a_.__doc__ +=
"\n" + AlgDecorator._counter_a_.__doc__
1597 _Counter_t_.__doc__ +=
"\n" + AlgDecorator._counter_t_.__doc__
1598 _Histos_a_.__doc__ +=
"\n" + HistoDecorator._histos_a_.__doc__
1599 _Histos_t_.__doc__ +=
"\n" + HistoDecorator._histos_t_.__doc__
1601 iAlgorithm.Tools = _Tools_a_
1602 iAlgTool.Tools = _Tools_t_
1603 iAlgorithm.Counter = _Counter_a_
1604 iAlgTool.Counter = _Counter_t_
1605 iAlgorithm.Histos = _Histos_a_
1606 iAlgTool.Histos = _Histos_t_
◆ _histoSvc()
def GaudiAlg.Algs._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 394 of file Algs.py.
396 Trivial helper function to access Histogram Data and Histogram Data Service
400 # get histogram data service
401 svc = self.histoSvc()
404 histo = self.histoSvc('/stat/Calo/1')
407 return self._histoSvc_
408 return self._histoSvc_[address]
◆ _init_()
def GaudiAlg.Algs._init_ |
( |
|
self, |
|
|
|
name, |
|
|
** |
args |
|
) |
| |
|
private |
The constructor from unique algorithm instance name & parameters
Definition at line 206 of file Algs.py.
206 def _init_(self, name, **args):
208 The constructor from unique algorithm instance name & parameters
210 self._Base.__init__(self, self, name)
212 algMgr = appMgr._algmgr
213 status = algMgr.addAlgorithm(self)
214 if status.isFailure():
215 raise RuntimeError(
'Unable to add Algorithm "' + name +
'"')
218 setattr(self, key, args[key])
220 if "GaudiPythonAlgos" not in appMgr.__dict__:
221 appMgr.__dict__[
"GaudiPythonAlgos"] = []
222 appMgr.__dict__[
"GaudiPythonAlgos"].append(self)
◆ _initialize_()
def GaudiAlg.Algs._initialize_ |
( |
|
self | ) |
|
|
private |
The default initialization (initialization of base C++ class + data)
Definition at line 232 of file Algs.py.
234 The default initialization (initialization of base C++ class + data)
236 status = self._Base.initialize_(self)
237 if status.isFailure():
241 _e = self._Base.evtSvc(self)
243 self._evtSvc_ = iDataSvc(_s.name(), _e)
245 _d = self._Base.detSvc(self)
247 self._detSvc_ = iDataSvc(_s.name(), _d)
◆ _initialize_histo_()
def GaudiAlg.Algs._initialize_histo_ |
( |
|
self | ) |
|
|
private |
The default initialization (initialization of base C++ class + data members)
Definition at line 259 of file Algs.py.
261 The default initialization (initialization of base C++ class + data members)
264 if status.isFailure():
268 _h = self._Base.histoSvc(self)
270 self._histoSvc_ = iHistogramSvc(_s.name(), _h)
◆ _initialize_tuple_()
def GaudiAlg.Algs._initialize_tuple_ |
( |
|
self | ) |
|
|
private |
The default initialization (initialization of base C++ class + data members)
Definition at line 282 of file Algs.py.
284 The default initialization (initialization of base C++ class + data members)
287 if status.isFailure():
291 if self.produceNTuples():
292 _n = self._Base.ntupleSvc(self)
294 self._ntupleSvc_ = iNTupleSvc(_s.name(), _n)
296 if self.produceEvtCols():
297 _n = self._Base.evtColSvc(self)
299 self._evtcolSvc_ = iNTupleSvc(_s.name(), _n)
◆ _nTuple_()
def GaudiAlg.Algs._nTuple_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Retrieve (book-on-demand) N-Tuple object
Definition at line 1133 of file Algs.py.
1135 Retrieve (book-on-demand) N-Tuple object
1137 return TupleAlgDecorator.nTuple(s, *a)
◆ _ntupleSvc()
def GaudiAlg.Algs._ntupleSvc |
( |
|
self | ) |
|
|
private |
Trivial function to access N-Tuple Service
Definition at line 461 of file Algs.py.
463 Trivial function to access N-Tuple Service
465 return self._ntupleSvc_
◆ _plot1D_()
def GaudiAlg.Algs._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 Algs.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 GaudiAlg.Algs._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 Algs.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 GaudiAlg.Algs._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 Algs.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 GaudiAlg.Algs._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 Algs.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 GaudiAlg.Algs._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 Algs.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 GaudiAlg.Algs._service_ |
( |
|
self, |
|
|
|
interface, |
|
|
|
name, |
|
|
|
create = True |
|
) |
| |
|
private |
Useful method to locate a service:
Usage:
ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
Definition at line 178 of file Algs.py.
178 def _service_(self, interface, name, create=True):
180 Useful method to locate a service:
184 ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' )
188 interface = cpp.IInterface
189 _svc = AlgDecorator.svc_(self, name, create)
194 self.Warning(
"Invalid cast to interface %s" % interface)
◆ _set_attr_()
def GaudiAlg.Algs._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 557 of file Algs.py.
559 Set the attribute (or property) :
560 - if the attribute name corresponds to the property name, the property is updated
562 if not self.hasProperty(pname):
563 self.__dict__[pname] = pvalue
565 self._ialg.__setattr__(pname, pvalue)
◆ _setProperty_()
def GaudiAlg.Algs._setProperty_ |
( |
|
self, |
|
|
|
pname, |
|
|
|
pvalue |
|
) |
| |
|
private |
Set the property from the value
Definition at line 523 of file Algs.py.
525 Set the property from the value
527 if not self.hasProperty(pname):
528 raise AttributeError(
"property %s does not exist" % pname)
529 return self._ialg.__setattr__(pname, pvalue)
◆ _start_()
def GaudiAlg.Algs._start_ |
( |
|
self | ) |
|
|
private |
The stub 'start' method needed by the internal implementation of PyAlg<>.
Definition at line 947 of file Algs.py.
949 The stub 'start' method needed by the internal implementation of PyAlg<>.
955 GaudiAlgo.start = _start_
956 HistoAlgo.start = _start_
957 TupleAlgo.start = _start_
◆ _stop_()
def GaudiAlg.Algs._stop_ |
( |
|
self | ) |
|
|
private |
The stub 'stop' method needed by the internal implementation of PyAlg<>.
Definition at line 972 of file Algs.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 GaudiAlg.Algs._success_ |
( |
|
self | ) |
|
|
private |
◆ _t_array_()
def GaudiAlg.Algs._t_array_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the fixed-size array column
Definition at line 1264 of file Algs.py.
1266 Fill the fixed-size array column
1268 return _Dec.array(s, *a)
◆ _t_column_()
def GaudiAlg.Algs._t_column_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the certain column to n-tuple
Definition at line 1243 of file Algs.py.
1245 Fill the certain column to n-tuple
1247 return _Dec.column(s, *a)
◆ _t_column_ll_()
def GaudiAlg.Algs._t_column_ll_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the 'long long' column
Definition at line 1250 of file Algs.py.
1252 Fill the 'long long' column
1254 return _Dec.column_ll(s, *a)
◆ _t_column_ull_()
def GaudiAlg.Algs._t_column_ull_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the 'unsigned long long' column
Definition at line 1257 of file Algs.py.
1259 Fill the 'unsigned long long' column
1261 return _Dec.column_ull(s, *a)
◆ _t_farray_()
def GaudiAlg.Algs._t_farray_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the floating-size array column
Definition at line 1278 of file Algs.py.
1280 Fill the floating-size array column
1282 return _Dec.farray(s, *a)
◆ _t_fmatrix_()
def GaudiAlg.Algs._t_fmatrix_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the floating-size matrix column
Definition at line 1285 of file Algs.py.
1287 Fill the floating-size matrix column
1289 return _Dec.fmatrix(s, *a)
1292 _t_nTuple_.__doc__ +=
"\n" + _Dec.nTuple.__doc__
1293 _t_ntuple_.__doc__ +=
"\n" + _Dec.ntuple.__doc__
1294 _t_valid_.__doc__ +=
"\n" + _Dec.valid.__doc__
1295 _t_write_.__doc__ +=
"\n" + _Dec.write.__doc__
1296 _t_column_.__doc__ +=
"\n" + _Dec.column.__doc__
1297 _t_column_ll_.__doc__ +=
"\n" + _Dec.column_ll.__doc__
1298 _t_column_ull_.__doc__ +=
"\n" + _Dec.column_ull.__doc__
1299 _t_array_.__doc__ +=
"\n" + _Dec.array.__doc__
1300 _t_matrix_.__doc__ +=
"\n" + _Dec.matrix.__doc__
1301 _t_farray_.__doc__ +=
"\n" + _Dec.farray.__doc__
1302 _t_fmatrix_.__doc__ +=
"\n" + _Dec.fmatrix.__doc__
1304 Tuple.nTuple = _t_nTuple_
1305 Tuple.ntuple = _t_ntuple_
1306 Tuple.valid = _t_valid_
1307 Tuple.write = _t_write_
1308 Tuple.column = _t_column_
1309 Tuple.column_ll = _t_column_ll_
1310 Tuple.column_ull = _t_column_ull_
1311 Tuple.array = _t_array_
1312 Tuple.matrix = _t_matrix_
1313 Tuple.farray = _t_farray_
1314 Tuple.fmatrix = _t_fmatrix_
◆ _t_matrix_()
def GaudiAlg.Algs._t_matrix_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Fill the fixed-size matrix column
Definition at line 1271 of file Algs.py.
1273 Fill the fixed-size matrix column
1275 return _Dec.matrix(s, *a)
◆ _t_nTuple_()
def GaudiAlg.Algs._t_nTuple_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Access to underlying INTuple object
Definition at line 1215 of file Algs.py.
1217 Access to underlying INTuple object
1219 return _Dec.nTuple(s, *a)
◆ _t_ntuple_()
def GaudiAlg.Algs._t_ntuple_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Access to underlying NTuple::Tuple object
Definition at line 1222 of file Algs.py.
1224 Access to underlying NTuple::Tuple object
1226 return _Dec.ntuple(s, *a)
◆ _t_valid_()
def GaudiAlg.Algs._t_valid_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Valid NTuple::Tuple object?
Definition at line 1229 of file Algs.py.
1231 Valid NTuple::Tuple object?
1233 return _Dec.valid(s, *a)
◆ _t_write_()
def GaudiAlg.Algs._t_write_ |
( |
|
s, |
|
|
* |
a |
|
) |
| |
|
private |
Commit the row/record to n-tuple
Definition at line 1236 of file Algs.py.
1238 Commit the row/record to n-tuple
1240 return _Dec.write(s, *a)
◆ _tool_()
def GaudiAlg.Algs._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 127 of file Algs.py.
127 def _tool_(self, interface, typename, name=None, parent=None, create=True):
129 Useful method to locate the tool a certain
134 t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator')
135 # locate private tool
136 t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self)
137 # locate public tool with defined name
138 t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1')
139 # locate private tool with defined name
140 t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self)
141 # locate public tool with defined name
142 t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3')
143 # locate private tool with defined name
144 t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self)
148 interface = cpp.IAlgTool
152 typename +=
"/" + name
153 _tool = AlgDecorator.tool_(self, typename, parent, create)
158 self.Warning(
"Invalid cast to interface %s" % interface)
◆ _Tools_a_()
def GaudiAlg.Algs._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 1399 of file Algs.py.
1401 Retrieve the list of tools,
1402 aquired by component through GaudiCommon<TYPE> base:
1404 >>> alg = ... ## get the algorithm
1405 >>> tools = alg.Tools() ## get the tools
1406 >>> for tool in tools :
1410 _cmp = getattr(self,
"_ialg")
1412 self.retrieveInterface()
1413 _cmp = getattr(self,
"_ialg")
◆ _Tools_t_()
def GaudiAlg.Algs._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 1420 of file Algs.py.
1422 Retrieve the list of tools,
1423 aquired by component through GaudiCommon<TYPE> base:
1425 >>> tool = ... ## get the tool
1426 >>> tools = tool.Tools() ## get the tools
1427 >>> for t in tools :
1431 _cmp = getattr(self,
"_itool")
1433 self.retrieveInterface()
1434 _cmp = getattr(self,
"_itool")
◆ mapvct()
def GaudiAlg.Algs.mapvct |
( |
|
func, |
|
|
|
sequence, |
|
|
|
ovct = None |
|
) |
| |
Helper function to fill histogram/ntuple using 'map'-operation
Definition at line 1359 of file Algs.py.
1359 def mapvct(func, sequence, ovct=None):
1360 """Helper function to fill histogram/ntuple using 'map'-operation"""
1365 if hasattr(sequence,
"size"):
1366 vct.reserve(vct.size() + sequence.size())
1367 elif hasattr(sequence,
"__len__"):
1368 vct.reserve(vct.size() + len(sequence))
1369 for object
in sequence:
1370 vct.push_back(
func(object))
◆ __all__
tuple GaudiAlg.Algs.__all__ |
|
private |
Initial value:
Definition at line 52 of file Algs.py.
◆ __author__
string GaudiAlg.Algs.__author__ = "Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr" |
|
private |
◆ _alg_map_
dictionary GaudiAlg.Algs._alg_map_ |
|
private |
Initial value:
14 "finalize": _finalize_,
16 "hasProperty": _hasProperty_,
17 "getProperty": _getProperty_,
18 "setProperty": _setProperty_,
19 "__setattr__": _set_attr_,
20 "__getattr__": _get_attr_,
Definition at line 1316 of file Algs.py.
◆ _Dec
◆ _detSvc_
◆ _evtcolSvc_
GaudiAlg.Algs._evtcolSvc_ |
|
private |
◆ _evtSvc_
◆ _GaudiAlgorithm
GaudiAlg.Algs._GaudiAlgorithm = cpp.GaudiPython.PyAlg("GaudiAlgorithm") |
|
private |
◆ _GaudiHistoAlg
GaudiAlg.Algs._GaudiHistoAlg = cpp.GaudiPython.PyAlg("GaudiHistoAlg") |
|
private |
◆ _GaudiTupleAlg
GaudiAlg.Algs._GaudiTupleAlg = cpp.GaudiPython.PyAlg("GaudiTupleAlg") |
|
private |
◆ _histoSvc_
◆ _ialg
◆ _ntupleSvc_
GaudiAlg.Algs._ntupleSvc_ |
|
private |
◆ AlgDecorator
GaudiAlg.Algs.AlgDecorator = cpp.GaudiPython.AlgDecorator |
◆ column
◆ HID
GaudiAlg.Algs.HID = cpp.GaudiAlg.ID |
◆ HistoDecorator
GaudiAlg.Algs.HistoDecorator = cpp.GaudiPython.HistoDecorator |
◆ HistoID
GaudiAlg.Algs.HistoID = HID |
◆ iAlgorithm
◆ iAlgTool
◆ Matrix
GaudiAlg.Algs.Matrix = std.vector("std::vector<double>") |
◆ std
GaudiAlg.Algs.std = cpp.std |
◆ TID
◆ Tuple
GaudiAlg.Algs.Tuple = cpp.Tuples.Tuple |
◆ TupleAlgDecorator
GaudiAlg.Algs.TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator |
◆ TupleDecorator
GaudiAlg.Algs.TupleDecorator = cpp.GaudiPython.TupleDecorator |
◆ TupleID
GaudiAlg.Algs.TupleID = TID |
◆ Vector
def _decorate_algs_(klasses)
def mapvct(func, sequence, ovct=None)
def _hasProperty_(self, pname)
__getattr__
decorate the attribute access for Gaudi.ParticleProperty
def _get_counter_(self, method, name)
def _detSvc(self, location=None)
def _Counter_t_(self, name)
def _decorate_tuples_(klasses)
def _service_(self, interface, name, create=True)
def _decorate_plots_(klasses)
def _t_column_ull_(s, *a)
def _histoSvc(self, address=None)
def _get_all_tools_(self, method)
def _tool_(self, interface, typename, name=None, parent=None, create=True)
def _initialize_tuple_(self)
def _get_all_histos_(component, method, name)
def _get_attr_(self, pname)
def _getDet(self, location)
def _set_attr_(self, pname, pvalue)
def _setProperty_(self, pname, pvalue)
def _Histos_t_(self, name=None)
def _exist_(self, location, rootInTES=True)
def _evtSvc(self, location=None)
def _initialize_histo_(self)
def _Histos_a_(self, name=None)
def _init_(self, name, **args)
def _Counter_a_(self, name)
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
def _getProperty_(self, pname)
def _get_(self, location, rootInTES=True)