| The Gaudi Framework v30r0 (c919700c)

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

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | List of all members
SelectStatement Class Reference

Class of a selection statement. More...

`#include <GaudiKernel/SelectStatement.h>`

Inheritance diagram for SelectStatement:
[legend]
Collaboration diagram for SelectStatement:
[legend]

## Public Member Functions
| 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 override
| Access the type of the object. More...
const std::string & | criteria () const override
| Access the selection string. More...
void | setCriteria (const std::string &crit) override
| Set the type. More...
void | setActive (bool flag=true) override
| Change activity flag. More...
bool | isActive () const override
| Check if selection is active. More...
virtual bool | operator() (void *) override
| Stupid default implementation. More...
Public Member Functions inherited from implements< ISelectStatement >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| implements ()=default
| Default constructor. More...
| implements (const implements &)
| Copy constructor (zero the reference count) More...
implements & | operator= (const implements &)
| Assignment operator (do not touch the reference count). More...
| ~implements () override=default
| Virtual destructor. More...
unsigned long | addRef () override
| Reference Interface instance. More...
unsigned long | release () override
| Release Interface instance. More...
unsigned long | refCount () const override
| Current reference count. More...
Public Member Functions inherited from extend_interfaces< Interfaces... >
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Protected Attributes
std::string | m_select
| Select string. More...
bool | m_isActive
| Activation flag. More...
long | m_type
| Type identifier. More...
Protected Attributes inherited from implements< ISelectStatement >
std::atomic_ulong | m_refCount
| Reference counter. More...

## Additional Inherited Members
Public Types inherited from implements< ISelectStatement >
using | base_class = implements< Interfaces... >
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces... >
| Typedef to the base of this class. More...
using | iids = typename extend_interfaces_base::ext_iids
Public Types inherited from extend_interfaces< Interfaces... >
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
| take union of the ext_iids of all Interfaces... More...

## Detailed Description

Class of a selection statement.

A select statement can either contain

- a string e.g. for refining an SQL statement
- a function object, which will be called back in order to refine a selection. This happens in calling sequences like the following:

bool MySelect::operator()(IValueLocator* l) { float px, py, pz; if ( l->get("PX",px) && l->get("PY",py) && l->get("PZ",pz) ) { float mom = sqrt(px*px+py*py+pz*pz); return mom > 100.0 * GeV; } return false; }

if "true" is returned, the object will be loaded completely.

History: +------—+-------------------------------------------—+-----—+ | Date | Comment | Who | +------—+-------------------------------------------—+-----—+ | 21/10/99| Initial version. | MF | +------—+-------------------------------------------—+-----—+ Author: M.Frank Version: 1.0

Definition at line 44 of file SelectStatement.h.

## Constructor & Destructor Documentation

SelectStatement::SelectStatement | ( | const std::string & | s,
|  | long | typ
| ) |  |
| inline explicit

Standard Constructor initializing select string.

Definition at line 48 of file SelectStatement.h.

48 : m_select( s ), m_isActive( false ), m_type( typ ) {}
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:76
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:78
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:74

SelectStatement::SelectStatement | ( | const std::string & | s | ) |
| inline explicit

Standard Constructor initializing select string.

Definition at line 50 of file SelectStatement.h.

50 : m_select( s ), m_isActive( false ), m_type( STRING ) {}
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:76
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:78
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:74

SelectStatement::SelectStatement | ( |  | ) |
| inline explicit

Standard Constructor initializing function call.

Definition at line 52 of file SelectStatement.h.

52 : m_isActive( false ), m_type( FUNCTION ) {}
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:76
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:78

virtual SelectStatement::~SelectStatement | ( |  | ) |
| inline virtual

Standard Destructor.

Definition at line 54 of file SelectStatement.h.

54 {}

## Member Function Documentation

const std::string& SelectStatement::criteria | ( |  | ) | const
| inline override

Access the selection string.

Definition at line 58 of file SelectStatement.h.

58 { return m_select; }
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:74

bool SelectStatement::isActive | ( |  | ) | const
| inline override

Check if selection is active.

Definition at line 68 of file SelectStatement.h.

68 { return m_isActive; }
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:76

virtual bool SelectStatement::operator() | ( | void * |  | ) |
| inline override virtual

Stupid default implementation.

Reimplemented in NTuple::Selector.

Definition at line 70 of file SelectStatement.h.

70 { return true; }

void SelectStatement::setActive | ( | bool | flag = `true` | ) |
| inline override

Change activity flag.

Definition at line 66 of file SelectStatement.h.

66 { m_isActive = flag; }
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:76

void SelectStatement::setCriteria | ( | const std::string & | crit | ) |
| inline override

Set the type.

Definition at line 60 of file SelectStatement.h.

61 {
62 m_select = crit;
63 ( m_select.length() > 0 ) ? m_type |= STRING : m_type &= ~STRING;
64 }
std::string::length
T length(T...args)
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:78
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:74

long SelectStatement::type | ( |  | ) | const
| inline override

Access the type of the object.

Definition at line 56 of file SelectStatement.h.

56 { return m_type; }
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:78

## Member Data Documentation

bool SelectStatement::m_isActive
| protected

Activation flag.

Definition at line 76 of file SelectStatement.h.

std::string SelectStatement::m_select
| protected

Select string.

Definition at line 74 of file SelectStatement.h.

long SelectStatement::m_type
| protected

Type identifier.

Definition at line 78 of file SelectStatement.h.

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

- GaudiKernel/GaudiKernel/SelectStatement.h