| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

# NTupleItems.cpp

Go to the documentation of this file.

    00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/src/Lib/NTupleItems.cpp,v 1.6 2006/05/02 13:03:04 hmd 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 // Framework include files
    00018 #include "GaudiKernel/NTupleItems.h"
    00019 #include "GaudiKernel/DataObject.h"
    00020 #include "GaudiKernel/ContainedObject.h"
    00021
    00022 typedef const std::string& CSTR;
    00023 typedef const std::type_info& CTYPE;
    00024
    00026 template <class TYP> NTuple::_Item<TYP>*
    00027 NTuple::_Item<TYP>::create(INTuple* tup,const std::string& name,const std::type_info& info,TYP min,TYP max,TYP def) {
    00028   _ItemImp<TYP>* result = new _ItemImp<TYP>(tup, name, info, min, max, def);
    00029   return result;
    00030 }
    00031
    00033 template <class TYP> NTuple::_Array<TYP>*
    00034 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)   {
    00035   _ArrayImp<TYP>* result = new _ArrayImp<TYP>(tup,name,info,idx,len,min,max,def);
    00036   return result;
    00037 }
    00038
    00040 template <class TYP> NTuple::_Matrix<TYP>*
    00041 NTuple::_Matrix<TYP>::create(INTuple* tup,const std::string& name,const std::type_info& info,const std::string& idx,
    00042                              long ncol,long nrow,TYP min,TYP max,TYP def)   {
    00043   _MatrixImp<TYP>* result = new _MatrixImp<TYP>(tup,name,info,idx,ncol,nrow,min,max,def);
    00044   return result;
    00045 }
    00046
    00047 #define INSTANTIATE(TYP)  \
    00048   template class NTuple::_Item<TYP>;\
    00049   template class NTuple::_Array<TYP>;\
    00050   template class NTuple::_Matrix<TYP>;
    00051 // This makes the stuff accessible from outside
    00052 // (instruct the compiler to create specific instances....)
    00053 INSTANTIATE(bool)
    00054 INSTANTIATE(char)
    00055 INSTANTIATE(unsigned char)
    00056 INSTANTIATE(short)
    00057 INSTANTIATE(unsigned short)
    00058 INSTANTIATE(int)
    00059 INSTANTIATE(unsigned int)
    00060 INSTANTIATE(long)
    00061 INSTANTIATE(unsigned long)
    00062 INSTANTIATE(float)
    00063 INSTANTIATE(double)
    00064 INSTANTIATE(void*)
    00065 INSTANTIATE(IOpaqueAddress*)
    00066 //typedef SmartRef<DataObject> DataObjectRef;
    00067 //INSTANTIATE( DataObjectRef )
    00068 //typedef SmartRef<ContainedObject> ContainedObjectRef;
    00069 //INSTANTIATE( ContainedObjectRef )
    00070 INSTANTIATE(std::string)
    00071
    00072 #undef INSTANTIATE

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines