The Gaudi Framework  v29r0 (ff2e7097)
NTupleItems.cpp
Go to the documentation of this file.
1 //====================================================================
2 // NTuple name space implementation
3 //--------------------------------------------------------------------
4 //
5 // Package : Gaudi/NTupleSvc ( The LHCb Offline System)
6 // Author : M.Frank
7 //
8 // +---------+----------------------------------------------+--------+
9 // | Date | Comment | Who |
10 // +---------+----------------------------------------------+--------+
11 // | 21/10/99| Initial version. | MF |
12 // +---------+----------------------------------------------+--------+
13 //====================================================================
14 #define GAUDI_NTUPLEITEMS_CPP 1
15 
16 // Framework include files
19 #include "GaudiKernel/DataObject.h"
20 
21 typedef const std::string& CSTR;
22 typedef const std::type_info& CTYPE;
23 
25 template <class TYP>
27  TYP min, TYP max, TYP def )
28 {
29  return new _ItemImp<TYP>( tup, name, info, min, max, def );
30 }
31 
33 template <class TYP>
35  const std::string& idx, long len, TYP min, TYP max, TYP def )
36 {
37  return new _ArrayImp<TYP>( tup, name, info, idx, len, min, max, def );
38 }
39 
41 template <class TYP>
43  const std::string& idx, long ncol, long nrow, TYP min, TYP max,
44  TYP def )
45 {
46  return new _MatrixImp<TYP>( tup, name, info, idx, ncol, nrow, min, max, def );
47 }
48 
49 #define INSTANTIATE( TYP ) \
50  template class NTuple::_Item<TYP>; \
51  template class NTuple::_Array<TYP>; \
52  template class NTuple::_Matrix<TYP>;
53 // This makes the stuff accessible from outside
54 // (instruct the compiler to explicitly instantiate specific instances....)
55 INSTANTIATE( bool )
56 INSTANTIATE( char )
57 INSTANTIATE( unsigned char )
58 INSTANTIATE( short )
59 INSTANTIATE( unsigned short )
60 INSTANTIATE( int )
61 INSTANTIATE( unsigned int )
62 INSTANTIATE( long )
63 INSTANTIATE( long long )
64 INSTANTIATE( unsigned long )
65 INSTANTIATE( unsigned long long )
66 INSTANTIATE( float )
67 INSTANTIATE( double )
68 INSTANTIATE( void* )
70 INSTANTIATE( std::string )
71 
72 #undef INSTANTIATE
Abstract class describing a matrix column in a N tuple.
Definition: NTuple.h:45
Abstract class describing a column in a N tuple.
Definition: NTuple.h:41
Concrete class discribing a matrix column in a N tuple.
Definition: NTupleItems.h:40
STL namespace.
const std::type_info & CTYPE
Definition: NTupleItems.cpp:22
static _Array * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:34
STL class.
NTuple interface class definition.
Definition: INTuple.h:82
#define INSTANTIATE(TYP)
Definition: NTupleItems.cpp:49
Concrete class discribing a column-array in a N tuple.
Definition: NTupleItems.h:38
const std::string & CSTR
Definition: NTupleItems.cpp:21
Concrete class discribing a column in a N tuple.
Definition: NTupleItems.h:36
static _Item * create(INTuple *tup, const std::string &name, const std::type_info &info, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:26
Opaque address interface definition.
static _Matrix * create(INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long ncol, long nrow, TYP min, TYP max, TYP def)
Create instance.
Definition: NTupleItems.cpp:42
Abstract class describing a column-array in a N tuple.
Definition: NTuple.h:43