| # 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

# NTuple::Selector Class Reference

`#include <Selector.h>`

Inheritance diagram for NTuple::Selector:

[legend]
Collaboration diagram for NTuple::Selector:

[legend]
List of all members.

## Detailed Description

NTuple Selector class.

Definition at line 29 of file Selector.h.

## Public Member Functions
| Selector (IInterface *svc)
| Standard constructor.
virtual | ~Selector ()
| Standard Destructor.
bool | firstCall () const
| Check for first call.
StatusCode | initResult () const
| Access initialization status.
virtual bool | operator() (void *nt)
| Default callback from interface.
virtual bool | operator() (NTuple::Tuple *nt)
| Specialized callback for NTuples.
virtual StatusCode | initialize (NTuple::Tuple *nt)
| Selector Initialisation.
## Protected Attributes
IInterface * | m_parent
| reference to parent interface
bool | m_firstCall
| Boolean to indicate need for initialisation.
StatusCode | m_status
| StatusCode indication initialization result.

## Constructor & Destructor Documentation

NTuple::Selector::Selector | ( | IInterface * | svc | ) | `[inline]`

Standard constructor.

Definition at line 39 of file Selector.h.

    00039                               : m_parent(svc), m_firstCall(true)
    00040     {
    00041     }

virtual NTuple::Selector::~Selector | ( |  | ) | `[inline, virtual]`

Standard Destructor.

Definition at line 43 of file Selector.h.

    00043                         {
    00044     }

## Member Function Documentation

bool NTuple::Selector::firstCall | ( |  | ) | const`[inline]`

Check for first call.

Definition at line 46 of file Selector.h.

References m_firstCall.

    00046                               {
    00047       return m_firstCall;
    00048     }

StatusCode NTuple::Selector::initResult | ( |  | ) | const`[inline]`

Access initialization status.

Definition at line 50 of file Selector.h.

References m_status.

    00050                                       {
    00051       return m_status;
    00052     }

bool NTuple::Selector::operator() | ( | void * | nt | ) | `[virtual]`

Default callback from interface.

Reimplemented from SelectStatement.

Definition at line 26 of file Selector.cpp.

References initialize(), StatusCode::isSuccess(), m_firstCall, and m_status.

    00026                                           {
    00027   DataObject* p = (DataObject*)nt;
    00028   bool result = false;
    00029   try   {
    00030     NTuple::Tuple* tuple = dynamic_cast<NTuple::Tuple*>(p);
    00031     if ( 0 != tuple )   {
    00032       if ( m_firstCall )    {
    00033         m_status = initialize(tuple);
    00034         m_firstCall = false;
    00035       }
    00036       if ( m_status.isSuccess() )  {
    00037         result = this->operator()(tuple);
    00038       }
    00039     }
    00040   }
    00041   catch(...)    {
    00042   }
    00043   return result;
    00044 }

bool NTuple::Selector::operator() | ( | NTuple::Tuple * | nt | ) | `[virtual]`

Specialized callback for NTuples.

Definition at line 47 of file Selector.cpp.

    00047                                                        {
    00048   return true;
    00049 }

StatusCode NTuple::Selector::initialize | ( | NTuple::Tuple * | nt | ) | `[virtual]`

Selector Initialisation.

Definition at line 21 of file Selector.cpp.

References StatusCode::SUCCESS.

Referenced by operator()().

    00021                                                                {
    00022   return StatusCode::SUCCESS;
    00023 }

## Member Data Documentation

IInterface* NTuple::Selector::m_parent`[protected]`

reference to parent interface

Definition at line 32 of file Selector.h.

bool NTuple::Selector::m_firstCall`[protected]`

Boolean to indicate need for initialisation.

Definition at line 34 of file Selector.h.

Referenced by firstCall(), and operator()().

StatusCode NTuple::Selector::m_status`[protected]`

StatusCode indication initialization result.

Definition at line 36 of file Selector.h.

Referenced by initResult(), and operator()().

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/GaudiKernel/Selector.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r2/GaudiKernel/v25r2/src/Lib/Selector.cpp