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

CdbNTupleFactoryFE.hh

Go to the documentation of this file.
00001 #ifndef CDB_NTUPLE_FACTORY_FE_HH
00002 #define CDB_NTUPLE_FACTORY_FE_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbNTupleFactoryFE.hh,v 1.2 2004/04/02 07:41:28 gapon Exp $
00006 
00007 #include "CdbTable/CdbNTupleFactory.hh"
00008 
00009 /// A simplified "front-end" utility class for the n-tuples factory
00010 /**
00011   * This class does not require passing a tuple parameters (a type of elemnets and
00012   * the number of columns) explicitly. It derives these parameters from the pointetr onto
00013   * the tuple.
00014   */
00015 class CdbNTupleFactoryFE {
00016 
00017 public:
00018 
00019   /// Create a simple implementation of the n-tuple
00020   /**
00021     * @see CdbNTupleFactory::createSimple()
00022     */
00023     template< class        T,
00024               unsigned int NCOL >
00025     static void createSimple( CdbCPtr< CdbNTuple<T,NCOL> >& thePtr,
00026                               const std::string&            theName        = "",
00027                               const std::string&            theDescription = "" )
00028     {
00029         thePtr = CdbNTupleFactory<T,NCOL>::createSimple( theName,
00030                                                          theDescription );
00031     }
00032 
00033   /// Create a simple implementation of the n-tuple
00034   /**
00035     * @see CdbNTupleFactory::createSimple()
00036     */
00037     template< class        T,
00038               unsigned int NCOL >
00039     static void createSimple( CdbCPtr< CdbNTuple<T,NCOL> >&   thePtr,
00040                               const std::vector<std::string>& theCollumnNames,
00041                               const std::string&              theName        = "",
00042                               const std::string&              theDescription = "" )
00043     {
00044         thePtr = CdbNTupleFactory<T,NCOL>::createSimple( theCollumnNames,
00045                                                          theName,
00046                                                          theDescription );
00047     }
00048 
00049   /// Create a simple implementation of the n-tuple
00050   /**
00051     * @see CdbNTupleFactory::createSimple()
00052     */
00053     template< class        T,
00054               unsigned int NCOL >
00055     static void createSimple( CdbNTuple<T,NCOL>*& thePtr,
00056                               const std::string&  theName        = "",
00057                               const std::string&  theDescription = "" )
00058     {
00059         CdbNTupleFactory<T,NCOL>::createSimple( thePtr,
00060                                                 theName,
00061                                                 theDescription );
00062     }
00063 
00064   /// Create a simple implementation of the n-tuple
00065   /**
00066     * @see CdbNTupleFactory::createSimple()
00067     */
00068     template< class        T,
00069               unsigned int NCOL >
00070     static void createSimple( CdbNTuple<T,NCOL>*&             thePtr,
00071                               const std::vector<std::string>& theCollumnNames,
00072                               const std::string&              theName        = "",
00073                               const std::string&              theDescription = "" )
00074     {
00075         CdbNTupleFactory<T,NCOL>::createSimple( thePtr,
00076                                                 theCollumnNames,
00077                                                 theName,
00078                                                 theDescription );
00079     }
00080 };
00081 
00082 #endif // CDB_NTUPLE_FACTORY_FE_HH
00083 

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