The Gaudi Framework
v29r0 (ff2e7097)
|
A simple wrapper class over standard Gaudi NTuple::Tuple facility. More...
#include <GaudiAlg/Tuple.h>
Public Member Functions | |
Tuple (TupleObj *) | |
standard constructor More... | |
Tuple (const Tuple &)=default | |
copy constructor More... | |
virtual | ~Tuple ()=default |
destructor More... | |
Tuple & | operator= (const Tuple &)=default |
assignment operator Tuples could be assigned in a safe way More... | |
TupleObj * | operator-> () const |
get the pointer to the underlying object More... | |
bool | valid () const |
check the validity of the tuple object More... | |
Protected Member Functions | |
TupleObj * | tuple () const |
Return the underlying tuple object. More... | |
Private Member Functions | |
Tuple () | |
default constructor is deleted – except that ROOT wants one for dictionary code generation. More... | |
Private Attributes | |
SmartIF< TupleObj > | m_tuple |
The tuple object. More... | |
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
NTuple::Tuple
object using INTupleSvc
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:
One could fill some Tuple variables in one go
Even ALL variables could be filled in one go:
All these techniques could be easily combined in arbitrary ways
|
private |
default constructor is deleted – except that ROOT wants one for dictionary code generation.
So we make it private, and do not implement it...
Tuples::Tuple::Tuple | ( | Tuples::TupleObj * | tuple | ) |
|
default |
copy constructor
|
virtualdefault |
destructor
|
inline |
get the pointer to the underlying object
Definition at line 147 of file Tuple.h.
assignment operator Tuples could be assigned in a safe way
tuple | tuple to be assigned |
|
inlineprotected |
|
inline |
check the validity of the tuple object
Definition at line 150 of file Tuple.h.