All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
NTupleItems.cpp
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/src/Lib/NTupleItems.cpp,v 1.6 2006/05/02 13:03:04 hmd Exp $
2 //====================================================================
3 // NTuple name space implementation
4 //--------------------------------------------------------------------
5 //
6 // Package : Gaudi/NTupleSvc ( The LHCb Offline System)
7 // Author : M.Frank
8 //
9 // +---------+----------------------------------------------+--------+
10 // | Date | Comment | Who |
11 // +---------+----------------------------------------------+--------+
12 // | 21/10/99| Initial version. | MF |
13 // +---------+----------------------------------------------+--------+
14 //====================================================================
15 #define GAUDI_NTUPLEITEMS_CPP 1
16 
17 // Framework include files
19 #include "GaudiKernel/DataObject.h"
21 
22 typedef const std::string& CSTR;
23 typedef const std::type_info& CTYPE;
24 
26 template <class TYP> NTuple::_Item<TYP>*
27 NTuple::_Item<TYP>::create(INTuple* tup,const std::string& name,const std::type_info& info,TYP min,TYP max,TYP def) {
28  _ItemImp<TYP>* result = new _ItemImp<TYP>(tup, name, info, min, max, def);
29  return result;
30 }
31 
33 template <class TYP> NTuple::_Array<TYP>*
34 NTuple::_Array<TYP>::create(INTuple* tup,const std::string& name,const std::type_info& info,const std::string& idx,long len,TYP min,TYP max,TYP def) {
35  _ArrayImp<TYP>* result = new _ArrayImp<TYP>(tup,name,info,idx,len,min,max,def);
36  return result;
37 }
38 
40 template <class TYP> NTuple::_Matrix<TYP>*
41 NTuple::_Matrix<TYP>::create(INTuple* tup,const std::string& name,const std::type_info& info,const std::string& idx,
42  long ncol,long nrow,TYP min,TYP max,TYP def) {
43  _MatrixImp<TYP>* result = new _MatrixImp<TYP>(tup,name,info,idx,ncol,nrow,min,max,def);
44  return result;
45 }
46 
47 #define INSTANTIATE(TYP) \
48  template class NTuple::_Item<TYP>;\
49  template class NTuple::_Array<TYP>;\
50  template class NTuple::_Matrix<TYP>;
51 // This makes the stuff accessible from outside
52 // (instruct the compiler to create specific instances....)
53 INSTANTIATE(bool)
54 INSTANTIATE(char)
55 INSTANTIATE(unsigned char)
56 INSTANTIATE(short)
57 INSTANTIATE(unsigned short)
58 INSTANTIATE(int)
59 INSTANTIATE(unsigned int)
60 INSTANTIATE(long)
61 INSTANTIATE(long long)
62 INSTANTIATE(unsigned long)
63 INSTANTIATE(unsigned long long)
64 INSTANTIATE(float)
65 INSTANTIATE(double)
66 INSTANTIATE(void*)
68 //typedef SmartRef<DataObject> DataObjectRef;
69 //INSTANTIATE( DataObjectRef )
70 //typedef SmartRef<ContainedObject> ContainedObjectRef;
71 //INSTANTIATE( ContainedObjectRef )
72 INSTANTIATE(std::string)
73 
74 #undef INSTANTIATE
#define INSTANTIATE(TYP)
Definition: NTupleItems.cpp:47
Abstract class describing a matrix column in a N tuple.
Definition: NTuple.h:41
Abstract class describing a column in a N tuple.
Definition: NTuple.h:39
Concrete class discribing a matrix column in a N tuple.
Definition: NTupleItems.h:35
const std::type_info & CTYPE
Definition: NTupleItems.cpp:23
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
NTuple interface class definition.
Definition: INTuple.h:80
Concrete class discribing a column-array in a N tuple.
Definition: NTupleItems.h:34
const std::string & CSTR
Definition: NTupleItems.cpp:22
#define min(a, b)
Concrete class discribing a column in a N tuple.
Definition: NTupleItems.h:33
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:27
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:41
Abstract class describing a column-array in a N tuple.
Definition: NTuple.h:40