The Gaudi Framework  master (37c0b60a)
ISelectStatement Class Referenceabstract

#include <GaudiKernel/ISelectStatement.h>

Inheritance diagram for ISelectStatement:
Collaboration diagram for ISelectStatement:

Public Types

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 : StatusCode::code_t {
  Status::FAILURE = 0, Status::SUCCESS = 1, Status::NO_INTERFACE, Status::VERSMISMATCH,
  Status::LAST_ERROR
}
 Return status. More...
 
using iid = Gaudi::InterfaceId< IInterface, 0, 0 >
 Interface ID. More...
 
using ext_iids = Gaudi::interface_list< iid >
 Extra interfaces. More...
 

Public Member Functions

 DeclareInterfaceID (ISelectStatement, 2, 0)
 InterfaceID. More...
 
virtual long type () const =0
 Access the type of the object. More...
 
virtual const std::stringcriteria () const =0
 Access the selection string. More...
 
virtual void setCriteria (const std::string &crit)=0
 Set the type. More...
 
virtual void setActive (bool flag=true)=0
 Change activity flag. More...
 
virtual bool isActive () const =0
 Check if selection is active. More...
 
virtual bool operator() (void *val)=0
 Stupid default implementation. More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::stringgetInterfaceNames () 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 ()=default
 Virtual destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 

Detailed Description

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.

Author
M.Frank
Version
1.0

Definition at line 42 of file ISelectStatement.h.

Member Enumeration Documentation

◆ SelectType

Statement type definition.

Enumerator
FUNCTION 
STRING 
FULL 
OTHER 

Definition at line 48 of file ISelectStatement.h.

48 { FUNCTION = 1 << 1, STRING = 1 << 2, FULL = 1 << 3, OTHER = 1 << 4 };

Member Function Documentation

◆ criteria()

virtual const std::string& ISelectStatement::criteria ( ) const
pure virtual

Access the selection string.

◆ DeclareInterfaceID()

ISelectStatement::DeclareInterfaceID ( ISelectStatement  ,
,
 
)

◆ isActive()

virtual bool ISelectStatement::isActive ( ) const
pure virtual

Check if selection is active.

◆ operator()()

virtual bool ISelectStatement::operator() ( void *  val)
pure virtual

Stupid default implementation.

◆ setActive()

virtual void ISelectStatement::setActive ( bool  flag = true)
pure virtual

Change activity flag.

◆ setCriteria()

virtual void ISelectStatement::setCriteria ( const std::string crit)
pure virtual

Set the type.

◆ type()

virtual long ISelectStatement::type ( ) const
pure virtual

Access the type of the object.


The documentation for this class was generated from the following file:
ISelectStatement::OTHER
@ OTHER
Definition: ISelectStatement.h:48
ISelectStatement::FUNCTION
@ FUNCTION
Definition: ISelectStatement.h:48
ISelectStatement::FULL
@ FULL
Definition: ISelectStatement.h:48
ISelectStatement::STRING
@ STRING
Definition: ISelectStatement.h:48