The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
FunctionalFilterDecision.cpp
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\***********************************************************************************/
12
13namespace Gaudi::Functional {
14
16 const char* name() const override { return "FilterDecision"; }
17 bool isSuccess( StatusCode::code_t code ) const override {
18 return ( static_cast<FilterDecision>( code ) == FilterDecision::PASSED or
19 static_cast<FilterDecision>( code ) == FilterDecision::FAILED );
20 }
21 bool isRecoverable( StatusCode::code_t ) const override { return false; }
22 std::string message( StatusCode::code_t code ) const override {
23 switch ( static_cast<FilterDecision>( code ) ) {
25 return "Filter decision: PASSED";
27 return "Filter decision: FAILED";
28 default:
30 }
31 }
32 };
33} // namespace Gaudi::Functional
34
#define STATUSCODE_ENUM_IMPL(...)
Assign a category to the StatusCode enum declared with STATUSCODE_ENUM_DECL( ENUM ).
Definition StatusCode.h:283
static const Category & default_category() noexcept
Default Gaudi StatusCode category.
Definition StatusCode.h:298
unsigned long code_t
type of StatusCode value
Definition StatusCode.h:66
bool isSuccess(StatusCode::code_t code) const override
Is code considered success ?
bool isRecoverable(StatusCode::code_t) const override
Is code considered recoverable ?
const char * name() const override
Name of the category.
std::string message(StatusCode::code_t code) const override
Description for code within this category.
The category assigned to a StatusCode.
Definition StatusCode.h:77
virtual std::string message(code_t code) const
Description for code within this category.
Definition StatusCode.h:85