00001
00002
00003 #include "BaBar/BaBar.hh"
00004
00005
00006
00007
00008
00009
00010 #include "CdbBdbTable/CdbBdbNTupleFactory.hh"
00011 #include "CdbBdbTable/CdbBdbNTupleT2P.hh"
00012
00013 #include <assert.h>
00014
00015 template< class T,
00016 unsigned int NCOL >
00017 CdbBdbNTupleFactory<T,NCOL>::CdbBdbNTupleFactory( const CdbCPtr< CdbNTuple<T,NCOL> >& thePtr ) :
00018 _ptr(thePtr)
00019 {
00020 assert( !_ptr.isNull( ));
00021 }
00022
00023 template< class T,
00024 unsigned int NCOL >
00025 CdbBdbNTupleFactory<T,NCOL>::~CdbBdbNTupleFactory( )
00026 { }
00027
00028 template< class T,
00029 unsigned int NCOL >
00030 CdbStatus
00031 CdbBdbNTupleFactory<T,NCOL>::doCreate( BdbHandle(BdbObject)& theProduct,
00032 const BdbRefAny& theHint )
00033 {
00034 BdbRef(BdbObject) productRef = 0;
00035 CdbStatus result = CdbBdbNTupleT2P<>::convert( productRef,
00036 _ptr,
00037 theHint );
00038 if( CdbStatus::Success == result ) {
00039 assert( !BdbIsNull(productRef ));
00040 theProduct = productRef;
00041 }
00042 return result;
00043 }
00044
00045
00046
00047