| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# 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
    00020 // Forward declarations
    00021 class INTuple;
    00022 class DbSelect;
    00023 class DataObject;
    00024 class ISelectStatement;
    00025 namespace pool {
    00026   class DbTypeInfo;
    00027   class IContainer;
    00028   class ITokenIterator;
    00029 }
    00030
    00040 class PoolDbTupleCallback
    00041   : public pool::DbDefaultDataHandler,
    00042     public pool::DbObjectCallBack
    00043 {
    00045   typedef const ROOT::Reflex::Type& TypeH;
    00047   std::vector< void* >          m_addr;
    00049   std::vector<PoolDbTokenWrap>  m_links;
    00051   std::vector<PoolDbTokenWrap*> m_plinks;
    00053   std::vector<int>              m_map;
    00055   pool::DbSelect*               m_iter;
    00057   pool::DbBlob                  m_stream;
    00059   pool::DbContainer             m_cntH;
    00061   long                          m_refCount;
    00062
    00063 public:
    00065
    00072   PoolDbTupleCallback(DataObject* pObj);
    00074   virtual ~PoolDbTupleCallback();
    00076   virtual pool::DataCallBack* clone() const;
    00078   virtual void release();
    00080   std::vector<void*>& addresses()               {  return m_addr;     }
    00082   const std::vector<int>& mapping()             {  return m_map;      }
    00084   std::vector<PoolDbTokenWrap*>& links()        {  return m_plinks; }
    00086   pool::DbBlob& stream()                        {  return m_stream;   }
    00088   pool::DbSelect* iterator() const              {  return m_iter;     }
    00090   pool::DbSelect* select(ISelectStatement* sel);
    00092   void configure(const INTuple* pTuple,
    00093                  const pool::DbTypeInfo* typ,
    00094                  const pool::DbContainer& cntH);
    00095
    00097   virtual pool::DbStatus start (CallType  action_type,
    00098                                 void*     pObj,
    00099                                 void**    context);
    00100
    00102   virtual pool::DbStatus end(CallType action_type, void* context);
    00103
    00105   virtual pool::DbStatus bind(CallType              action_type,
    00106                               const pool::DbColumn* col_ident,
    00107                               int                   col_number,
    00108                               void*                 context,
    00109                               void**                data_pointer);
    00110 };
    00111 #endif // POOL_POOLDBTUPLECALLBACK_H