Commits

Anonymous committed 89802c5

add explicit -import=Reflex to requirements

Comments (0)

Files changed (62)

GaudiPython/AlgDecorators.h

+// $Id: AlgDecorators.h,v 1.2 2005/11/08 16:31:03 mato Exp $
+// ============================================================================
+#ifndef GAUDIPYTHON_ALGDECORATORS_H
+#define GAUDIPYTHON_ALGDECORATORS_H 1
+// ============================================================================
+// Include files
+// ============================================================================
+// STD & STL
+// ============================================================================
+#include  <string>
+// ============================================================================
+// GaudiAlg
+// ============================================================================
+#include "GaudiAlg/GaudiAlgorithm.h"
+// ============================================================================
+// GaudiPython
+// ============================================================================
+#include "GaudiPython/GaudiPython.h"
+// ============================================================================
+// forward declarations
+// ============================================================================
+class IInterface     ;
+class IProperty      ;
+class IAlgTool       ;
+class IAlgorithm     ;
+class GaudiAlgorithm ;
+class GaudiTool      ;
+// ============================================================================
+/** @file
+ *
+ *  Collection of "decorators" for python algorithms
+ *
+ *  @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr
+ *  @date   2005-08-03
+ */
+// ============================================================================
+namespace GaudiPython
+{
+  // ==========================================================================
+  /** @class Decorator
+   *  simple class with allows to "decorate" the python
+   *  algorithm with 'basic' funtionality from class GaudiAlgorithm
+   *  @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr
+   *  @date 2007-08-03
+   */
+  class GAUDI_API AlgDecorator
+  {
+  public:
+    // ========================================================================
+    /// the actual type of vector of counters  
+    typedef std::vector<const StatEntity*> Counters   ;
+    typedef std::vector<IAlgTool*>         Tools      ;
+    typedef std::vector<IService*>         Services   ;
+    // ========================================================================
+  public: // the general functional methods 
+    // ========================================================================
+    /** get the tool from GaudiAlgorithm
+     *  @param alg GaudiAlgorithm
+     *  @param type tool type
+     *  @param name tool name
+     *  @param parent tool parent
+     *  @param create flag to create
+     *  @return the tool
+     */
+    static IAlgTool*   tool_
+    ( const GaudiAlgorithm* alg            ,
+      const std::string&    type           ,
+      const std::string&    name           ,
+      const IInterface*     parent = 0     ,
+      const bool            create = true  ) ;
+    /** get the tool from GaudiAlgorithm
+     *  @param alg GaudiAlgorithm
+     *  @param typeAndName tool type/name
+     *  @param parent tool parent
+     *  @param create flag to create
+     *  @return the tool
+     */
+    static IAlgTool*   tool_
+    ( const GaudiAlgorithm* alg            ,
+      const std::string&    typeAndName    ,
+      const IInterface*     parent  = 0    ,
+      const bool            create  = true ) ;
+    /** get the service from GaudiAlgorithm
+     *  @param alg GaudiAlgorithm
+     *  @param name service name
+     *  @param create flag to create
+     *  @return the tool
+     */
+    static IInterface* svc_
+    ( const GaudiAlgorithm* alg            ,
+      const std::string&    name           ,
+      const bool            create = false ) ;
+    // ========================================================================
+  public: // inspection: get all counters:
+    // ========================================================================
+    static size_t _counters_a_ 
+    ( const GaudiAlgorithm*     alg   , 
+      std::vector<std::string>& names , Counters&  out ) ;
+    static size_t _counters_t_ 
+    ( const GaudiTool*          alg   , 
+      std::vector<std::string>& names , Counters&  out ) ;
+    static size_t _counters_a_ 
+    ( const IAlgorithm*         alg   , 
+      std::vector<std::string>& names , Counters&  out ) ;
+    static size_t _counters_t_ 
+    ( const IAlgTool*           alg   , 
+      std::vector<std::string>& names , Counters&  out ) ;
+    // ========================================================================
+  public: // inspection: get the counter
+    // ========================================================================    
+    static const StatEntity* _counter_a_ 
+    ( const GaudiAlgorithm*     alg   , const std::string& name ) ;
+    static const StatEntity* _counter_t_ 
+    ( const GaudiTool*          alg   , const std::string& name ) ;
+    static const StatEntity* _counter_a_ 
+    ( const IAlgorithm*         alg   , const std::string& name ) ;
+    static const StatEntity* _counter_t_ 
+    ( const IAlgTool*           alg   , const std::string& name ) ;
+    // ========================================================================    
+  public: // inspection: get all tools 
+    // ========================================================================    
+    static size_t _tools_a_ ( const GaudiAlgorithm* , Tools&    tools ) ;
+    static size_t _tools_t_ ( const GaudiTool*      , Tools&    tools ) ;
+    static size_t _tools_a_ ( const IAlgorithm*     , Tools&    tools ) ;
+    static size_t _tools_t_ ( const IAlgTool*       , Tools&    tools ) ;
+    // ========================================================================    
+  };
+  // ==========================================================================
+} //                                               end of namespace GaudiPython
+// ============================================================================
+// The END 
+// ============================================================================
+#endif // GAUDIPYTHON_ALGDECORATORS_H
+// ============================================================================

GaudiPython/Algorithm.h

+// $Id: Algorithm.h,v 1.20 2008/10/28 10:40:19 marcocle Exp $
+// ============================================================================
+// ============================================================================
+#ifndef GAUDIPYTHON_ALGORITHM_H
+#define GAUDIPYTHON_ALGORITHM_H
+// ============================================================================
+// Include Files
+// ============================================================================
+// GaudiKernel
+// ============================================================================
+#include "GaudiKernel/Algorithm.h"
+#include "GaudiKernel/Bootstrap.h"
+// ============================================================================
+// GaudiPython
+// ============================================================================
+#include "GaudiPython/GaudiPython.h"
+// ============================================================================
+// Python
+// ============================================================================
+#include "Python.h"
+// ============================================================================
+
+namespace GaudiPython
+{
+  /// call the python method
+  GAUDI_API StatusCode call_python_method ( PyObject* self , const char* method ) ;
+}
+
+namespace GaudiPython
+{
+
+  /** @class PyAlgorithm
+   *  Python Algorithm base class
+   */
+  class GAUDI_API PyAlgorithm : public Algorithm
+  {
+  public:
+    /** constructor
+     *  @param self python objects
+     *  @param name name of algorithm instance
+     */
+    PyAlgorithm
+    ( PyObject*          self ,
+      const std::string& name ) ;
+  public:
+    StatusCode  initialize () ;
+    StatusCode  start      () ;
+    StatusCode  beginRun   () ;
+    StatusCode  endRun     () ;
+    StatusCode  execute    () ;
+    StatusCode  stop       () ;
+    StatusCode  finalize   () ;
+    IAlgorithm* myself() { return this; }
+  private:
+    PyObject* m_self;
+  };
+  // ==========================================================================
+  /** @class PyAlg
+   *  general class to embed the existing algorithm/base class
+   *  into the python
+   *  @author Vanya BELYAEV  Ivan.Belyaev@lapp.in2p3.fr
+   *  @date 2005-08-03
+   */
+  template <class ALGORITHM>
+  class GAUDI_API PyAlg : public          ALGORITHM 
+  {
+    // ========================================================================
+  public:
+    // ========================================================================
+    /** constructor from Python object and the name
+     *  @param self python object
+     *  @param name name of algorithm instance
+     */
+    PyAlg
+    ( PyObject*          self ,
+      const std::string& name )
+      : ALGORITHM ( name , Gaudi::svcLocator() )
+      , m_self ( self )
+    {
+      // the printout of actual type for embedded algorithm has no sense
+      this -> setProperty ( "TypePrint" , "false" ) ;
+      this -> setProperty ( "StatPrint" , "true"  ) ;
+      // The owner of the Algorithm is Python (as creator) therefore
+      // it should not be deleted by Gaudi (added an extra addRef()).
+      this -> addRef() ;
+      this -> addRef() ;
+    }
+    // ========================================================================
+  protected:
+    // ========================================================================
+    /// virtual destructor
+    virtual ~PyAlg() {}                                   // virtual destructor
+    /// get the object 
+    PyObject* _obj() const { return m_self ; }            //     get the object 
+    // ========================================================================
+  public:
+    // ========================================================================
+    virtual StatusCode initialize  ()
+    { return GaudiPython::call_python_method ( m_self , "initialize" ) ; }
+    virtual StatusCode start  ()
+    { return GaudiPython::call_python_method ( m_self , "start"      ) ; }
+    virtual StatusCode beginRun  ()
+    { return GaudiPython::call_python_method ( m_self , "beginRun"   ) ; }
+    virtual StatusCode endRun  ()
+    { return GaudiPython::call_python_method ( m_self , "endRun"     ) ; }
+    virtual StatusCode execute     ()
+    { return GaudiPython::call_python_method ( m_self , "execute"    ) ; }
+    virtual StatusCode stop  ()
+    { return GaudiPython::call_python_method ( m_self , "stop"       ) ; }
+    virtual StatusCode finalize    ()
+    { return GaudiPython::call_python_method ( m_self , "finalize"   ) ; }
+    // ========================================================================
+    virtual IAlgorithm* ialgorithm () { return this ; }
+    virtual IProperty*  iproperty  () { return this ; }
+    // ========================================================================
+    // preserve the existing methods
+    virtual StatusCode initialize_ () { return ALGORITHM::initialize () ; }
+    virtual StatusCode finalize_   () { return ALGORITHM::finalize   () ; }
+    // ========================================================================
+  private:
+    // ========================================================================
+    /// the default constructor is disabled
+    PyAlg() ;                            // the default constructor is disabled
+    /// the copy constructor is disabled
+    PyAlg ( const PyAlg& );              //    the copy constructor is disabled
+    /// the assignment operator is disabled
+    PyAlg& operator=( const PyAlg& ) ;   // the assignment operator is disabled
+    // ========================================================================
+  private:
+    // ========================================================================
+    /// "shadow" python class
+    PyObject* m_self;                                  // "shadow" python class
+    // ========================================================================
+  } ;
+  // ==========================================================================
+} //                                               end of namespace GaudiPython
+// ============================================================================
+// The END
+// ============================================================================
+#endif // GAUDIPYTHON_ALGORITHM_H
+// ============================================================================

GaudiPython/CallbackStreamBuf.h

+#ifndef GAUDIPYTHON_CALLBACKSTREAMBUF_H
+#define GAUDIPYTHON_CALLBACKSTREAMBUF_H
+// ============================================================================
+#include <sstream>    //included for stringbuf
+// ============================================================================
+#include "Python.h"   //included for the python API
+// ============================================================================
+#include "GaudiPython/GaudiPython.h"
+// ============================================================================
+
+namespace GaudiPython
+{
+  int GAUDI_API call_python_method(PyObject* self, const char* method, char* buf);
+
+  class GAUDI_API CallbackStreamBuf: public std::stringbuf
+  {
+    private:
+      PyObject* m_self;
+      char* m_callbackBuff;
+
+    public:
+      CallbackStreamBuf(PyObject* self);
+      ~CallbackStreamBuf();
+      virtual int sync() ;
+  }; //CallbackStreamBuf
+
+} //namespace GaudiPython
+
+#endif

GaudiPython/GaudiPython.h

+// $Id: GaudiPython.h,v 1.7 2005/11/08 16:31:03 mato Exp $
+// ============================================================================
+#ifndef GAUDIPYTHON_GAUDIPYTHON_H 
+#define GAUDIPYTHON_GAUDIPYTHON_H 1
+// ============================================================================
+// Include files
+// ============================================================================
+
+/** @namespace GaudiPython GaudiPython.h GaudiPython/GaudiPython.h
+ *
+ *  The general namespace to hide all Gaudi-python related classes  
+ *
+ *  @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr 
+ *  @date   2005-08-04
+ */
+namespace GaudiPython 
+{
+} // end of namespace GaudiPython
+
+#endif // GAUDIPYTHON_GAUDIPYTHON_H

GaudiPython/Helpers.h

+#ifndef GAUDIPYTHON_HELPERS_H
+#define GAUDIPYTHON_HELPERS_H
+
+// Framework
+#include "GaudiKernel/IAlgManager.h"
+#include "GaudiKernel/IAlgorithm.h"
+#include "GaudiKernel/IAlgTool.h"
+
+#ifdef _POSIX_C_SOURCE
+#undef _POSIX_C_SOURCE
+#endif
+#include "Python.h"
+
+#if PY_VERSION_HEX < 0x02050000
+// Note (MCl):
+// In Python 2.5, all the functions working with lenghts use the type PySsize_t
+// instead of int. The also changed the name of the typedefs for those functions.
+// Here we use:
+//  intargfunc -> ssizeargfunc
+//  inquiry    -> lenfunc
+//
+/// For compatibility with Python 2.4 and 2.5
+typedef int Py_ssize_t;
+#endif
+
+// the following is done instead of including Python.h becuase there is
+// a clash with codecs.h defined in Python and the one in VC++ 7.1
+//struct _object;
+//typedef _object PyObject;
+//extern "C" {
+//  PyObject* PyBuffer_FromMemory( void *ptr, int size);
+//}
+
+/** Namespace for all classes interfacing Gaudi to Python.
+ */
+
+namespace GaudiPython {
+
+struct Helper {
+  // This is a number of static functions to overcome the current problem with PyLCGDict that
+  // does not allow to return instances of complex objects by calling arguments
+  // (reference to pointers)
+  Helper() {}
+  // Provided for backward compatibility
+  static IService* service(ISvcLocator* svcloc, const std::string& name, bool createif=false) {
+    return svcloc->service(name, createif).get();
+  }
+  // Provided for backward compatibility
+  static IAlgorithm* algorithm
+  ( IAlgManager*       algmgr           ,
+    const std::string& name             ,
+    const bool         createIf = false )
+  {
+    return algmgr->algorithm(name, createIf).get();
+  }
+  // ==========================================================================
+  static DataObject* dataobject ( IDataProviderSvc*  dpsvc ,
+                                  const std::string& path  )
+  {
+    DataObject* o;
+    if ( dpsvc->retrieveObject(path,o).isSuccess() ) return o;
+    else return 0;
+  }
+  // ==========================================================================
+  /** simple wrapper for IDataProviderSvc::findObject
+   *  The methdod does NOT trigger the loading the object from tape or Data-On-Demand action
+   *  @see IDataProviderSvc
+   *  @see IDataProviderSvc::findObject
+   *  @param psvc (INPUT) pointer to Data ProviderService
+   *  @param path the full path in TES
+   *  @return the object
+   *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+   *  @date 2009-10-09
+   */
+  static GAUDI_API DataObject* findobject
+  ( IDataProviderSvc*  dpsvc ,
+    const std::string& path  ) ;
+  // ==========================================================================
+  /** the generic function to get object from TES
+   *  @see IDataProviderSvc
+   *  @see IDataProviderSvc::findObject
+   *  @see IDataProviderSvc::retriveObject
+   *  @param psvc       (INPUT) pointer to Data ProviderService
+   *  @param path the full path in TES
+   *  @param rerieve    (INPUT) retrieve or find object ?
+   *  @param disableDoD (INPUT) disable 'on-demand-actions' ?
+   *  @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
+   *  @date 2009-10-09
+   */
+  static GAUDI_API DataObject* getobject
+  ( IDataProviderSvc*  dpsvc               ,
+    const std::string& path                ,
+    const bool         retrieve    = true  ,
+    const bool         disableDoD  = false ) ;
+  // ==========================================================================
+  static IAlgTool* tool(IToolSvc* toolsvc, const std::string& type, const std::string& name, IInterface* p, bool cif ) {
+    IAlgTool* o;
+    if ( toolsvc->retrieve(type, name, IAlgTool::interfaceID(), o, p, cif).isSuccess() ) return o;
+    else return 0;
+  }
+  static long loadDynamicLib(const std::string& name) {
+    void* h;
+    return System::loadDynamicLib(name, &h);
+  }
+  static IHistogram1D* histo1D( IHistogramSvc* hsvc, const std::string& path ) {
+    IHistogram1D* h;
+    if ( hsvc->findObject(path, h ).isSuccess() ) return h;
+    else                                          return 0;
+  }
+  static IHistogram2D* histo2D( IHistogramSvc* hsvc, const std::string& path ) {
+    IHistogram2D* h;
+    if ( hsvc->findObject(path, h ).isSuccess() ) return h;
+    else                                          return 0;
+  }
+  static IHistogram3D* histo3D( IHistogramSvc* hsvc, const std::string& path ) {
+    IHistogram3D* h;
+    if ( hsvc->findObject(path, h ).isSuccess() ) return h;
+    else                                          return 0;
+  }
+  static IProfile1D*
+  profile1D
+  ( IHistogramSvc*     hsvc ,
+    const std::string& path )
+  {
+    IProfile1D* h = 0 ;
+    if ( 0 != hsvc && hsvc->findObject ( path , h ).isSuccess() ) { return h ; }
+    return 0 ;
+  }
+  static IProfile2D*
+  profile2D
+  ( IHistogramSvc*     hsvc ,
+    const std::string& path )
+  {
+    IProfile2D* h = 0 ;
+    if ( 0 != hsvc && hsvc->findObject ( path , h ).isSuccess() ) { return h ; }
+    return 0 ;
+  }
+// Array support
+private:
+  template <class T>
+  static Py_ssize_t Array_length( PyObject* self ) {
+#if PY_VERSION_HEX < 0x02050000
+    const
+#endif
+    char* buf = 0;
+    Py_ssize_t size = (*(self->ob_type->tp_as_buffer->bf_getcharbuffer))( self, 0, &buf );
+    return size/sizeof(T);
+  }
+
+  template <class T> static PyObject* toPython(T* o) { return 0; }
+  static PyObject* toPython(int* o) { return PyInt_FromLong((long)*o); }
+  static PyObject* toPython(short* o) { return PyInt_FromLong((long)*o); }
+  static PyObject* toPython(char* o) { return PyInt_FromLong((long)*o); }
+  static PyObject* toPython(long* o) { return PyInt_FromLong(*o); }
+  static PyObject* toPython(float* o) { return PyFloat_FromDouble((double)*o); }
+  static PyObject* toPython(double* o) { return PyFloat_FromDouble(*o); }
+
+  template <class T>
+  static PyObject* Array_item( PyObject* self, Py_ssize_t idx ) {
+#if PY_VERSION_HEX < 0x02050000
+    const
+#endif
+    char* buf = 0;
+    Py_ssize_t size = (*(self->ob_type->tp_as_buffer->bf_getcharbuffer))( self, 0, &buf );
+    if ( idx < 0 || idx >= size/int(sizeof(T)) ) {
+       PyErr_SetString( PyExc_IndexError, "buffer index out of range" );
+       return 0;
+    }
+    return toPython((T*)buf + idx);
+  }
+
+public:
+  template <class T>
+  static PyObject* toArray( T* ptr, Py_ssize_t size ) {
+   static PyTypeObject      type = PyBuffer_Type;
+   static PySequenceMethods meth = *(PyBuffer_Type.tp_as_sequence);
+#if PY_VERSION_HEX < 0x02050000
+   meth.sq_item         = (intargfunc) &Array_item<T>;
+   meth.sq_length       = (inquiry) &Array_length<T>;
+#else
+   meth.sq_item         = (ssizeargfunc) &Array_item<T>;
+   meth.sq_length       = (lenfunc) &Array_length<T>;
+#endif
+   type.tp_as_sequence  = &meth;
+   PyObject* buf = PyBuffer_FromReadWriteMemory( ptr, size*sizeof(T) );
+   buf->ob_type = &type;
+   Py_INCREF( buf->ob_type );
+   return buf;
+  }
+  static PyObject* toIntArray    ( void* ptr, Py_ssize_t size ) { return toArray( (int*)    ptr , size ); }
+  static PyObject* toShortArray  ( void* ptr, Py_ssize_t size ) { return toArray( (short*)  ptr , size ); }
+  static PyObject* toFloatArray  ( void* ptr, Py_ssize_t size ) { return toArray( (float*)  ptr , size ); }
+  static PyObject* toDoubleArray ( void* ptr, Py_ssize_t size ) { return toArray( (double*) ptr , size ); }
+
+  template <class T>
+  static T* toAddress( std::vector<T>& v ) {
+    return &(*v.begin());
+  }
+  template <class T>
+  static T* toAddress( void * a) {
+    return (T*)a;
+  }
+
+};
+
+template PyObject* Helper::toArray(int*,Py_ssize_t);
+template PyObject* Helper::toArray(char*,Py_ssize_t);
+template PyObject* Helper::toArray(short*,Py_ssize_t);
+template PyObject* Helper::toArray(float*,Py_ssize_t);
+template PyObject* Helper::toArray(double*,Py_ssize_t);
+template int* Helper::toAddress(std::vector<int>&);
+template float* Helper::toAddress(std::vector<float>&);
+template double* Helper::toAddress(std::vector<double>&);
+template int* Helper::toAddress<int>(void*);
+template float* Helper::toAddress<float>(void*);
+template double* Helper::toAddress<double>(void*);
+
+} // namespace GaudiPython
+
+#endif // !GAUDIPYTHON_HELPERS_H

GaudiPython/HistoDecorator.h

+// $Id: HistoDecorator.h,v 1.4 2008/10/09 09:59:14 marcocle Exp $
+// ============================================================================
+#ifndef GAUDIPYTHON_HISTODECORATOR_H
+#define GAUDIPYTHON_HISTODECORATOR_H 1
+// ============================================================================
+// Include files
+// ============================================================================
+// GaudiAlg
+// ============================================================================
+#include "GaudiAlg/GaudiHistoAlg.h"
+// ============================================================================
+// GaudiPython
+// ============================================================================
+#include "GaudiPython/GaudiPython.h"
+#include "GaudiPython/Vector.h"
+// ============================================================================
+class GaudiHistoTool ;
+// ============================================================================
+namespace GaudiPython
+{
+  /** @class HistoDecorator                        GaudiPython/HistoDecorator.h
+   *  Simple decorator class to allow to reuse the functionality of
+   *  GaudiHistos<TYPE> class in pythin
+   *  @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr
+   *  @date   2005-08-04
+   */
+  class GAUDI_API HistoDecorator
+  {
+  public:
+    // ========================================================================
+    typedef std::vector<GaudiAlg::ID>        IDs        ;
+    typedef std::vector<AIDA::IHistogram1D*> Histos1D   ;
+    typedef std::vector<AIDA::IHistogram2D*> Histos2D   ;
+    typedef std::vector<AIDA::IHistogram3D*> Histos3D   ;
+    typedef std::vector<AIDA::IProfile1D*>   Profiles1D ;
+    typedef std::vector<AIDA::IProfile2D*>   Profiles2D ;
+    // ========================================================================
+  public:
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data  data
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const double                 data         ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data data
+     *  @param ID   histogram ID
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const double                 data         ,
+      const GaudiAlg::HistoID&     ID           ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data data
+     *  @param ID   histogram ID
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const double                 data         ,
+      const long                   ID           ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data data
+     *  @param ID   histogram ID
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const double                 data         ,
+      const std::string&           ID           ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data vector of data
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const GaudiPython::Vector&   data         ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data vector of data
+     *  @param ID   histogram ID
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const GaudiPython::Vector&   data         ,
+      const GaudiAlg::HistoID&     ID           ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data vector of data
+     *  @param ID   histogram ID
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const GaudiPython::Vector&   data         ,
+      const long                   ID           ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** "plot"(book&fill) a sequence of data from the vector (implicit loop)
+     *  (Expected to be more efficient)
+     *  @param algo the algorihtm
+     *  @param data vector of data
+     *  @param ID   histogram ID
+     *  @param title histogram title
+     *  @param low   low edge
+     *  @param high  high edge
+     *  @param bins  number of bins
+     */
+    static AIDA::IHistogram1D*   plot1D
+    ( const GaudiHistoAlg&         algo         ,
+      const GaudiPython::Vector&   data         ,
+      const std::string&           ID           ,
+      const std::string&           title        ,
+      const double                 low          ,
+      const double                 high         ,
+      const unsigned long          bins  = 100  ) ;
+    // ========================================================================
+    /** fill the 2D histogram (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param binsX  number of bins in x
+     *  @param binsY  number of bins in y
+     *  @param weight weight
+     *  @return pointer to AIDA 2D histogram
+     */
+    static AIDA::IHistogram2D*  plot2D
+    ( const GaudiHistoAlg&      algo         ,
+      const double              valueX       ,
+      const double              valueY       ,
+      const std::string&        title        ,
+      const double              lowX         ,
+      const double              highX        ,
+      const double              lowY         ,
+      const double              highY        ,
+      const unsigned long       binsX  = 50  ,
+      const unsigned long       binsY  = 50  ,
+      const double              weight = 1.0 ) ;
+    // ========================================================================
+    /** fill the 2D histogram with forced ID assignment (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param ID     Histogram ID to use
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param binsX  number of bins in x
+     *  @param binsY  number of bins in y
+     *  @param weight weight
+     *  @return pointer to AIDA 2D histogram
+     */
+    static AIDA::IHistogram2D*  plot2D
+    ( const GaudiHistoAlg&      algo         ,
+      const double              valueX       ,
+      const double              valueY       ,
+      const GaudiAlg::HistoID&  ID           ,
+      const std::string&        title        ,
+      const double              lowX         ,
+      const double              highX        ,
+      const double              lowY         ,
+      const double              highY        ,
+      const unsigned long       binsX  = 50  ,
+      const unsigned long       binsY  = 50  ,
+      const double              weight = 1.0 ) ;
+    // ========================================================================
+    /** fill the 2D histogram with forced ID assignment (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param ID     Histogram ID to use
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param binsX  number of bins in x
+     *  @param binsY  number of bins in y
+     *  @param weight weight
+     *  @return pointer to AIDA 2D histogram
+     */
+    static AIDA::IHistogram2D*  plot2D
+    ( const GaudiHistoAlg&      algo         ,
+      const double              valueX       ,
+      const double              valueY       ,
+      const long                ID           ,
+      const std::string&        title        ,
+      const double              lowX         ,
+      const double              highX        ,
+      const double              lowY         ,
+      const double              highY        ,
+      const unsigned long       binsX  = 50  ,
+      const unsigned long       binsY  = 50  ,
+      const double              weight = 1.0 ) ;
+    // ========================================================================
+    /** fill the 2D histogram with forced ID assignment (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param ID     Histogram ID to use
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param binsX  number of bins in x
+     *  @param binsY  number of bins in y
+     *  @param weight weight
+     *  @return pointer to AIDA 2D histogram
+     */
+    static AIDA::IHistogram2D*  plot2D
+    ( const GaudiHistoAlg&      algo         ,
+      const double              valueX       ,
+      const double              valueY       ,
+      const std::string&        ID           ,
+      const std::string&        title        ,
+      const double              lowX         ,
+      const double              highX        ,
+      const double              lowY         ,
+      const double              highY        ,
+      const unsigned long       binsX  = 50  ,
+      const unsigned long       binsY  = 50  ,
+      const double              weight = 1.0 ) ;
+    // ========================================================================
+    /** fill the 3D histogram (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param valueZ z value to be filled
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param lowZ  low z limit for histogram
+     *  @param highZ high z limit for histogram
+     *  @param binsX number of bins in x
+     *  @param binsY number of bins in y
+     *  @param binsZ number of bins in z
+     *  @param weight weight
+     *  @return pointer to AIDA 3D histogram
+     */
+    static AIDA::IHistogram3D*  plot3D
+    ( const GaudiHistoAlg&      algo   ,
+      const double        valueX       ,
+      const double        valueY       ,
+      const double        valueZ       ,
+      const std::string&  title        ,
+      const double        lowX         ,
+      const double        highX        ,
+      const double        lowY         ,
+      const double        highY        ,
+      const double        lowZ         ,
+      const double        highZ        ,
+      const unsigned long binsX  = 10  ,
+      const unsigned long binsY  = 10  ,
+      const unsigned long binsZ  = 10  ,
+      const double        weight = 1.0 ) ;
+    // ========================================================================
+    /** fill the 3D histogram (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param valueZ z value to be filled
+     *  @param ID     Histogram ID to use
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param lowZ  low z limit for histogram
+     *  @param highZ high z limit for histogram
+     *  @param binsX number of bins in x
+     *  @param binsY number of bins in y
+     *  @param binsZ number of bins in z
+     *  @param weight weight
+     *  @return pointer to AIDA 3D histogram
+     */
+    static AIDA::IHistogram3D*  plot3D
+    ( const GaudiHistoAlg&      algo         ,
+      const double              valueX       ,
+      const double              valueY       ,
+      const double              valueZ       ,
+      const GaudiAlg::HistoID&  ID           ,
+      const std::string&        title        ,
+      const double              lowX         ,
+      const double              highX        ,
+      const double              lowY         ,
+      const double              highY        ,
+      const double              lowZ         ,
+      const double              highZ        ,
+      const unsigned long       binsX  = 10  ,
+      const unsigned long       binsY  = 10  ,
+      const unsigned long       binsZ  = 10  ,
+      const double              weight = 1.0 ) ;
+    // ========================================================================
+    /** fill the 3D histogram (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param valueZ z value to be filled
+     *  @param ID     Histogram ID to use
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param lowZ  low z limit for histogram
+     *  @param highZ high z limit for histogram
+     *  @param binsX number of bins in x
+     *  @param binsY number of bins in y
+     *  @param binsZ number of bins in z
+     *  @param weight weight
+     *  @return pointer to AIDA 3D histogram
+     */
+    static AIDA::IHistogram3D*  plot3D
+    ( const GaudiHistoAlg&      algo         ,
+      const double              valueX       ,
+      const double              valueY       ,
+      const double              valueZ       ,
+      const long                ID           ,
+      const std::string&        title        ,
+      const double              lowX         ,
+      const double              highX        ,
+      const double              lowY         ,
+      const double              highY        ,
+      const double              lowZ         ,
+      const double              highZ        ,
+      const unsigned long       binsX  = 10  ,
+      const unsigned long       binsY  = 10  ,
+      const unsigned long       binsZ  = 10  ,
+      const double              weight = 1.0 ) ;
+    // ========================================================================
+    /** fill the 3D histogram (book on demand)
+     *  @param valueX x value to be filled
+     *  @param valueY y value to be filled
+     *  @param valueZ z value to be filled
+     *  @param ID     Histogram ID to use
+     *  @param title histogram title (must be unique within the algorithm)
+     *  @param lowX  low x limit for histogram
+     *  @param highX high x limit for histogram
+     *  @param lowY  low y limit for histogram
+     *  @param highY high y limit for histogram
+     *  @param lowZ  low z limit for histogram
+     *  @param highZ high z limit for histogram
+     *  @param binsX number of bins in x
+     *  @param binsY number of bins in y
+     *  @param binsZ number of bins in z
+     *  @param weight weight
+     *  @return pointer to AIDA 3D histogram
+     */
+    static AIDA::IHistogram3D*  plot3D
+    ( const GaudiHistoAlg&      algo         ,
+      const double              valueX       ,
+      const double              valueY       ,
+      const double              valueZ       ,
+      const std::string&        ID           ,
+      const std::string&        title        ,
+      const double              lowX         ,
+      const double              highX        ,
+      const double              lowY         ,
+      const double              highY        ,
+      const double              lowZ         ,
+      const double              highZ        ,
+      const unsigned long       binsX  = 10  ,
+      const unsigned long       binsY  = 10  ,
+      const unsigned long       binsZ  = 10  ,
+      const double              weight = 1.0 ) ;
+    // ========================================================================
+    // 1D-profiles: by title
+    // ========================================================================
+    static AIDA::IProfile1D* profile1D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const unsigned long      binsX  = 100 ,
+      const std::string&       opt    = ""  ,
+      const double             lowY   = -std::numeric_limits<double>::max() ,
+      const double             highY  =  std::numeric_limits<double>::max() ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+    // 1D-profiles: by generic ID
+    // ========================================================================
+    static AIDA::IProfile1D* profile1D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const GaudiAlg::HistoID& ID           ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const unsigned long      binsX  = 100 ,
+      const std::string&       opt    = ""  ,
+      const double             lowY   = -std::numeric_limits<double>::max() ,
+      const double             highY  =  std::numeric_limits<double>::max() ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+    // 1D-profiles: by numeric ID
+    // ========================================================================
+    static AIDA::IProfile1D* profile1D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const long               ID           ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const unsigned long      binsX  = 100 ,
+      const std::string&       opt    = ""  ,
+      const double             lowY   = -std::numeric_limits<double>::max() ,
+      const double             highY  =  std::numeric_limits<double>::max() ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+    // 1D-profiles: by string ID
+    // ========================================================================
+    static AIDA::IProfile1D* profile1D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const std::string&       ID           ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const unsigned long      binsX  = 100 ,
+      const std::string&       opt    = ""  ,
+      const double             lowY   = -std::numeric_limits<double>::max() ,
+      const double             highY  =  std::numeric_limits<double>::max() ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+    // 2D-profiles: by title
+    // ========================================================================
+    static AIDA::IProfile2D* profile2D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const double             valueZ       ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const double             lowY         ,
+      const double             highY        ,
+      const unsigned long      binsX  = 50  ,
+      const unsigned long      binsY  = 50  ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+    // 2D-profiles: by generic ID
+    // ========================================================================
+    static AIDA::IProfile2D* profile2D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const double             valueZ       ,
+      const GaudiAlg::HistoID& ID           ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const double             lowY         ,
+      const double             highY        ,
+      const unsigned long      binsX  = 50  ,
+      const unsigned long      binsY  = 50  ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+    // 2D-profiles: by numeric ID
+    // ========================================================================
+    static AIDA::IProfile2D* profile2D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const double             valueZ       ,
+      const long               ID           ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const double             lowY         ,
+      const double             highY        ,
+      const unsigned long      binsX  = 50  ,
+      const unsigned long      binsY  = 50  ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+    // 2D-profiles: by string ID
+    // ========================================================================
+    static AIDA::IProfile2D* profile2D
+    ( const GaudiHistoAlg&     algo         ,
+      const double             valueX       ,
+      const double             valueY       ,
+      const double             valueZ       ,
+      const std::string&       ID           ,
+      const std::string&       title        ,
+      const double             lowX         ,
+      const double             highX        ,
+      const double             lowY         ,
+      const double             highY        ,
+      const unsigned long      binsX  = 50  ,
+      const unsigned long      binsY  = 50  ,
+      const double             weight = 1.0 ) ;
+    // ========================================================================
+  public:
+    // ========================================================================
+    static size_t _histos_a_
+    ( const GaudiHistoAlg*       cmp    , 
+      IDs&                       ids    ,
+      Histos1D&                  histos ) ;
+    static size_t _histos_t_
+    ( const GaudiHistoTool*      cmp    , 
+      IDs&                       ids    ,
+      Histos1D&                  histos ) ;
+    static size_t _histos_a_
+    ( const IAlgorithm*          cmp    , 
+      IDs&                       ids    ,
+      Histos1D&                  histos ) ;
+    static size_t _histos_t_
+    ( const IAlgTool*            cmp    , 
+      IDs&                       ids    ,
+      Histos1D&                  histos ) ;
+    // ========================================================================
+    static size_t _histos_a_ 
+    ( const GaudiHistoAlg*       cmp    , 
+      IDs&                       ids    ,
+      Histos2D&                  histos ) ;
+    static size_t _histos_t_
+    ( const GaudiHistoTool*      cmp    , 
+      IDs&                       ids    ,
+      Histos2D&                  histos ) ;
+    static size_t _histos_a_
+    ( const IAlgorithm*          cmp    , 
+      IDs&                       ids    ,
+      Histos2D&                  histos ) ;
+    static size_t _histos_t_
+    ( const IAlgTool*            cmp    , 
+      IDs&                       ids    ,
+      Histos2D&                  histos ) ;
+    // ========================================================================
+    static size_t _histos_a_
+    ( const GaudiHistoAlg*       cmp    , 
+      IDs&                       ids    ,
+      Histos3D&                  histos ) ;
+    static size_t _histos_t_
+    ( const GaudiHistoTool*      cmp    , 
+      IDs&                       ids    ,
+      Histos3D&                  histos ) ;
+    static size_t _histos_a_
+    ( const IAlgorithm*          cmp    , 
+      IDs&                       ids    ,
+      Histos3D&                  histos ) ;
+    static size_t _histos_t_
+    ( const IAlgTool*            cmp    , 
+      IDs&                       ids    ,
+      Histos3D&                  histos ) ;
+    // ========================================================================
+    static size_t _histos_a_
+    ( const GaudiHistoAlg*       cmp    , 
+      IDs&                       ids    ,
+      Profiles1D&                histos ) ;
+    static size_t _histos_t_
+    ( const GaudiHistoTool*      cmp    , 
+      IDs&                       ids    ,
+      Profiles1D&                histos ) ;
+    static size_t _histos_a_
+    ( const IAlgorithm*          cmp    , 
+      IDs&                       ids    ,
+      Profiles1D&                histos ) ;
+    static size_t _histos_t_
+    ( const IAlgTool*            cmp    , 
+      IDs&                       ids    ,
+      Profiles1D&                histos ) ;
+    // ========================================================================
+    static size_t _histos_a_
+    ( const GaudiHistoAlg*       cmp    , 
+      IDs&                       ids    ,
+      Profiles2D&                histos ) ;
+    static size_t _histos_t_
+    ( const GaudiHistoTool*      cmp    , 
+      IDs&                       ids    ,
+      Profiles2D&                histos ) ;
+    static size_t _histos_a_
+    ( const IAlgorithm*          cmp    , 
+      IDs&                       ids    ,
+      Profiles2D&                histos ) ;
+    static size_t _histos_t_
+    ( const IAlgTool*            cmp    , 
+      IDs&                       ids    ,
+      Profiles2D&                histos ) ;
+    // ========================================================================
+  };
+  // ==========================================================================
+} // end of namespace GaudiPython
+// ============================================================================
+// The END
+// ============================================================================
+#endif // GAUDIPYTHON_HISTODECORATOR_H
+// ============================================================================

GaudiPython/Interface.h

+// $Id: Interface.h,v 1.8 2005/11/08 16:31:03 mato Exp $
+// ============================================================================
+#ifndef GAUDIPYTHON_INTERFACE_H 
+#define GAUDIPYTHON_INTERFACE_H 1
+// ============================================================================
+// Include files
+// ============================================================================
+// STD & STL 
+// ============================================================================
+#include <functional>
+// ============================================================================
+// GaudiKernel
+// ============================================================================
+#include "GaudiKernel/IInterface.h"
+#include "GaudiKernel/SmartIF.h"
+// ============================================================================
+// GaudiPython
+// ============================================================================
+#include "GaudiPython/GaudiPython.h"
+// ============================================================================
+
+namespace GaudiPython
+{ 
+  /** @struct Interface Interface.h GaudiPython/Interface.h
+   *  
+   *  Minor mofidication of original Pere's structure 
+   *  GaudiPython::Interface
+   *  This helper class is nesessary to perform C++ 
+   *  castings from python.
+   *  
+   *  @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr
+   *  @date   2005-08-03
+   */
+  template <class TYPE>
+  struct Interface /* : 
+    public std::unary_function<const IInterface*,TYPE*> */
+  {
+    /** the only one important method
+     *   @param in  input interface 
+     *   @return resutl of "cast" 
+     */
+    TYPE* operator() ( const IInterface* in ) const 
+    { return SmartIF<TYPE>( TYPE::interfaceID()            , 
+                            const_cast<IInterface*> ( in ) ) ; }
+    
+    /** the only one important method (static)
+     *   @param in  input interface 
+     *   @return resutl of "cast" 
+     */
+    static TYPE* cast ( const IInterface* in ) 
+    { return SmartIF<TYPE>( const_cast<IInterface*> ( in ) ) ; }
+    
+    /** the only one important method (static)
+     *   @param iid unique identifier of 'target' interface 
+     *   @param in  input interface 
+     *   @return resutl of "cast" 
+     */
+    static TYPE* cast ( const InterfaceID& iid ,
+                        const IInterface*  in  ) 
+    { return SmartIF<TYPE>( iid , const_cast<IInterface*> ( in ) ) ; }
+    
+  };
+
+  template <>
+  struct Interface<IInterface> : 
+    public std::unary_function<const IInterface*,IInterface*>
+  {
+    typedef IInterface TYPE ;
+    /** the only one important method
+     *   @param in  input interface 
+     *   @return resutl of "cast" 
+     */
+    TYPE* operator() ( const IInterface* in ) const 
+    { return SmartIF<TYPE>( const_cast<IInterface*> ( in ) ) ; }
+    
+    /** the only one important method (static)
+     *   @param in  input interface 
+     *   @return resutl of "cast" 
+     */
+    static TYPE* cast ( const IInterface* in ) 
+    { return SmartIF<TYPE>( const_cast<IInterface*> ( in ) ) ; }
+    
+    /** the only one important method (static)
+     *   @param iid unique identifier of 'target' interface 
+     *   @param in  input interface 
+     *   @return resutl of "cast" 
+     */
+    static TYPE* cast ( const InterfaceID& /* iid */ ,
+                        const IInterface*  in  ) 
+    { return SmartIF<TYPE>( const_cast<IInterface*> ( in ) ) ; }
+    
+  };
+  
+} // end of namespace GaudiPython 
+
+#endif // GAUDIPYTHON_INTERFACE_H

GaudiPython/Printer.h

+// $Id: Printer.h,v 1.2 2005/10/14 12:57:13 mato Exp $
+// ============================================================================
+#ifndef GAUDIPYTHON_PRINTER_H 
+#define GAUDIPYTHON_PRINTER_H 1
+// ============================================================================
+// Include files
+// ============================================================================
+// STD & STL 
+// ============================================================================
+#include <string>
+#include <sstream>
+// ============================================================================
+// GaudiKernel
+// ============================================================================
+#include "GaudiKernel/ContainedObject.h"
+#include "GaudiKernel/DataObject.h"
+// ============================================================================
+
+namespace GaudiPython 
+{
+  /** @struct Printer Printer.h GaudiPython/Printer.h
+   *  
+   *
+   *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
+   *  @date   2005-08-05
+   */
+  template <class TYPE>
+  struct Printer 
+  {
+    static std::string print 
+    ( const TYPE& object ) 
+    {
+      std::stringstream stream ;
+      stream << object << std::endl ;
+      return stream.str() ;
+    } ;
+  } ;
+  template<> 
+  struct Printer<ContainedObject>
+  {
+    static std::string print 
+    ( const ContainedObject& object ) 
+    {
+      std::ostringstream stream ;
+      object.fillStream( stream ) ;
+      return stream.str() ;
+    } ;
+  } ;
+  template<> 
+  struct Printer<DataObject>
+  {
+    static std::string print ( const DataObject& type ) 
+    {
+      std::ostringstream stream ;
+      type.fillStream( stream ) ;
+      return stream.str() ;
+    } ;
+  };
+
+} // end of namespace GaudiPython 
+
+#endif // GAUDIPYTHON_PRINTER_H
+// ============================================================================

GaudiPython/PyROOTPickle.h

+// FIXME: remove obsolete header
+#include <GaudiMP/PyROOTPickle.h>
+namespace GaudiPython {
+  using namespace GaudiMP;
+}
+#if WIN32
+#pragma message ( "Warning: obsolete header file, use GaudiMP/PyROOTPickle.h" )
+#else
+#warning obsolete header file, use GaudiMP/PyROOTPickle.h
+#endif

GaudiPython/TESSerializer.h

+// FIXME: remove obsolete header
+#include <GaudiMP/TESSerializer.h>
+namespace GaudiPython {
+  using namespace GaudiMP;
+}
+#if WIN32
+#pragma message ( "Warning: obsolete header file, use GaudiMP/TESSerializer.h" )
+#else
+#warning obsolete header file, use GaudiMP/TESSerializer.h
+#endif

GaudiPython/TupleDecorator.h

+// $Id: TupleDecorator.h,v 1.9 2007/08/07 14:05:33 marcocle Exp $
+// ============================================================================
+#ifndef GAUDIPYTHON_TUPLEDECORATOR_H
+#define GAUDIPYTHON_TUPLEDECORATOR_H 1
+// ============================================================================
+// Include files
+// ============================================================================
+#include "GaudiKernel/Point3DTypes.h"
+#include "GaudiKernel/Vector3DTypes.h"
+#include "GaudiKernel/Point4DTypes.h"
+#include "GaudiKernel/Vector4DTypes.h"
+#include "GaudiKernel/SymmetricMatrixTypes.h"
+#include "GaudiKernel/GenericMatrixTypes.h"
+#include "GaudiKernel/GenericVectorTypes.h"
+// ============================================================================
+// GaudiAlg
+// ============================================================================
+#include "GaudiAlg/TupleID.h"
+#include "GaudiAlg/TupleObj.h"
+#include "GaudiAlg/Tuple.h"
+#include "GaudiAlg/Tuples.h"
+#include "GaudiAlg/ITupleTool.h"
+#include "GaudiAlg/GaudiTupleAlg.h"
+// ============================================================================
+// GaudiPython
+// ============================================================================
+#include "GaudiPython/GaudiPython.h"
+#include "GaudiPython/Vector.h"
+// ============================================================================
+// Forward declarations
+// ============================================================================
+namespace CLHEP
+{
+  class HepGenMatrix ;
+  class HepVector    ;
+}
+// ============================================================================
+namespace GaudiPython
+{
+  // ==========================================================================
+  /** @class TupleDecorator TupleDecorator.h GaudiPython/TupleDecorator.h
+   *  Simple class which performs the decoration of the standard N-Tuple
+   *  @see Tuples::Tuple
+   *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
+   *  @date   2005-08-04
+   */
+  class GAUDI_API TupleDecorator
+  {
+  public:
+    // ========================================================================
+    /// accessors to internal
+    static INTuple*         nTuple ( const Tuples::Tuple&  tuple ) ;
+    // ========================================================================
+    /// accessors to internal
+    static NTuple::Tuple*   ntuple ( const Tuples::Tuple&  tuple ) ;
+    // ========================================================================
+    /// status of the tuple
+    static bool             valid  ( const Tuples::Tuple&  tuple ) ;
+    // ========================================================================
+    /// commit the row
+    static StatusCode       write  ( const Tuples::Tuple&  tuple ) ;
+    // ========================================================================
+    /// more or less simple columns:    int
+    static StatusCode column
+    ( const Tuples::Tuple& tuple ,
+      const std::string&   name  ,
+      const int            value ) ;
+    // ========================================================================
+    /// more or less simple columns:    int
+    static StatusCode column
+    ( const Tuples::Tuple& tuple ,
+      const std::string&   name  ,
+      const int            value ,
+      const int            minv  ,
+      const int            maxv  ) ;
+    // ========================================================================
+    /// more or less simple columns:    double
+    static StatusCode column
+    ( const Tuples::Tuple& tuple ,
+      const std::string&   name  ,
+      const double         value ) ;
+    // ========================================================================
+    /// more or less simple columns:    bool
+    static StatusCode column
+    ( const Tuples::Tuple& tuple ,
+      const std::string&   name  ,
+      const bool           value ) ;
+    // ========================================================================
+    /// more or less simple columns:    IOpaqueAddress
+    static StatusCode column
+    ( const Tuples::Tuple&  tuple ,
+      const std::string&    name  ,
+      IOpaqueAddress*       value ) ;
+    // ========================================================================
+    /// more or less simple columns:    IOpaqueAddress
+    static StatusCode column
+    ( const Tuples::Tuple&  tuple ,
+      IOpaqueAddress*       value )
+    { return column ( tuple , "Address" , value ) ; }
+    // ========================================================================
+    /// Advanced columns: LorentzVector
+    static StatusCode column
+    ( const Tuples::Tuple&             tuple ,
+      const std::string&               name  ,
+      const Gaudi::LorentzVector&      value ) ;
+    // ========================================================================
+    /// Advanced columns: LorentzVector
+    static StatusCode column
+    ( const Tuples::Tuple&             tuple ,
+      const std::string&               name  ,
+      const Gaudi::PtEtaPhiEVector&    value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-vector
+    static StatusCode column
+    ( const Tuples::Tuple&             tuple ,
+      const std::string&               name  ,
+      const Gaudi::XYZVector&          value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-vector
+    static StatusCode column
+    ( const Tuples::Tuple&             tuple ,
+      const std::string&               name  ,
+      const Gaudi::Polar3DVector&      value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-vector
+    static StatusCode column
+    ( const Tuples::Tuple&             tuple ,
+      const std::string&               name  ,
+      const Gaudi::RhoEtaPhiVector&    value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-vector
+    static StatusCode column
+    ( const Tuples::Tuple&             tuple ,
+      const std::string&               name  ,
+      const Gaudi::RhoZPhiVector&      value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-points
+    static StatusCode column
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::XYZPoint&          value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-points
+    static StatusCode column
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Polar3DPoint&      value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-points
+    static StatusCode column
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::RhoEtaPhiPoint&    value ) ;
+    // ========================================================================
+    /// Advanced columns: 3D-points
+    static StatusCode column
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::RhoZPhiPoint&      value ) ;
+    // ========================================================================
+    /// Advanced columns: floating-size arrays
+    static StatusCode farray
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const std::vector<double>&      data   ,
+      const std::string&              length ,
+      const size_t                    maxv   ) ;
+    // ========================================================================
+    /// Advanced columns: floating-size arrays
+    static StatusCode farray
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const CLHEP::HepVector&         data   ,
+      const std::string&              length ,
+      const size_t                    maxv   ) ;
+    // ========================================================================
+    /// Advanced columns: floating-size matrices
+    static StatusCode fmatrix
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const GaudiPython::Matrix&      data   ,
+      const Tuples::TupleObj::MIndex  cols   , // fixed !!!
+      const std::string&              length ,
+      const size_t                    maxv   ) ;
+    // ========================================================================
+    /// Advanced columns: floating-size matrices
+    static StatusCode fmatrix
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const CLHEP::HepGenMatrix&      data   ,
+      const Tuples::TupleObj::MIndex  cols   , // fixed !!!
+      const std::string&              length ,
+      const size_t                    maxv   ) ;
+    // ========================================================================
+    /// Advanced columns: floating-size matrices
+    static StatusCode fmatrix
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const GaudiUtils::VectorMap<int,double>& info   ,
+      const std::string&              length ,
+      const size_t                    maxv   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const std::vector<double>&      data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const CLHEP::HepVector&         data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector2&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector3&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector4&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector5&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector6&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector7&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector8&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector9&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size arrays
+    static StatusCode array
+    ( const Tuples::Tuple&            tuple  ,
+      const std::string&              name   ,
+      const Gaudi::Vector1&           data   ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const GaudiPython::Matrix&      data  ,
+      const Tuples::TupleObj::MIndex  cols  ) ; // fixed !!!
+    // ========================================================================
+    /// Advanced columns: fixed size matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const CLHEP::HepGenMatrix&      data  ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix2x2&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix3x3&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix4x4&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix5x5&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix6x6&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix7x7&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix8x8&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix9x9&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix1x1&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix1x3&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix1x5&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix1x6&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix4x3&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix3x4&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix3x5&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix3x6&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix2x3&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: non-square matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::Matrix3x2&         value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix1x1&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix3x3&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix4x4&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix5x5&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix6x6&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix7x7&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix8x8&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix9x9&      value ) ;
+    // ========================================================================
+    /// Advanced columns: fixed size matrices: symmetric matrices
+    static StatusCode matrix
+    ( const Tuples::Tuple&            tuple ,
+      const std::string&              name  ,
+      const Gaudi::SymMatrix2x2&      value ) ;
+  } ;
+  // ==========================================================================
+  /** @class TupleAlgDecorator TupleDecorator.h GaudiPython/TupleDecorator.h
+   *  Simple class to perform the "decoration" of Tuples in Python/Reflex
+   *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
+   *  @date   2005-08-17
+   */
+  class GAUDI_API TupleAlgDecorator
+  {
+  public:
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const GaudiTupleAlg&     algo                         ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const GaudiTupleAlg&     algo                         ,
+      const GaudiAlg::TupleID& ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const GaudiTupleAlg&     algo                         ,
+      const int                ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const GaudiTupleAlg&     algo                         ,
+      const std::string&       ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const GaudiTupleAlg&     algo                         ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const GaudiTupleAlg&     algo                         ,
+      const GaudiAlg::TupleID& ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const GaudiTupleAlg&     algo                         ,
+      const int                ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const GaudiTupleAlg&     algo                         ,
+      const std::string&       ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple ) ;
+    // ========================================================================
+  } ;
+  // ==========================================================================
+  /** @class TupleToolDecorator TupleDecorator.h GaudiPython/TupleDecorator.h
+   *  Simple class to perform the "decoration" of Tuples in Python/Reflex
+   *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
+   *  @date   2005-08-17
+   */
+  class GAUDI_API TupleToolDecorator
+  {
+  public:
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const ITupleTool&        tool                         ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.nTuple ( title , clid ) ; }
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const ITupleTool&        tool                         ,
+      const GaudiAlg::TupleID& ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.nTuple ( ID , title , clid ) ; }
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const ITupleTool&        tool                         ,
+      const int                ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.nTuple ( ID , title , clid ) ; }
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       nTuple
+    ( const ITupleTool&        tool                         ,
+      const std::string&       ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.nTuple ( ID , title , clid ) ; }
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const ITupleTool&        tool                         ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.evtCol ( title , clid ) ; }
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const ITupleTool&        tool                         ,
+      const GaudiAlg::TupleID& ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.nTuple ( ID , title , clid ) ; }
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const ITupleTool&        tool                         ,
+      const int                ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.nTuple ( ID , title , clid ) ; }
+    // ========================================================================
+    /// get n-tuple (book-on-demand)
+    static Tuples::Tuple       evtCol
+    ( const ITupleTool&        tool                         ,
+      const std::string&       ID                           ,
+      const std::string&       title                        ,
+      const CLID&              clid  = CLID_ColumnWiseTuple )
+    { return tool.nTuple ( ID , title , clid ) ; }
+    // ========================================================================
+  } ;
+  // ==========================================================================
+} // end of namespace GaudiPython
+// ============================================================================
+// The END
+// ============================================================================
+#endif // GAUDIPYTHON_TUPLEDECORATOR_H