22 *******************************************************************************
24 * Simple example which illustrate the usage of useful *
25 * algorithm base class for N-Tuple manipulations *
27 *******************************************************************************
29 from __future__
import print_function
32 __author__ =
"Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr"
52 Simple algorithm which implicitely book&fill N-Tuples
59 TupleAlgo.__init__(self, name, **args)
64 The major method 'execute', it is invoked for each event
69 tup = self.nTuple(
"My trivial N-tuple")
70 for i
in range(0, 100):
71 tup.column(
"a", math.sin(i))
72 tup.column(
"b", math.cos(i))
73 tup.column(
"c", math.tan(i))
74 tup.column(
"g",
gauss())
85 """Configuration of the job"""
92 gaudi.JobOptionsType =
"NONE"
94 gaudi.HistogramPersistency =
"ROOT"
96 gaudi.ExtSvc += [
"NTupleSvc"]
98 ntSvc = gaudi.service(
"NTupleSvc")
99 ntSvc.Output = [
"MYLUN DATAFILE='TupleEx_py.root' OPT='NEW' TYP='ROOT'"]
113 gaudi.setAlgorithms([alg])
122 if "__main__" == __name__: