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

CdbRooNTupleSimpleImplR.rdl

Go to the documentation of this file.
00001 #ifndef CDBROOTABLE_NTUPLE_SIMPLE_IMPL_R_RDL
00002 #define CDBROOTABLE_NTUPLE_SIMPLE_IMPL_R_RDL
00003 
00004 // File and Version Information:
00005 //      $Id: CdbRooNTupleSimpleImplR.rdl,v 1.2 2005/01/09 19:33:17 gapon Exp $
00006 
00007 #include "CdbRooTable/CdbRooNTupleR.hh"
00008 
00009 /// An implementation of a base class for persistent n-tuples
00010 /**
00011   * This implementation uses the STD vector class for internal  storing of
00012   * n-tuple elements.
00013   *
00014   * @see CdbRooNTupleBaseR
00015   * @see CdbRooNTupleR
00016   */
00017 template< class E >
00018 class CdbRooNTupleSimpleImplR : public CdbRooNTupleR<E> {
00019 
00020 public:
00021 
00022   /// Default constructor
00023   /**
00024     * Is useless, but it's required by the ROOT I/O streamers. Any attempts to use an object
00025     * constructed in this way would result in the corresponding errors reported.
00026     */
00027     CdbRooNTupleSimpleImplR( );
00028 
00029   /// Constructor
00030   /**
00031     * @see CdbRooNTupleBaseR::CdbRooNTupleBaseR
00032     * @see CdbRooNTupleR::CdbRooNTupleR
00033     */
00034     CdbRooNTupleSimpleImplR( UInt_t                          theNumberOfColumns,
00035                              const std::string&              theName,
00036                              const std::string&              theDescription,
00037                              const std::vector<std::string>& theColumnNames );
00038 
00039   /// Destructor
00040 
00041     virtual ~CdbRooNTupleSimpleImplR ( );
00042 
00043   /// Get the number of rows in the tuple
00044   /**
00045     * Implements a virtual method defined in the base class.
00046     *
00047     * @see CdbRooNTupleR::rows
00048     */
00049     virtual UInt_t rows( ) const { return _data.size( ); }
00050 
00051   /// Get a row at a specified position
00052   /**
00053     * Implements a virtual method defined in the base class.
00054     *
00055     * @see CdbRooNTupleR::get_row
00056     */
00057     virtual CdbStatus get_row( std::vector<E>& theRow,
00058                                const UInt_t    theNumber ) const;
00059 
00060   /// Append a row by the end of an existing list
00061   /**
00062     * Implements a virtual method defined in the base class.
00063     *
00064     * @see CdbRooNTupleR::append_row
00065     */
00066     virtual CdbStatus append_row( const std::vector<E>& theRow );
00067 
00068 private:
00069 
00070   // The storage for the tuple elements
00071 
00072     std::vector< std::vector<E> > _data;
00073 
00074     ClassDefT(CdbRooNTupleSimpleImplR<E>,1);
00075 };
00076 
00077 // Template class implementation
00078 
00079 #ifndef __CINT__
00080 #ifdef    BABAR_COMP_INST
00081 #include "CdbRooTable/CdbRooNTupleSimpleImplR.cc"
00082 #endif
00083 #endif /* BABAR_COMP_INST */
00084 
00085 #endif /* CDBROOTABLE_NTUPLE_SIMPLE_IMPL_R_RDL */

Generated on Mon Dec 5 18:22:09 2005 for CDB by doxygen1.3-rc3