A simple wrapper class over standard Gaudi NTuple::Tuple facility.
The main advantages of local ntuples with respect to 'standard' Gaudi NTuples ( NTuple::Tuple ) is their "locality". For 'standard' ntuples one need
-
Define all ntuple columns/items as data members of the algorithm
-
Book the
NTuple::Tuple
object using INTupleSvc
-
Add all defined columns/items to the booked ntuple
-
Fill ntuple records
Usually the first step is done in the header file (separate file!) of the algorithm, the second and the third steps are done in initialize()
method of the algorithm and the fourth step is done somewhere in execute()
method of the same algorithm. Such approach requires to keep track of the tuple structure through different method and event through different files. And even minor modification of the structure of the ntuple will require the modification of at least 2 methods and 2 files.
The Tuples::Tuple
wrapper over standard Gaudi NTuple::Tuple
class solves all above listed problems with "non-local" nature of Gaudi NTuple::Tuple
objects.
Tuples::Tuple
object is booked and used 'locally'. One does not need to pre-book the ntuple or its columns/items somewhere in different compilation units or other methods different from the actual point of using the ntuple.
The simplest example of usage Tuple object:
for( Loop D0 = loop( "K- pi+", "D0" ) , D0 , ++D0 )
{
}
One could fill some Tuple variables in one go
for( Loop D0 = loop( "K- pi+", "D0" ) , D0 , ++D0 )
{
}
Even ALL variables could be filled in one go:
for( Loop D0 = loop( "K- pi+", "D0" ) , D0 , ++D0 )
{
}
All these techniques could be easily combined in arbitrary ways
- See also
- GaudiTupleAlg
-
TupleObj
- Author
- Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru
- Date
- 2003-02-24
Definition at line 126 of file Tuple.h.