19 ******************************************************************************* 20 * * 'Physisics do not like it, * 21 * * physisics do not need it, * 22 * * physisics do not use it' * 23 * * **************************** 25 * Helper module, which effectively 'imports' few useful C++ algorithmic * 26 * base classes into Python * 28 ******************************************************************************* 29 * The major imported classes are : * 31 * (1) GaudiAlgo - analogue for GaudiAlgorithm C++ class from GaudiAlg package * 32 * (2) HistoAlgo - analogue for GaudiHistoAlg C++ class from GaudiAlg package * 33 * (3) TupleAlgo - analogue for GaudiTupleAlg C++ class from GaudiAlg package * 34 ******************************************************************************* 36 from __future__
import print_function
38 __author__ =
'Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr' 70 from GaudiKernel
import ROOT6WorkAroundEnabled
88 AlgDecorator = cpp.GaudiPython.AlgDecorator
89 HistoDecorator = cpp.GaudiPython.HistoDecorator
90 TupleAlgDecorator = cpp.GaudiPython.TupleAlgDecorator
91 TupleDecorator = cpp.GaudiPython.TupleDecorator
119 def _tool_(self, interface, typename, name=None, parent=None, create=True):
121 Useful method to locate the tool a certain 126 t1 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator') 127 # locate private tool 128 t2 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator',parent=self) 129 # locate public tool with defined name 130 t3 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt1') 131 # locate private tool with defined name 132 t4 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator/MyExt2',parent=self) 133 # locate public tool with defined name 134 t5 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt3') 135 # locate private tool with defined name 136 t6 = self.tool(ITrExtrapolator,'TrParabolicExtrapolator','MyExt4',parent=self) 140 interface = cpp.IAlgTool
144 typename +=
'/' + name
145 _tool = AlgDecorator.tool_(self, typename, parent, create)
150 self.Warning(
'Invalid cast to interface %s' % interface)
172 Useful method to locate a service: 176 ntsvc = self.svc( INTupleSvc , 'NTUpleSvc' ) 180 interface = cpp.IInterface
181 _svc = AlgDecorator.svc_(self, name, create)
186 self.Warning(
'Invalid cast to interface %s' % interface)
200 The constructor from unique algorithm instance name & parameters 202 self._Base.__init__(self, self, name)
204 algMgr = appMgr._algmgr
205 status = algMgr.addAlgorithm(self)
206 if status.isFailure():
207 raise RuntimeError(
'Unable to add Algorithm "' + name +
'"')
208 iAlgorithm.__init__(self, name, self)
210 setattr(self, key, args[key])
212 if 'GaudiPythonAlgos' not in appMgr.__dict__:
213 appMgr.__dict__[
'GaudiPythonAlgos'] = []
214 appMgr.__dict__[
'GaudiPythonAlgos'].append(self)
226 The default initialization (initialization of base C++ class + data) 228 status = self._Base.initialize_(self)
229 if status.isFailure():
233 _e = self._Base.evtSvc(self)
237 _d = self._Base.detSvc(self)
253 The default initialization (initialization of base C++ class + data members) 256 if status.isFailure():
260 _h = self._Base.histoSvc(self)
276 The default initialization (initialization of base C++ class + data members) 279 if status.isFailure():
283 if self.produceNTuples():
284 _n = self._Base.ntupleSvc(self)
288 if self.produceEvtCols():
289 _n = self._Base.evtColSvc(self)
317 Trivial helper function to access Event Data and Event Data Service 321 # get event data service 325 hits = self.evtSvc('MC/Calo/Hits') 329 return self._evtSvc_[location]
353 Trivial helper function to access Detector Data and Event Data Service 356 # get detector data service 360 lhcb = self.detSvc('/dd/Structure/LHCb') 364 return self._detSvc_[location]
388 Trivial helper function to access Histogram Data and Histogram Data Service 392 # get histogram data service 393 svc = self.histoSvc() 396 histo = self.histoSvc('/stat/Calo/1') 399 return self._histoSvc_
400 return self._histoSvc_[address]
409 Trivial function to access the data in TES using the data service 411 return self._evtSvc_[location]
420 Trivial function to access the data in TDS using data service 422 return self._detSvc_[location]
429 def _get_(self, location, rootInTES=True):
431 Get the object from Transient Event Store using GaudiCommon machinery, 432 respecting RootInTES behaviour 434 return AlgDecorator.get_(self, location, rootInTES)
443 Check the object in Transient Event Store using GaudiCommon machinery, 444 respecting RootInTES behaviour 446 return AlgDecorator.exist_(self, location, rootInTES)
455 Trivial function to access N-Tuple Service 457 return self._ntupleSvc_
466 Trivial function to access Event Collection Service 468 return self._evtcolSvc_
475 The default finalization : finalize the base C++ class 477 status = self._Base.finalize_(self)
493 The trivial function which checks the existence of the property with given name 495 return cpp.Gaudi.Utils.hasProperty(self, pname)
504 Get the property by name 506 if not self.hasProperty(pname):
507 raise AttributeError(
'property %s does not exist' % pname)
508 return iAlgorithm.__getattr__(self, pname)
517 Set the property from the value 519 if not self.hasProperty(pname):
520 raise AttributeError(
'property %s does not exist' % pname)
521 return iAlgorithm.__setattr__(self, pname, pvalue)
530 Get the attribute (or property) 531 - if the attribute name corresponds to the property name, property value is returned 533 if self.hasProperty(pname):
534 return iAlgorithm.__getattr__(self, pname)
535 raise AttributeError(
'attribute/property %s does not exist' % pname)
544 Set the attribute (or property) : 545 - if the attribute name corresponds to the property name, the property is updated 547 if not self.hasProperty(pname):
548 self.__dict__[pname] = pvalue
550 iAlgorithm.__setattr__(self, pname, pvalue)
553 _GaudiAlgorithm = cpp.GaudiPython.PyAlg(
'GaudiAlgorithm')
554 _GaudiHistoAlg = cpp.GaudiPython.PyAlg(
'GaudiHistoAlg')
555 _GaudiTupleAlg = cpp.GaudiPython.PyAlg(
'GaudiTupleAlg')
624 ******************************************************************************* 625 * * 'Physisics do not like it, * 626 * * physisics do not need it, * 627 * * physisics do not use it' * 628 * * **************************** 631 * from GaudiPython.GaudiAlgs import GaudiAlgo, SUCCESS * 633 * class MyClass(GaudiAlgo) : * 634 * ' My specific Algorithm, derived from GaudiAlgo base class ' * 635 * def __init__( self , name , **args ) : * 636 * 'Constructor from algorithm instance name & parameters' * 637 * #invoke the constructor of base class * 638 * GaudiAlgo.__init__(self , name , **args ) * 640 * def initialize ( self ) : * 641 * 'Algorithm initialization' * 642 * # initialize the base class * 643 * status = GaudiAlgo.initialize( self ) * 644 * if status.isFailure() : return status * 646 * # locate the services and tools * 648 * # locate some tool: * 649 * extrapolator = self.tool(ITrExtrapolator,'TrExtrapolator') * 651 * # locate the service * 652 * rndmSvc = self.svc(IRndmGenSvc, 'RndmGenSvc') * 657 * def execute ( self ) : * 658 * 'Major method (from IAlgorithm interface)' * 660 * # get some data from Transient Event Store * 661 * tracks = self.get('/Event/Rec/Tracks') * 664 * c1 = self.counter('#Tracks') * 665 * c2 = self.counter('No Tracks') * 666 * if tracks.empty : * 668 * c1 += tracks->size() * 670 * if 1000 < tracks.size() : * 671 * return self.Error('The event is *VERY* busy') * 675 ******************************************************************************* 753 ******************************************************************************* 754 * * 'Physisics do not like it, * 755 * * physisics do not need it, * 756 * * physisics do not use it' * 757 * * **************************** 760 * from GaudiPython.GaudiAlgs import HistoAlgo, SUCCESS * 762 * class MyClass(HistoAlgo) : * 763 * ' My specific Algorithm, derived from GaudiAlgo base class ' * 764 * def __init__( self , name , **args ) : * 765 * 'Constructor from algorithm instance name' * 766 * #invoke the constructor of base class * 767 * HistoAlgo.__init__(self , name , **args ) * 769 * def execute ( self ) : * 770 * 'Major method (from IAlgorithm interface)' * 772 * # get some data from Transient Event Store * 773 * tracks = self.get('/Event/Rec/Tracks') * 775 * self.plot1D ( tracks->size() , '#tracks' , 0 , 100 ) * 779 * Alternatively the histogram could be booked in advance: * 781 * class MyClass(HistoAlgo) : * 782 * ' My specific Algorithm, derived from GaudiAlgo base class ' * 783 * def __init__( self , name ) : * 784 * 'Constructor from algorithm instance name' * 785 * #invoke the constructor of base class * 786 * HistoAlgo.__init__(self , name ) * 788 * def initialize ( self ) : * 789 * 'Algorithm initialization' * 790 * # initialize the base class * 791 * status = HistoAlgo.initialize( self ) * 792 * if status.isFailure() : return status * 794 * # book the histogram * 795 * self.h1 = selff.book1D ( '#tracks' , 0 , 100 ) * 800 * def execute ( self ) : * 801 * 'Major method (from IAlgorithm interface)' * 803 * # get some data from Transient Event Store * 804 * tracks = self.get('/Event/Rec/Tracks') * 806 * # fill the histogram * 807 * self.h1.fill ( tracks->size() ) * 811 ******************************************************************************* 866 ******************************************************************************* 867 * * 'Physisics do not like it, * 868 * * physisics do not need it, * 869 * * physisics do not use it' * 870 * * **************************** 873 * from GaudiPython.GaudiAlgs import TupleAlgo, SUCCESS * 875 * class MyClass(TupleAlgo) : * 876 * ' My specific Algorithm, derived from TupleAlgo base class ' * 877 * def __init__( self , name , **args ) : * 878 * 'Constructor from algorithm instance name & parameters' * 879 * #invoke the constructor of base class * 880 * TupleAlgo.__init__(self , name , **args ) * 882 * def execute ( self ) : * 883 * 'Major method (from IAlgorithm interface)' * 885 * # get some data from Transient Event Store * 886 * tracks = self.get('/Event/Rec/Tracks') * 888 * tup = self.nTuple('My N-Tuple') * 890 * for track in tracks : * 894 * chi2 = track.chi2 () * 897 * tup.column ( 'pt' , pt ) * 898 * tup.column ( 'p' , p ) * 899 * tup.column ( 'chi2' , chi2 ) * 905 ******************************************************************************* 919 GaudiAlgo._Base = _GaudiAlgorithm
920 HistoAlgo._Base = _GaudiHistoAlg
921 TupleAlgo._Base = _GaudiTupleAlg
924 GaudiAlgo.initialize = _initialize_
925 HistoAlgo.initialize = _initialize_histo_
926 TupleAlgo.initialize = _initialize_tuple_
931 The stub 'start' method needed by the internal implementation of PyAlg<>. 937 GaudiAlgo.start = _start_
938 HistoAlgo.start = _start_
939 TupleAlgo.start = _start_
944 The fictive 'execute' method, which MUST be overwitten by user 947 'Execute method is not implemented for %s' % self.name())
950 GaudiAlgo.execute = _execute_
951 HistoAlgo.execute = _execute_
952 TupleAlgo.execute = _execute_
957 The stub 'stop' method needed by the internal implementation of PyAlg<>. 963 GaudiAlgo.stop = _stop_
964 HistoAlgo.stop = _stop_
965 TupleAlgo.stop = _stop_
972 The basic method to fill (book-on-demand) 1D-histogram 974 The histogram will be created/booked dautomatically according to the 977 - literal or numerical ID (optional) 981 - number of bins (default is 100) 983 The reference to the histogram is returned and could be used for later manipulations 986 return HistoDecorator.plot1D(s, *a)
994 The basic method to fill (book-on-demand) 2D-histogram 996 The histogram will be created/booked dautomatically according to the 999 - literal or numerical ID (optional) 1005 - number of X-bins (default is 50) 1006 - number of Y-bins (default is 50) 1008 The reference to the histogram is returned and could be used for later manipulations 1011 return HistoDecorator.plot2D(s, *a)
1019 The basic method to fill (book-on-demand) 3D-histogram 1021 The histogram will be created/booked dautomatically according to the 1024 - literal or numerical ID (optional) 1032 - number of X-bins (default is 10) 1033 - number of Y-bins (default is 10) 1034 - number of Y-bins (default is 10) 1036 The reference to the histogram is returned and could be used for later manipulations 1039 return HistoDecorator.plot3D(s, *a)
1047 The basic method to fill (book-on-demand) 1D profile histogram 1049 The profile histogram will be created/booked dautomatically 1050 according to the specifications: 1052 - literal or numerical ID (optional) 1056 - number of X-bins (default is 100) 1058 The reference to the histogram is returned and could be used for later manipulations 1061 return HistoDecorator.profile1D(s, *a)
1069 The basic method to fill (book-on-demand) 2D profile histiogram 1071 The profile histogram will be created/booked automatically 1072 according to the specifications: 1074 - literal or numerical ID (optional) 1080 - number of X-bins (default is 50) 1081 - number of Y-bins (default is 50) 1083 The reference to the histogram is returned and could be used for later manipulations 1086 return HistoDecorator.profile2D(s, *a)
1091 _plot1D_.__doc__ +=
'\n' + HistoDecorator.plot1D.__doc__
1092 _plot2D_.__doc__ +=
'\n' + HistoDecorator.plot2D.__doc__
1093 _plot3D_.__doc__ +=
'\n' + HistoDecorator.plot3D.__doc__
1094 _profile1D_.__doc__ +=
'\n' + HistoDecorator.profile1D.__doc__
1095 _profile2D_.__doc__ +=
'\n' + HistoDecorator.profile2D.__doc__
1100 if not issubclass(t, list)
and \
1101 not issubclass(t, tuple):
1103 for klass
in klasses:
1104 klass.plot = _plot1D_
1105 klass.plot1D = _plot1D_
1106 klass.plot2D = _plot2D_
1107 klass.plot3D = _plot3D_
1108 klass.profile1D = _profile1D_
1109 klass.profile2D = _profile2D_
1119 Retrieve (book-on-demand) N-Tuple object 1121 return TupleAlgDecorator.nTuple(s, *a)
1129 Retrieve (book-on-demand) N-Tuple object for Event Tag Collections 1131 return TupleAlgDecorator.evtCol(s, *a)
1134 _nTuple_.__doc__ +=
'\n' + TupleAlgDecorator.nTuple.__doc__
1135 _evtCol_.__doc__ +=
'\n' + TupleAlgDecorator.evtCol.__doc__
1140 if not issubclass(t, list)
and \
1141 not issubclass(t, tuple):
1143 for klass
in klasses:
1144 klass.nTuple = _nTuple_
1145 klass.evtCol = _evtCol_
1146 klass.ntupleSvc = _ntupleSvc
1147 klass.tupleSvc = _ntupleSvc
1148 klass.ntupSvc = _ntupleSvc
1149 klass.tupSvc = _ntupleSvc
1150 klass.evtColSvc = _evtcolSvc
1151 klass.evtcolSvc = _evtcolSvc
1158 Tuple = cpp.Tuples.Tuple
1159 _Dec = TupleDecorator
1163 '''Helper decorator class to workaround ROOT-6697''' 1169 mapping = {int:
'int', bool:
'bool', float:
'double'}
1171 signature =
'const Tuples::Tuple& tuple, const string& name, const %s value' % (
1173 mapping[k] = func.disp(signature)
1178 Explicitly call the explicit signature for the case with 3 arguments and 1179 the last one is 'int', 'bool' or 'float', for the other cases fall back 1180 on the default dispatcher. 1188 return self.
func(*a)
1197 Access to underlying INTuple object 1199 return _Dec.nTuple(s, *a)
1204 Access to underlying NTuple::Tuple object 1206 return _Dec.ntuple(s, *a)
1211 Valid NTuple::Tuple object? 1213 return _Dec.valid(s, *a)
1218 Commit the row/record to n-tuple 1220 return _Dec.write(s, *a)
1225 Fill the certain column to n-tuple 1227 return _Dec.column(s, *a)
1232 Fill the 'long long' column 1234 return _Dec.column_ll(s, *a)
1239 Fill the 'unsigned long long' column 1241 return _Dec.column_ull(s, *a)
1246 Fill the fixed-size array column 1248 return _Dec.array(s, *a)
1253 Fill the fixed-size matrix column 1255 return _Dec.matrix(s, *a)
1260 Fill the floating-size array column 1262 return _Dec.farray(s, *a)
1267 Fill the floating-size matrix column 1269 return _Dec.fmatrix(s, *a)
1272 _t_nTuple_.__doc__ +=
'\n' + _Dec.nTuple.__doc__
1273 _t_ntuple_.__doc__ +=
'\n' + _Dec.ntuple.__doc__
1274 _t_valid_.__doc__ +=
'\n' + _Dec.valid.__doc__
1275 _t_write_.__doc__ +=
'\n' + _Dec.write.__doc__
1276 _t_column_.__doc__ +=
'\n' + _Dec.column.__doc__
1277 _t_column_ll_.__doc__ +=
'\n' + _Dec.column_ll.__doc__
1278 _t_column_ull_.__doc__ +=
'\n' + _Dec.column_ull.__doc__
1279 _t_array_.__doc__ +=
'\n' + _Dec.array.__doc__
1280 _t_matrix_.__doc__ +=
'\n' + _Dec.matrix.__doc__
1281 _t_farray_.__doc__ +=
'\n' + _Dec.farray.__doc__
1282 _t_fmatrix_.__doc__ +=
'\n' + _Dec.fmatrix.__doc__
1284 Tuple.nTuple = _t_nTuple_
1285 Tuple.ntuple = _t_ntuple_
1286 Tuple.valid = _t_valid_
1287 Tuple.write = _t_write_
1288 Tuple.column = _t_column_
1289 Tuple.column_ll = _t_column_ll_
1290 Tuple.column_ull = _t_column_ull_
1291 Tuple.array = _t_array_
1292 Tuple.matrix = _t_matrix_
1293 Tuple.farray = _t_farray_
1294 Tuple.fmatrix = _t_fmatrix_
1301 'eventSvc': _evtSvc,
1303 'histoSvc': _histoSvc,
1304 'histSvc': _histoSvc,
1309 'finalize': _finalize_,
1310 'beginRun': _success_,
1311 'endRun': _success_,
1315 'getProperty': _getProperty_,
1316 'setProperty': _setProperty_,
1317 '__setattr__': _set_attr_,
1318 '__getattr__': _get_attr_
1325 if not issubclass(t, list)
and \
1326 not issubclass(t, tuple):
1328 for _alg
in klasses:
1329 for key
in _alg_map_:
1330 setattr(_alg, key, _alg_map_[key])
1344 """ Helper function to fill histogram/ntuple using 'map'-operation """ 1349 if hasattr(sequence,
'size'):
1350 vct.reserve(vct.size() + sequence.size())
1351 elif hasattr(sequence,
'__len__'):
1352 vct.reserve(vct.size() + len(sequence))
1353 for object
in sequence:
1354 vct.push_back(
func(object))
1370 _func = getattr(AlgDecorator, method)
1371 _num = _func(self, _tools)
1372 if _tools.size() != _num:
1373 raise RuntimeError(
'Unable to extract Tools')
1375 for _tool
in _tools:
1376 _res += [
iAlgTool(_tool.name(), _tool)]
1385 Retrieve the list of tools, 1386 aquired by component through GaudiCommon<TYPE> base: 1388 >>> alg = ... ## get the algorithm 1389 >>> tools = alg.Tools() ## get the tools 1390 >>> for tool in tools : 1394 _cmp = getattr(self,
'_ialg')
1396 self.retrieveInterface()
1397 _cmp = getattr(self,
'_ialg')
1406 Retrieve the list of tools, 1407 aquired by component through GaudiCommon<TYPE> base: 1409 >>> tool = ... ## get the tool 1410 >>> tools = tool.Tools() ## get the tools 1411 >>> for t in tools : 1415 _cmp = getattr(self,
'_itool')
1417 self.retrieveInterface()
1418 _cmp = getattr(self,
'_itool')
1432 _func = getattr(AlgDecorator, method)
1433 _num = _func(self, _nams, _cnts)
1434 if _nams.size() != _num
or _cnts.size() != _num:
1435 raise RuntimeError(
'Unable to extract Counters')
1437 for _i
in range(0, _num):
1443 return _res.get(name,
None)
1452 Retrieve the counters, managed GaudiCommon<TYPE> base: 1454 >>> alg = ... ## get the algorithm 1455 >>> cnts = alg.Counters() ## get the counters 1456 >>> for key in cnts : 1457 ... print key, cnts[key] 1460 Retrieve the counter, managed GaudiCommon<TYPE> base by name: 1462 >>> alg = ... ## get the algorithm 1463 >>> cnt = alg.Counters('MyCounter') ## get the counter 1467 _cmp = getattr(self,
'_ialg')
1469 self.retrieveInterface()
1470 _cmp = getattr(self,
'_ialg')
1479 Retrieve the counters, managed GaudiCommon<TYPE> base: 1481 >>> tool = ... ## get the tool 1482 >>> cnts = tool.Counters() ## get the counters 1483 >>> for key in cnts : 1484 ... print key, cnts[key] 1487 Retrieve the counter, managed GaudiCommon<TYPE> base by name: 1489 >>> tool = ... ## get the tool 1490 >>> cnt = tool.Counters('MyCounter') ## get the counter 1494 _cmp = getattr(self,
'_itool')
1496 self.retrieveInterface()
1497 _cmp = getattr(self,
'_itool')
1510 _func = getattr(AlgDecorator, method)
1511 return _func(self, name)
1519 Retrieve the counter managed GaudiCommon<TYPE> base by name: 1521 >>> alg = ... ## get the algorithm 1522 >>> cnt = alg.Counter('#accept') ## get the counter 1526 _cmp = getattr(self,
'_ialg')
1528 self.retrieveInterface()
1529 _cmp = getattr(self,
'_ialg')
1538 Retrieve the counter managed GaudiCommon<TYPE> base by name: 1540 >>> tool = ... ## get the tool 1541 >>> cnt = tool.Counter('#accept') ## get the counter 1545 _cmp = getattr(self,
'_itool')
1547 self.retrieveInterface()
1548 _cmp = getattr(self,
'_itool')
1555 cpp.GaudiAlg.ID.__repr__ = cpp.GaudiAlg.ID.idAsString
1556 cpp.GaudiAlg.ID.__str__ = cpp.GaudiAlg.ID.idAsString
1557 cpp.StatEntity.__repr__ = cpp.StatEntity.toString
1558 cpp.StatEntity.__str__ = cpp.StatEntity.toString
1565 Get All histogram form the component 1568 for _his
in (
std.vector(
'AIDA::IProfile2D*'),
1575 _fun = getattr(HistoDecorator, method)
1576 _num = _fun(component, _ids, _his)
1577 if _ids.size() != _num
or _his.size() != _num:
1578 raise RuntimeError(
'Unable to extract Histos!')
1579 for _i
in range(0, _num):
1582 _id = _id.numericID()
1584 _id = _id.literalID()
1586 _id = _is.idAsString()
1587 _res[_id] = _his[_i]
1592 id = cpp.GaudiAlg.ID(name)
1593 for i
in (name, id.literalID(), id.numericID(), id.idAsString(), id):
1594 h = _res.get(i,
None)
1606 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: 1608 >>> alg = ... ## get the algorithm 1609 >>> histos = alg.Histos() ## get all histograms & profiles 1610 >>> for key in histos : 1611 ... print key, histos[key] 1613 Retrive the histogram with the certain ID : 1615 >>> alg = ... ## get the algorithm 1616 >>> histo = alg.Histos('some histo ID') ## get the histo by ID 1620 _cmp = getattr(self,
'_ialg')
1622 self.retrieveInterface()
1623 _cmp = getattr(self,
'_ialg')
1632 Retrieve all histograms & profiles, booked through GauydiHistos<TYPE> base: 1634 >>> tool = ... ## get the tool 1635 >>> histos = tool.Histos() ## get all histograms & profiles 1636 >>> for key in histos : 1637 ... print key, histos[key] 1639 Retrive the historgam with certain ID : 1641 >>> tool = ... ## get the tool 1642 >>> histo = tool.Histos('some histo ID') ## get the histo by ID 1646 _cmp = getattr(self,
'_itool')
1648 self.retrieveInterface()
1649 _cmp = getattr(self,
'_itool')
1655 _Tools_a_.__doc__ +=
'\n' + AlgDecorator._tools_a_.__doc__
1656 _Tools_t_.__doc__ +=
'\n' + AlgDecorator._tools_t_.__doc__
1657 _Counters_a_.__doc__ +=
'\n' + AlgDecorator._counters_a_.__doc__
1658 _Counters_t_.__doc__ +=
'\n' + AlgDecorator._counters_t_.__doc__
1659 _Counter_a_.__doc__ +=
'\n' + AlgDecorator._counter_a_.__doc__
1660 _Counter_t_.__doc__ +=
'\n' + AlgDecorator._counter_t_.__doc__
1661 _Histos_a_.__doc__ +=
'\n' + HistoDecorator._histos_a_.__doc__
1662 _Histos_t_.__doc__ +=
'\n' + HistoDecorator._histos_t_.__doc__
1664 iAlgorithm.Tools = _Tools_a_
1665 iAlgTool.Tools = _Tools_t_
1666 iAlgorithm.Counters = _Counters_a_
1667 iAlgTool.Counters = _Counters_t_
1668 iAlgorithm.Counter = _Counter_a_
1669 iAlgTool.Counter = _Counter_t_
1670 iAlgorithm.Histos = _Histos_a_
1671 iAlgTool.Histos = _Histos_t_
1682 print(__doc__, __author__)
1683 print(
'\t\t\tDoc-string for class GaudiAlgo \n', GaudiAlgo.__doc__)
1684 print(
'\t\t\tDoc-string for class HistoAlgo \n', HistoAlgo.__doc__)
1685 print(
'\t\t\tDoc-string for class TupleAlgo \n', TupleAlgo.__doc__)
1691 if __name__ ==
'__main__':
def _getDet(self, location)
def _Counter_a_(self, name)
def _Counter_t_(self, name)
def _decorate_tuples_(klasses)
def _get_all_counters_(self, method, name=None)
def _t_column_ull_(s, *a)
def _get_(self, location, rootInTES=True)
def _initialize_tuple_(self)
def ROOT6WorkAroundEnabled(id=None)
def mapvct(func, sequence, ovct=None)
def _evtSvc(self, location=None)
def _service_(self, interface, name, create=True)
def __call__(self, *args)
def _init_(self, name, **args)
def _get_all_histos_(component, method, name)
def _hasProperty_(self, pname)
def _decorate_algs_(klasses)
def _decorate_plots_(klasses)
def _get_counter_(self, method, name)
def _get_attr_(self, pname)
def _set_attr_(self, pname, pvalue)
def _Histos_t_(self, name=None)
def _Counters_a_(self, name=None)
def _initialize_histo_(self)
def _Histos_a_(self, name=None)
def _get_all_tools_(self, method)
def _tool_(self, interface, typename, name=None, parent=None, create=True)
def _exist_(self, location, rootInTES=True)
def _histoSvc(self, address=None)
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
def _Counters_t_(self, name=None)
def _setProperty_(self, pname, pvalue)
def _getProperty_(self, pname)