00001 // File and Version Information: 00002 // $Id: CdbRooNTupleSimpleImplR.cc,v 1.2 2005/01/11 09:02:38 gapon Exp $ 00003 00004 /// The implementation file for the CdbRooNTupleSimpleImplR class 00005 /** 00006 * @see CdbRooNTupleSimpleImplR 00007 */ 00008 #include "BaBar/BaBar.hh" 00009 00010 #include "CdbRooTable/CdbRooNTupleSimpleImplR.hh" 00011 00012 #include <assert.h> 00013 00014 #include <iostream> 00015 using std::cout; 00016 using std::endl; 00017 00018 template< class E > 00019 CdbRooNTupleSimpleImplR<E>::CdbRooNTupleSimpleImplR( ) : 00020 CdbRooNTupleR<E>( ) 00021 { } 00022 00023 template< class E > 00024 CdbRooNTupleSimpleImplR<E>::CdbRooNTupleSimpleImplR( UInt_t theNumberOfColumns, 00025 const std::string& theName, 00026 const std::string& theDescription, 00027 const std::vector<std::string>& theColumnNames ) : 00028 CdbRooNTupleR<E>( theNumberOfColumns, 00029 theName, 00030 theDescription, 00031 theColumnNames ) 00032 { } 00033 00034 template< class E > 00035 CdbRooNTupleSimpleImplR<E>::~CdbRooNTupleSimpleImplR( ) 00036 { } 00037 00038 template< class E > 00039 CdbStatus 00040 CdbRooNTupleSimpleImplR<E>::get_row( std::vector<E>& theRow, 00041 const UInt_t theNumber ) const 00042 { 00043 if( theNumber >= rows( )) return CdbStatus::NotFound; 00044 00045 theRow = _data[theNumber]; 00046 00047 return CdbStatus::Success; 00048 } 00049 00050 template< class E > 00051 CdbStatus 00052 CdbRooNTupleSimpleImplR<E>::append_row( const std::vector<E>& theRow ) 00053 { 00054 if( columns( ) != theRow.size( )) return CdbStatus::IllegalParameters; 00055 00056 _data.push_back( theRow ); 00057 00058 return CdbStatus::Success; 00059 } 00060 00061 ///////////////// 00062 // End Of File // 00063 /////////////////
1.3-rc3