| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 > Class Template Reference

`#include <TupleDetail.h>`

Inheritance diagram for Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >:

[legend]
Collaboration diagram for Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >:

[legend]
List of all members.

## Detailed Description

### template<class HANDLER1, class HANDLER2>
class Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >

The simplest concrete implementationof class TupleObj with 3 arbitrary error handlers Any types (classes, functions, etc.

) which supports the semantics

         HANDLER obj = .. ;

         StatusCode obj( msg , sc )

can be used as error handler, e.g.

       void print_error   ( const std::string& msg , StatusCode sc )
        { std::cout <<
          "Error"   << msg << " code " << sc.getCode() << std::endl ; }
       void print_warning ( const std::string& msg , StatusCode sc )
        { std::cout <<
          "Warning" << msg << " code " << sc.getCode() << std::endl ; }
       void print_print   ( const std::string& msg , StatusCode sc )
        { std::cout << msg << " code " << sc.getCode() << std::endl ; }

       NTuple::Tuple* tuple = ... ;
       TupleObj* obj =
        createTupleObj( print_errror   ,
                        print_warning  ,
                        print_print    ,
                        " my tuple "   , ntuple ) ;

Templated helper functions allow to avoid heavy semantics of dealing with explicit type

Few concrete error handlers for dealing with classes, which suports member functions Erorr and Warning ( e.g. class GaudiAlgorithm or class GaudiTool ) are provided

Author:
  Vanya BELYAEV Ivan.Belyaev@itep.ru

Date:
  2004-1-24

Definition at line 79 of file TupleDetail.h.

## Public Member Functions
| TupleObjImp (HANDLER1 handler1, HANDLER2 handler2, const std::string &name, NTuple::Tuple *tuple, const CLID &clid=CLID_ColumnWiseTuple, const Tuples::Type type=Tuples::NTUPLE)
| constructor
virtual StatusCode | Error (const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const
virtual StatusCode | Warning (const std::string &msg, const StatusCode sc=StatusCode::FAILURE) const
## Protected Member Functions
virtual | ~TupleObjImp ()
| empty protected destructor
## Private Attributes
HANDLER1 | m_handler1
HANDLER2 | m_handler2

## Constructor & Destructor Documentation

template<class HANDLER1, class HANDLER2>

Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::TupleObjImp | ( | HANDLER1 | handler1,
|  | HANDLER2 | handler2,
|  | const std::string & | name,
|  | NTuple::Tuple * | tuple,
|  | const CLID & | clid = `CLID_ColumnWiseTuple`,
|  | const Tuples::Type | type = `Tuples::NTUPLE` |
| ) |  |  | `[inline]`

constructor

Parameters:

  | handler1 | error handler
  | handler2 | warning handler
  | name | Name of the NTuple
  | tuple | NTuple itself
  | clid | NTuple CLID
  | type | NTuple type

Definition at line 90 of file TupleDetail.h.

    00096         : TupleObj ( name , tuple , clid, type )
    00097         , m_handler1 ( handler1 )
    00098         , m_handler2 ( handler2 )
    00099       {};

template<class HANDLER1, class HANDLER2>

virtual Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::~TupleObjImp | ( |  | ) | `[inline, protected, virtual]`

empty protected destructor

Definition at line 114 of file TupleDetail.h.

    00114 {}

## Member Function Documentation

template<class HANDLER1, class HANDLER2>

virtual StatusCode Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::Error | ( | const std::string & | msg,
|  | const StatusCode | sc = `StatusCode::FAILURE` |
| ) |  |  | const`[inline, virtual]`

Implements Tuples::TupleObj.

Definition at line 103 of file TupleDetail.h.

References Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::m_handler1, and Tuples::TupleObj::name().

    00105       { m_handler1 ( name() + msg , sc  ) ; return sc ; }

template<class HANDLER1, class HANDLER2>

virtual StatusCode Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::Warning | ( | const std::string & | msg,
|  | const StatusCode | sc = `StatusCode::FAILURE` |
| ) |  |  | const`[inline, virtual]`

Implements Tuples::TupleObj.

Definition at line 108 of file TupleDetail.h.

References Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::m_handler2, and Tuples::TupleObj::name().

    00110       { m_handler2 ( name() + msg , sc  ) ; return sc ; }

## Member Data Documentation

template<class HANDLER1, class HANDLER2>

HANDLER1 Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::m_handler1`[private]`

Definition at line 116 of file TupleDetail.h.

Referenced by Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::Error().

template<class HANDLER1, class HANDLER2>

HANDLER2 Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::m_handler2`[private]`

Definition at line 117 of file TupleDetail.h.

Referenced by Tuples::detail::TupleObjImp< HANDLER1, HANDLER2 >::Warning().

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiAlg/v11r1/GaudiAlg/TupleDetail.h