| # Gaudi Framework, version v21r9 |

Home |  | Generated: 3 May 2010

# PoolDbTupleCallback.h

Go to the documentation of this file.

    00001 // $Id: PoolDbTupleCallback.h,v 1.3 2006/01/27 08:27:02 hmd Exp $
    00002 //====================================================================
    00003 // NTuple callback class definition
    00004 //--------------------------------------------------------------------
    00005 //
    00006 //  Package    : PoolDb ( The LHCb Offline System)
    00007 //  Author     : M.Frank
    00008 //
    00009 //====================================================================
    00010 #ifndef POOL_POOLDBTUPLECALLBACK_H
    00011 #define POOL_POOLDBTUPLECALLBACK_H
    00012
    00013 // Include files
    00014 #include "StorageSvc/DbBlob.h"
    00015 #include "StorageSvc/DbContainer.h"
    00016 #include "StorageSvc/DbObjectCallBack.h"
    00017 #include "StorageSvc/DbDefaultDataHandler.h"
    00018 #include "GaudiPoolDb/PoolDbNTupleDescriptor.h"
    00019 #include "GaudiKernel/Kernel.h"
    00020
    00021 // Forward declarations
    00022 class INTuple;
    00023 class DbSelect;
    00024 class DataObject;
    00025 class ISelectStatement;
    00026 namespace pool {
    00027   class DbTypeInfo;
    00028   class IContainer;
    00029   class ITokenIterator;
    00030 }
    00031
    00041 class GAUDI_API PoolDbTupleCallback
    00042   : public pool::DbDefaultDataHandler,
    00043     public pool::DbObjectCallBack
    00044 {
    00046   typedef const ROOT::Reflex::Type& TypeH;
    00048   std::vector< void* >          m_addr;
    00050   std::vector<PoolDbTokenWrap>  m_links;
    00052   std::vector<PoolDbTokenWrap*> m_plinks;
    00054   std::vector<int>              m_map;
    00056   pool::DbSelect*               m_iter;
    00058   pool::DbBlob                  m_stream;
    00060   pool::DbContainer             m_cntH;
    00062   long                          m_refCount;
    00063
    00064 public:
    00066
    00073   PoolDbTupleCallback(DataObject* pObj);
    00075   virtual ~PoolDbTupleCallback();
    00077   virtual pool::DataCallBack* clone() const;
    00079   virtual void release();
    00081   std::vector<void*>& addresses()               {  return m_addr;     }
    00083   const std::vector<int>& mapping()             {  return m_map;      }
    00085   std::vector<PoolDbTokenWrap*>& links()        {  return m_plinks; }
    00087   pool::DbBlob& stream()                        {  return m_stream;   }
    00089   pool::DbSelect* iterator() const              {  return m_iter;     }
    00091   pool::DbSelect* select(ISelectStatement* sel);
    00093   void configure(const INTuple* pTuple,
    00094                  const pool::DbTypeInfo* typ,
    00095                  const pool::DbContainer& cntH);
    00096
    00098   virtual pool::DbStatus start (CallType  action_type,
    00099                                 void*     pObj,
    00100                                 void**    context);
    00101
    00103   virtual pool::DbStatus end(CallType action_type, void* context);
    00104
    00106   virtual pool::DbStatus bind(CallType              action_type,
    00107                               const pool::DbColumn* col_ident,
    00108                               int                   col_number,
    00109                               void*                 context,
    00110                               void**                data_pointer);
    00111 };
    00112 #endif // POOL_POOLDBTUPLECALLBACK_H