| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# NTupleImplementation.h

Go to the documentation of this file.

    00001 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/GaudiKernel/NTupleImplementation.h,v 1.7 2006/12/10 20:29:17 leggett Exp $
    00002 #ifndef GAUDIKERNEL_NTUPLEIMP_H
    00003 #define GAUDIKERNEL_NTUPLEIMP_H
    00004
    00005 // Framework include files
    00006 #include "GaudiKernel/NTuple.h"
    00007 #include "GaudiKernel/Kernel.h"
    00008
    00009 // Forward declarations
    00010 class INTupleSvc;
    00011 class IConversionSvc;
    00012
    00013 namespace NTuple   {
    00014   // Concrete N tuple class definition
    00015   class GAUDI_API TupleImp : public Tuple  {
    00016   protected:
    00018     ItemContainer     m_items;
    00020     bool              m_isBooked;
    00022     std::string       m_title;
    00024     ISelectStatement* m_pSelector;
    00026     char*             m_buffer;
    00028     INTupleSvc*       m_ntupleSvc;
    00030     IConversionSvc*   m_cnvSvc;
    00031   private:
    00033     TupleImp(const TupleImp&) ;
    00034
    00035   public:
    00037     virtual INTupleItem* i_find(const std::string& name)  const;
    00038   public:
    00040     TupleImp( const std::string& title);
    00042     virtual ~TupleImp();
    00044     ItemContainer& items()    {
    00045       return m_items;
    00046     }
    00048     const ItemContainer& items()    const   {
    00049       return m_items;
    00050     }
    00052     virtual const std::string&  title()         const   {
    00053       return m_title;
    00054     }
    00056     virtual const INTupleItem* find(const std::string& name) const    {
    00057       return i_find(name);
    00058     }
    00060     virtual INTupleItem* find(const std::string& name)    {
    00061       return i_find(name);
    00062     }
    00064     char* buffer()    {
    00065       return m_buffer;
    00066     }
    00068     const char* buffer()  const  {
    00069       return m_buffer;
    00070     }
    00072     IConversionSvc* conversionService()   const  {
    00073       return m_cnvSvc;
    00074     }
    00076     void setConversionService( IConversionSvc* svc )    {
    00077       m_cnvSvc = svc;
    00078     }
    00080     INTupleSvc* tupleService()   const  {
    00081       return m_ntupleSvc;
    00082     }
    00084     void setTupleService( INTupleSvc* svc )    {
    00085       m_ntupleSvc = svc;
    00086     }
    00088     virtual StatusCode attachSelector(ISelectStatement* sel);
    00090     virtual ISelectStatement* selector();
    00092     virtual void setBuffer(char* buff);
    00094     virtual void reset();
    00096     virtual StatusCode add(INTupleItem* item);
    00098     virtual StatusCode remove(INTupleItem* item);
    00100     virtual StatusCode remove(const std::string& name);
    00102     virtual StatusCode write();
    00104     virtual StatusCode writeRecord();
    00106     virtual StatusCode read();
    00108     virtual StatusCode readRecord();
    00110     virtual StatusCode save();
    00111
    00112   };  // end class definition: Tuple
    00113
    00114
    00115   // Concrete column wise N tuple class definition
    00116   class ColumnWiseTuple : public TupleImp    {
    00117   public:
    00119     ColumnWiseTuple(const std::string& title ) : TupleImp(title)    {
    00120     }
    00122     virtual ~ColumnWiseTuple()   {
    00123     }
    00125     virtual const CLID& clID() const   {
    00126       return ColumnWiseTuple::classID();
    00127     }
    00129     static const CLID& classID()      {
    00130       return CLID_ColumnWiseTuple;
    00131     }
    00132   };  // end class definition: ColumnWiseTuple
    00133
    00134   // Concrete column wise N tuple class definition
    00135   class RowWiseTuple : public TupleImp    {
    00136   public:
    00138     RowWiseTuple( const std::string& title ) : TupleImp(title)    {
    00139     }
    00141     virtual ~RowWiseTuple()   {
    00142     }
    00144     virtual const CLID& clID() const   {
    00145       return RowWiseTuple::classID();
    00146     }
    00148     static const CLID& classID()      {
    00149       return CLID_RowWiseTuple;
    00150     }
    00151   };  // end class definition: RowWiseTuple
    00152 }   // end name space NTuple
    00153
    00154 #endif  // GAUDIKERNEL_NTUPLEIMP_H