The Gaudi Framework
v25r5
|
A simple wrapper class over standard Gaudi NTuple::Tuple facility. More...
#include <GaudiAlg/Tuple.h>
Public Member Functions | |
Tuple (TupleObj *tuple) | |
standard constructor More... | |
Tuple (const Tuple &tuple) | |
copy constructor More... | |
virtual | ~Tuple () |
destructor More... | |
Tuple & | operator= (const Tuple &tuple) |
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 private More... | |
Private Attributes | |
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
Tuples::Tuple::Tuple | ( | Tuples::TupleObj * | tuple | ) |
Tuples::Tuple::Tuple | ( | const Tuple & | tuple | ) |
copy constructor
Definition at line 35 of file Tuple.cpp.
|
virtual |
destructor
Definition at line 68 of file Tuple.cpp.
|
private |
default constructor is private
|
inline |
get the pointer to the underlying object
Definition at line 140 of file Tuple.h.
Tuples::Tuple & Tuples::Tuple::operator= | ( | const Tuple & | tuple | ) |
assignment operator Tuples could be assigned in a safe way
tuple | tuple to be assigned |
Definition at line 48 of file Tuple.cpp.
|
inlineprotected |
|
inline |
check the validity of the tuple object
Definition at line 143 of file Tuple.h.