| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
18 #include "GaudiKernel/NTupleItems.h"
19 #include "GaudiKernel/DataObject.h"
20 #include "GaudiKernel/ContainedObject.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*)
67 INSTANTIATE(IOpaqueAddress*)
68 //typedef SmartRef<DataObject> DataObjectRef;
69 //INSTANTIATE( DataObjectRef )
70 //typedef SmartRef<ContainedObject> ContainedObjectRef;
71 //INSTANTIATE( ContainedObjectRef )
72 INSTANTIATE(std::string)
73
74 #undef INSTANTIATE