Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

NTupleItems.cpp

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GaudiKernel/src/Lib/NTupleItems.cpp,v 1.1.1.1 2001/04/18 18:14:18 tlindner Exp $
00002 //====================================================================
00003 //  NTuple name space implementation
00004 //--------------------------------------------------------------------
00005 //
00006 //  Package    : Gaudi/NTupleSvc ( The LHCb Offline System)
00007 //  Author     : M.Frank
00008 //
00009 //  +---------+----------------------------------------------+--------+
00010 //  |    Date |                 Comment                      | Who    |
00011 //  +---------+----------------------------------------------+--------+
00012 //  | 21/10/99| Initial version.                             | MF     |
00013 //  +---------+----------------------------------------------+--------+
00014 //====================================================================
00015 #define GAUDI_NTUPLEITEMS_CPP 1
00016 
00017 // STL include files
00018 #include <vector>
00019 
00020 // Framework include files
00021 #include "GaudiKernel/NTupleItems.h"
00022 #include "GaudiKernel/DataObject.h"
00023 #include "GaudiKernel/ContainedObject.h"
00024 
00026 template <class TYP> 
00027 NTuple::_Item<TYP>* NTuple::_Item<TYP>::create(INTuple* tup, const std::string& name, TYP min, TYP max, TYP def)   {
00028   _ItemImp<TYP>* result = new _ItemImp<TYP>(tup, name, min, max, def);
00029   return result;
00030 }
00031 
00033 template <class TYP> 
00034 NTuple::_Array<TYP>* NTuple::_Array<TYP>::create(INTuple* tup, const std::string& name, const std::string& index, long len, TYP min, TYP max, TYP def)   {
00035   _ArrayImp<TYP>* result = new _ArrayImp<TYP>(tup, name, index, len, min, max, def);
00036   return result;
00037 }
00038 
00040 template <class TYP> 
00041 NTuple::_Matrix<TYP>* NTuple::_Matrix<TYP>::create(INTuple* tup, const std::string& name, const std::string& index, long ncol, long nrow, TYP min, TYP max, TYP def)   {
00042   _MatrixImp<TYP>* result = new _MatrixImp<TYP>(tup, name, index, ncol, nrow, min, max, def);
00043   return result;
00044 }
00045 
00046 #ifndef sun
00047 #define INSTANTIATE(TYP)  \
00048   template NTuple::_Item<TYP>;\
00049   template NTuple::_Array<TYP>;\
00050   template NTuple::_Matrix<TYP>;
00051 #else
00052 #define INSTANTIATE(TYP)  \
00053   template NTuple::_Item<TYP>*   NTuple::_Item<TYP>::create  (INTuple* tup, const std::string& name, TYP min, TYP max, TYP def);\
00054   template NTuple::_Array<TYP>*  NTuple::_Array<TYP>::create (INTuple* tup, const std::string& name, const std::string& index, long len, TYP min, TYP max, TYP def);\
00055   template NTuple::_Matrix<TYP>* NTuple::_Matrix<TYP>::create(INTuple* tup, const std::string& name, const std::string& index, long nrow, long ncol, TYP min, TYP max, TYP def);
00056 #endif
00057 // This makes the stuff accessible from outside 
00058 // (instruct the compiler to create specific instances....)
00059 INSTANTIATE(bool)
00060 INSTANTIATE(char)
00061 INSTANTIATE(unsigned char)
00062 INSTANTIATE(short)
00063 INSTANTIATE(unsigned short)
00064 INSTANTIATE(int)
00065 INSTANTIATE(unsigned int)
00066 INSTANTIATE(long)
00067 INSTANTIATE(unsigned long)
00068 INSTANTIATE(float)
00069 INSTANTIATE(double)
00070 INSTANTIATE(IOpaqueAddress*)
00071 //typedef SmartRef<DataObject> DataObjectRef;
00072 //INSTANTIATE( DataObjectRef )
00073 //typedef SmartRef<ContainedObject> ContainedObjectRef;
00074 //INSTANTIATE( ContainedObjectRef )
00075 INSTANTIATE(std::string)
00076 
00077 #undef INSTANTIATE

Generated at Wed Nov 21 12:22:04 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000