Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Selector.cpp
Go to the documentation of this file.
1 //====================================================================
2 // NTuple name space: Selector class implementation
3 //--------------------------------------------------------------------
4 //
5 // Package : Gaudi/NTupleSvc ( The LHCb Offline System)
6 // Author : M.Frank
7 //
8 // +---------+----------------------------------------------+--------+
9 // | Date | Comment | Who |
10 // +---------+----------------------------------------------+--------+
11 // | 10/10/00| Initial version. | MF |
12 // +---------+----------------------------------------------+--------+
13 //====================================================================
14 #define GAUDI_NTUPLEITEMS_CPP 1
15 
16 #include "GaudiKernel/NTuple.h"
17 #include "GaudiKernel/Selector.h"
18 
21  return StatusCode::SUCCESS;
22 }
23 
26  DataObject* p = static_cast<DataObject*>(nt);
27  bool result = false;
28  try {
29  NTuple::Tuple* tuple = dynamic_cast<NTuple::Tuple*>(p);
30  if ( tuple ) {
31  if ( m_firstCall ) {
32  m_status = initialize(tuple);
33  m_firstCall = false;
34  }
35  if ( m_status.isSuccess() ) {
36  result = this->operator()(tuple);
37  }
38  }
39  }
40  catch(...) {
41  }
42  return result;
43 }
44 
47  return true;
48 }
49 
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
virtual StatusCode initialize(NTuple::Tuple *nt)
Selector Initialization.
Definition: Selector.cpp:20
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:370
bool operator()(void *nt) override
Default callback from interface.
Definition: Selector.cpp:25
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30