Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  return new _ItemImp<TYP>( tup, name, info, min, max, def );
29 }
30 
32 template <class TYP>
34  const std::string& idx, long len, TYP min, TYP max, TYP def ) {
35  return new _ArrayImp<TYP>( tup, name, info, idx, len, min, max, def );
36 }
37 
39 template <class TYP>
41  const std::string& idx, long ncol, long nrow, TYP min, TYP max,
42  TYP def ) {
43  return new _MatrixImp<TYP>( tup, name, info, idx, ncol, nrow, min, max, def );
44 }
45 
46 #define INSTANTIATE( TYP ) \
47  template class NTuple::_Item<TYP>; \
48  template class NTuple::_Array<TYP>; \
49  template class NTuple::_Matrix<TYP>;
50 // This makes the stuff accessible from outside
51 // (instruct the compiler to explicitly instantiate specific instances....)
52 INSTANTIATE( bool )
53 INSTANTIATE( char )
54 INSTANTIATE( unsigned char )
55 INSTANTIATE( short )
56 INSTANTIATE( unsigned short )
57 INSTANTIATE( int )
58 INSTANTIATE( unsigned int )
59 INSTANTIATE( long )
60 INSTANTIATE( long long )
61 INSTANTIATE( unsigned long )
62 INSTANTIATE( unsigned long long )
63 INSTANTIATE( float )
64 INSTANTIATE( double )
65 INSTANTIATE( void* )
67 INSTANTIATE( std::string )
68 
69 #undef INSTANTIATE
Abstract class describing a matrix column in a N tuple.
Definition: NTuple.h:44
Abstract class describing a column in a N tuple.
Definition: NTuple.h:40
Concrete class discribing a matrix column in a N tuple.
Definition: NTupleItems.h:39
EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:202
STL namespace.
EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
Definition: EventIDBase.h:215
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:33
STL class.
NTuple interface class definition.
Definition: INTuple.h:81
#define INSTANTIATE(TYP)
Definition: NTupleItems.cpp:46
Concrete class discribing a column-array in a N tuple.
Definition: NTupleItems.h:37
const std::string & CSTR
Definition: NTupleItems.cpp:21
Concrete class discribing a column in a N tuple.
Definition: NTupleItems.h:35
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:40
Abstract class describing a column-array in a N tuple.
Definition: NTuple.h:42