| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# NTuple::Selector Class Reference

NTuple Selector class. More...

`#include <Selector.h>`

Inheritance diagram for NTuple::Selector:

[legend]
Collaboration diagram for NTuple::Selector:

[legend]

List of all members.

## 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 Initialization.
## Protected Attributes
IInterface * | m_parent
| reference to parent interface
bool | m_firstCall
| Boolean to indicate need for initialization.
StatusCode | m_status
| StatusCode indication initialization result.

## Detailed Description

NTuple Selector class.

Definition at line 29 of file Selector.h.

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

    00046                               {
    00047       return m_firstCall;
    00048     }

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

Access initialization status.

Definition at line 50 of file Selector.h.

    00050                                       {
    00051       return m_status;
    00052     }

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

Default callback from interface.

Overloaded callback from SelectStatement.

Reimplemented from SelectStatement.

Definition at line 26 of file Selector.cpp.

    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.

Specialized overload for N-tuples.

Definition at line 47 of file Selector.cpp.

    00047                                                        {
    00048   return true;
    00049 }

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

Selector Initialization.

Selector Initialisation.

Definition at line 21 of file Selector.cpp.

    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 initialization.

Definition at line 34 of file Selector.h.

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

StatusCode indication initialization result.

Definition at line 36 of file Selector.h.

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

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