The Gaudi Framework
v30r3 (a5ef0a68)
|
A simple wrapper class over standard Gaudi NTuple::Tuple facility. More...
#include <GaudiAlg/Tuple.h>
Public Member Functions | |
Tuple (std::shared_ptr< TupleObj > tuple) | |
standard constructor More... | |
virtual | ~Tuple ()=default |
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 () |
Private Attributes | |
std::shared_ptr< TupleObj > | m_tuple |
The (shared) 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
|
inline |
standard constructor
tuple | pointer to "real" tuple object |
Definition at line 124 of file Tuple.h.
|
virtualdefault |
|
inline |
get the pointer to the underlying object
Definition at line 131 of file Tuple.h.
|
inlineprotected |
Definition at line 137 of file Tuple.h.
|
inline |
check the validity of the tuple object
Definition at line 134 of file Tuple.h.
|
private |