| The Gaudi Framework v28r2-patches (bc4ad17a)

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

- File List
- File Members

SelectStatement.h
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // Package : Kernel
4 //
5 // Author : M.Frank 10/10/00
6 //
7 //==============================================================================
8 #ifndef KERNEL_SELECTSTATEMENT_H
9 #define KERNEL_SELECTSTATEMENT_H
10
11 // STL include files
12 #include <string>
13
14 // Framework include files
15 #include "GaudiKernel/ISelectStatement.h"
16
44 class GAUDI_API SelectStatement: public implements<ISelectStatement> {
45 public:
47 explicit SelectStatement(const std::string& s, long typ)
48 : m_select(s), m_isActive(false), m_type(typ)
49 {
50 }
52 explicit SelectStatement(const std::string& s)
53 : m_select(s),m_isActive(false), m_type(STRING)
54 {
55 }
57 explicit SelectStatement()
58 : m_isActive(false), m_type(FUNCTION)
59 {
60 }
62 virtual ~SelectStatement() {
63 }
65 long type() const override {
66 return m_type;
67 }
69 const std::string& criteria() const override {
70 return m_select;
71 }
73 void setCriteria(const std::string& crit) override {
74 m_select = crit;
75 (m_select.length() > 0) ? m_type |= STRING : m_type &= ~STRING;
76 }
78 void setActive(bool flag = true) override {
79 m_isActive = flag;
80 }
82 bool isActive() const override {
83 return m_isActive;
84 }
86 virtual bool operator()(void* /* val */ ) override {
87 return true;
88 }
89 protected:
91 std::string m_select;
93 bool m_isActive;
95 long m_type;
96 };
97 #endif // KERNEL_SELECTSTATEMENT_H
SelectStatement::SelectStatement
SelectStatement()
Standard Constructor initializing function call.
Definition: SelectStatement.h:57
implements
Base class used to implement the interfaces.
Definition: implements.h:9
SelectStatement::~SelectStatement
virtual ~SelectStatement()
Standard Destructor.
Definition: SelectStatement.h:62
SelectStatement::SelectStatement
SelectStatement(const std::string &s, long typ)
Standard Constructor initializing select string.
Definition: SelectStatement.h:47
ISelectStatement.h
SelectStatement::isActive
bool isActive() const override
Check if selection is active.
Definition: SelectStatement.h:82
SelectStatement::setActive
void setActive(bool flag=true) override
Change activity flag.
Definition: SelectStatement.h:78
std::string
STL class.
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:93
SelectStatement::type
long type() const override
Access the type of the object.
Definition: SelectStatement.h:65
SelectStatement::operator()
virtual bool operator()(void *) override
Stupid default implementation.
Definition: SelectStatement.h:86
SelectStatement::setCriteria
void setCriteria(const std::string &crit) override
Set the type.
Definition: SelectStatement.h:73
gaudirun.s
string s
Definition: gaudirun.py:245
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:95
SelectStatement
Class of a selection statement.
Definition: SelectStatement.h:44
SelectStatement::criteria
const std::string & criteria() const override
Access the selection string.
Definition: SelectStatement.h:69
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:91
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
SelectStatement::SelectStatement
SelectStatement(const std::string &s)
Standard Constructor initializing select string.
Definition: SelectStatement.h:52