The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
SelectStatement.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 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#pragma once
12
14#include <string>
15
43class GAUDI_API SelectStatement : public implements<ISelectStatement> {
44public:
46 explicit SelectStatement( const std::string& s, long typ ) : m_select( s ), m_isActive( false ), m_type( typ ) {}
48 explicit SelectStatement( const std::string& s ) : m_select( s ), m_isActive( false ), m_type( STRING ) {}
50 explicit SelectStatement() : m_isActive( false ), m_type( FUNCTION ) {}
52 virtual ~SelectStatement() {}
54 long type() const override { return m_type; }
56 const std::string& criteria() const override { return m_select; }
58 void setCriteria( const std::string& crit ) override {
59 m_select = crit;
60 ( m_select.length() > 0 ) ? m_type |= STRING : m_type &= ~STRING;
61 }
62
63 void setActive( bool flag = true ) override { m_isActive = flag; }
65 bool isActive() const override { return m_isActive; }
67 virtual bool operator()( void* /* val */ ) override { return true; }
68
69protected:
71 std::string m_select;
75 long m_type;
76};
#define GAUDI_API
Definition Kernel.h:49
const std::string & criteria() const override
Access the selection string.
SelectStatement(const std::string &s)
Standard Constructor initializing select string.
virtual bool operator()(void *) override
Stupid default implementation.
long m_type
Type identifier.
SelectStatement()
Standard Constructor initializing function call.
bool isActive() const override
Check if selection is active.
SelectStatement(const std::string &s, long typ)
Standard Constructor initializing select string.
virtual ~SelectStatement()
Standard Destructor.
void setCriteria(const std::string &crit) override
Set the type.
std::string m_select
Select string.
void setActive(bool flag=true) override
Change activity flag.
long type() const override
Access the type of the object.
bool m_isActive
Activation flag.