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 
22  return StatusCode::SUCCESS;
23 }
24 
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 
48  return true;
49 }
50 
virtual StatusCode initialize(NTuple::Tuple *nt)
Selector Initialization.
Definition: Selector.cpp:21
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual bool operator()(void *nt)
Default callback from interface.
Definition: Selector.cpp:26
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:367
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31