The Gaudi Framework  master (37c0b60a)
SelectStatement.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 //==============================================================================
12 //
13 // Package : Kernel
14 //
15 // Author : M.Frank 10/10/00
16 //
17 //==============================================================================
18 #ifndef KERNEL_SELECTSTATEMENT_H
19 #define KERNEL_SELECTSTATEMENT_H
20 
21 // STL include files
22 #include <string>
23 
24 // Framework include files
26 
54 class GAUDI_API SelectStatement : public implements<ISelectStatement> {
55 public:
57  explicit SelectStatement( const std::string& s, long typ ) : m_select( s ), m_isActive( false ), m_type( typ ) {}
59  explicit SelectStatement( const std::string& s ) : m_select( s ), m_isActive( false ), m_type( STRING ) {}
61  explicit SelectStatement() : m_isActive( false ), m_type( FUNCTION ) {}
63  virtual ~SelectStatement() {}
65  long type() const override { return m_type; }
67  const std::string& criteria() const override { return m_select; }
69  void setCriteria( const std::string& crit ) override {
70  m_select = crit;
71  ( m_select.length() > 0 ) ? m_type |= STRING : m_type &= ~STRING;
72  }
74  void setActive( bool flag = true ) override { m_isActive = flag; }
76  bool isActive() const override { return m_isActive; }
78  virtual bool operator()( void* /* val */ ) override { return true; }
79 
80 protected:
84  bool m_isActive;
86  long m_type;
87 };
88 #endif // KERNEL_SELECTSTATEMENT_H
SelectStatement::~SelectStatement
virtual ~SelectStatement()
Standard Destructor.
Definition: SelectStatement.h:63
SelectStatement::SelectStatement
SelectStatement(const std::string &s, long typ)
Standard Constructor initializing select string.
Definition: SelectStatement.h:57
SelectStatement::m_select
std::string m_select
Select string.
Definition: SelectStatement.h:82
SelectStatement::SelectStatement
SelectStatement(const std::string &s)
Standard Constructor initializing select string.
Definition: SelectStatement.h:59
std::string
STL class.
SelectStatement::isActive
bool isActive() const override
Check if selection is active.
Definition: SelectStatement.h:76
gaudirun.s
string s
Definition: gaudirun.py:346
SelectStatement
Class of a selection statement.
Definition: SelectStatement.h:54
SelectStatement::setActive
void setActive(bool flag=true) override
Change activity flag.
Definition: SelectStatement.h:74
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:78
SelectStatement::m_isActive
bool m_isActive
Activation flag.
Definition: SelectStatement.h:84
SelectStatement::setCriteria
void setCriteria(const std::string &crit) override
Set the type.
Definition: SelectStatement.h:69
ISelectStatement.h
SelectStatement::criteria
const std::string & criteria() const override
Access the selection string.
Definition: SelectStatement.h:67
implements
Base class used to implement the interfaces.
Definition: implements.h:19
SelectStatement::m_type
long m_type
Type identifier.
Definition: SelectStatement.h:86
SelectStatement::SelectStatement
SelectStatement()
Standard Constructor initializing function call.
Definition: SelectStatement.h:61
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81