| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Selector.cpp
Go to the documentation of this file.
1 // $Header: /tmp/svngaudi/tmp.jEpFh25751/Gaudi/GaudiKernel/src/Lib/Selector.cpp,v 1.2 2000/12/13 12:57:23 mato Exp $
2 //====================================================================
3 // NTuple name space: Selector class implementation
4 //--------------------------------------------------------------------
5 //
6 // Package : Gaudi/NTupleSvc ( The LHCb Offline System)
7 // Author : M.Frank
8 //
9 // +---------+----------------------------------------------+--------+
10 // | Date | Comment | Who |
11 // +---------+----------------------------------------------+--------+
12 // | 10/10/00| Initial version. | MF |
13 // +---------+----------------------------------------------+--------+
14 //====================================================================
15 #define GAUDI_NTUPLEITEMS_CPP 1
16
17 #include "GaudiKernel/NTuple.h"
18 #include "GaudiKernel/Selector.h"
19
21 StatusCode NTuple::Selector::initialize(NTuple::Tuple* /* nt */ ) {
22 return StatusCode::SUCCESS;
23 }
24
26 bool NTuple::Selector::operator()(void* nt) {
27 DataObject* p = (DataObject*)nt;
28 bool result = false;
29 try {
30 NTuple::Tuple* tuple = dynamic_cast<NTuple::Tuple*>(p);
31 if ( 0 != tuple ) {
32 if ( m_firstCall ) {
33 m_status = initialize(tuple);
34 m_firstCall = false;
35 }
36 if ( m_status.isSuccess() ) {
37 result = this->operator()(tuple);
38 }
39 }
40 }
41 catch(...) {
42 }
43 return result;
44 }
45
47 bool NTuple::Selector::operator()(NTuple::Tuple* /* nt */ ) {
48 return true;
49 }
50