Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 // $Id: Tuples.h,v 1.5 2006/03/09 10:28:15 hmd Exp $
002 // ============================================================================
003 #ifndef GAUDIALG_TUPLES_H 
004 #define GAUDIALG_TUPLES_H 1
005 // ============================================================================
006 // GaudiAlg 
007 // ============================================================================
008 #include "GaudiAlg/TupleObj.h"
009 // ============================================================================
010 
011 /** @namespace Tuples Tuples.h GaudiAlg/Tuples.h
012  *  helper namespace to collect useful definitions, types, 
013  *  constants and functions, related to manipulations 
014  *  with N-Tuples and event tag collections
015  *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
016  *  @date   2004-01-23
017  */
018 namespace Tuples 
019 {
020   class Tuple    ;
021   class TupleObj ;
022 } // end of namespace Tuples 
023 
024 
025 namespace Tuples 
026 {
027   /** @class _TupAdapter
028    *  Trivial adapter to avoid the GCC problem 
029    *  (pointer to the function is never evaluated as  
030    *   "const TYPE&" )
031    *  @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr
032    *  @date 2005-05-01
033    */
034   template <class OBJECT,class ARGUMENT=double, class RESULT=double>
035   class _TupAdapter : public std::unary_function<ARGUMENT,RESULT>
036   {
037   public:
038     // constructor
039     _TupAdapter ( OBJECT object ) : m_object ( object ) {} ;
040   public:
041     /// the only one essential menthod 
042     inline RESULT operator() ( ARGUMENT arg ) const 
043     { return m_object( arg )  ; }
044   private:
045     // default constructor is disabled 
046     _TupAdapter();
047   private:
048     OBJECT m_object ;
049   };
050   
051   /** @fn useFun
052    *  trivial helper function to convert on flight 
053    *  pointer to function into "functor"
054    *  It is especially useful in conjunction with 
055    *  N-Tuples fills
056    *
057    *  @code
058    *   
059    *   using namespace Tuples ;
060    *  
061    *  typedef std::vector<double> Array ;
062    *  Array arr = ... ;
063    *  
064    *   tuple->farray ( "sinarr"        , 
065    *                   useFun  ( sin ) ,
066    *                   "cosarr"        , 
067    *                   useFun  ( cos ) , 
068    *                   arr.begin ()    , 
069    *                   arr.end   ()    , 
070    *                   "Length"  , 100 ) ;
071    *
072    *  @endcode 
073    *
074    *  @see GaudiTupleAlg
075    *  @see Tuples::TupleObj
076    *
077    *  @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr
078    *  @date 2005-05-01
079    */
080   template <class OBJECT>
081   inline _TupAdapter<OBJECT,double,double> useFun ( OBJECT object ) 
082   { return _TupAdapter<OBJECT,double,double>( object ) ; }
083   
084 } // end of namespace Tuples 
085 
086 #endif // GAUDIALG_TUPLES_H
087 

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!