All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
NTuple::Selector Class Reference

NTuple Selector class. More...

#include <GaudiKernel/Selector.h>

Inheritance diagram for NTuple::Selector:
Collaboration diagram for NTuple::Selector:

Public Member Functions

 Selector (IInterface *svc)
 Standard constructor. More...
 
virtual ~Selector ()
 Standard Destructor. More...
 
bool firstCall () const
 Check for first call. More...
 
StatusCode initResult () const
 Access initialization status. More...
 
virtual bool operator() (void *nt)
 Default callback from interface. More...
 
virtual bool operator() (NTuple::Tuple *nt)
 Specialized callback for NTuples. More...
 
virtual StatusCode initialize (NTuple::Tuple *nt)
 Selector Initialization. More...
 
- Public Member Functions inherited from SelectStatement
 SelectStatement (const std::string &s, long typ)
 Standard Constructor initializing select string. More...
 
 SelectStatement (const std::string &s)
 Standard Constructor initializing select string. More...
 
 SelectStatement ()
 Standard Constructor initializing function call. More...
 
virtual ~SelectStatement ()
 Standard Destructor. More...
 
long type () const
 Access the type of the object. More...
 
const std::string & criteria () const
 Access the selection string. More...
 
void setCriteria (const std::string &crit)
 Set the type. More...
 
void setActive (bool flag=true)
 Change activity flag. More...
 
bool isActive () const
 Check if selection is active. More...
 
- Public Member Functions inherited from extend_interfaces1< ISelectStatement >
virtual ~extend_interfaces1 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from ISelectStatement
 DeclareInterfaceID (ISelectStatement, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 

Protected Attributes

IInterface * m_parent
 reference to parent interface More...
 
bool m_firstCall
 Boolean to indicate need for initialization. More...
 
StatusCode m_status
 StatusCode indication initialization result. More...
 
- Protected Attributes inherited from SelectStatement
std::string m_select
 Select string. More...
 
bool m_isActive
 Activation flag. More...
 
long m_type
 Type identifier. More...
 

Additional Inherited Members

- Public Types inherited from implements1< ISelectStatement >
typedef implements1 base_class
 Typedef to this class. More...
 
typedef extend_interfaces1
< ISelectStatement > 
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces1< ISelectStatement >
typedef
ISelectStatement::iid::iids::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from ISelectStatement
enum  SelectType { FUNCTION =1<<1, STRING =1<<2, FULL =1<<3, OTHER =1<<4 }
 Statement type definition. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iid > ext_iids
 Extra interfaces. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceID & interfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 

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.

39  : m_parent(svc), m_firstCall(true)
40  {
41  }
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
IInterface * m_parent
reference to parent interface
Definition: Selector.h:32
virtual NTuple::Selector::~Selector ( )
inlinevirtual

Standard Destructor.

Definition at line 43 of file Selector.h.

43  {
44  }

Member Function Documentation

bool NTuple::Selector::firstCall ( ) const
inline

Check for first call.

Definition at line 46 of file Selector.h.

46  {
47  return m_firstCall;
48  }
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
StatusCode NTuple::Selector::initialize ( NTuple::Tuple *  nt)
virtual

Selector Initialization.

Selector Initialisation.

Definition at line 21 of file Selector.cpp.

21  {
22  return StatusCode::SUCCESS;
23 }
StatusCode NTuple::Selector::initResult ( ) const
inline

Access initialization status.

Definition at line 50 of file Selector.h.

50  {
51  return m_status;
52  }
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36
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.

26  {
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 }
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:62
virtual StatusCode initialize(NTuple::Tuple *nt)
Selector Initialization.
Definition: Selector.cpp:21
bool m_firstCall
Boolean to indicate need for initialization.
Definition: Selector.h:34
StatusCode m_status
StatusCode indication initialization result.
Definition: Selector.h:36
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
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.

47  {
48  return true;
49 }

Member Data Documentation

bool NTuple::Selector::m_firstCall
protected

Boolean to indicate need for initialization.

Definition at line 34 of file Selector.h.

IInterface* NTuple::Selector::m_parent
protected

reference to parent interface

Definition at line 32 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: