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

CdbRooNTupleBaseR.rdl

Go to the documentation of this file.
00001 #ifndef CDBROOTABLE_NTUPLE_BASE_R_RDL
00002 #define CDBROOTABLE_NTUPLE_BASE_R_RDL
00003 
00004 // File and Version Information:
00005 //      $Id: CdbRooNTupleBaseR.rdl,v 1.2 2005/01/09 19:33:17 gapon Exp $
00006 
00007 #include "CdbRoo/CdbRooObjectR.hh"
00008 
00009 #include <string>
00010 #include <vector>
00011 
00012 /// An abstract base class for persistent n-tuples
00013 /**
00014   * This class carries the configuration and metadata information about specific
00015   * n-tuples. This information includes:
00016   *
00017   *   - the number of elements in a row (configuration)
00018   *   - a name of a tuple (metadata)
00019   *   - a description of a tuple (metadata)
00020   *
00021   * RESTRICTIONS:
00022   *
00023   *   (1) Columns are numbered beginning from 0.
00024   *
00025   *   (2) The number of columns passed to the constructor(s) of the class must
00026   *       be greater than 0. Otherwise an assertion in the constructor(s) would
00027   *       be imminent.
00028   */
00029 class CdbRooNTupleBaseR : public CdbRooObjectR {
00030 
00031 protected:
00032 
00033   /// Default constructor
00034   /**
00035     * Is useless, but it's required by the ROOT I/O streamers. Any attempts to use an object
00036     * constructed in this way would result in the corresponding errors reported.
00037     */
00038     CdbRooNTupleBaseR( );
00039 
00040   /// Normal constructor
00041   /**
00042     * All parameters are required
00043     */
00044     CdbRooNTupleBaseR( UInt_t                          theNumberOfColumns,
00045                        const std::string&              theName,
00046                        const std::string&              theDescription,
00047                        const std::vector<std::string>& theColumnNames );
00048 
00049 public:
00050 
00051   /// Destructor
00052 
00053     virtual ~CdbRooNTupleBaseR( );
00054 
00055   /// Get the number of columns
00056 
00057     UInt_t columns( ) const { return _columns; }
00058 
00059   /// Get the name
00060 
00061     const std::string& name( ) const { return _name; }
00062 
00063   /// Get the description
00064 
00065     const std::string& description( ) const { return _description; }
00066 
00067   /// Get column names
00068 
00069     void column_names( std::vector<std::string>& theColumnNames ) const { theColumnNames = _columnNames; }
00070 
00071 private:
00072 
00073     UInt_t _columns;            // Number of columns
00074 
00075     std::string _name;          // The name of the tuple
00076     std::string _description;   // The description of the tuple
00077 
00078     std::vector<std::string> _columnNames;
00079 
00080     ClassDef(CdbRooNTupleBaseR,1);
00081 };
00082 
00083 #endif /* CDBROOTABLE_NTUPLE_BASE_R_RDL */

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