ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgMessaging
AsgMessaging
Check.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ASGMESSAGING_CHECK_H
6
#define ASGMESSAGING_CHECK_H
7
8
// Local include(s):
9
#include "
AsgMessaging/MsgStreamMacros.h
"
10
11
#include "boost/preprocessor/facilities/overload.hpp"
12
39
40
#ifndef __CPPCHECK__
// The varadic macros here confuse cppcheck.
41
42
#define ASG_CHECK(...) \
43
BOOST_PP_OVERLOAD(ASG_CHECK_, __VA_ARGS__)(__VA_ARGS__)
44
45
#define ASG_CHECK_1( EXP ) \
46
do { \
47
const StatusCode sc__(EXP); \
48
if ( ! sc__.isSuccess() ) [[unlikely]] { \
49
ATH_MSG_ERROR( "Failed to call \"" << #EXP << "\"" ); \
50
return sc__; \
51
} \
52
} while( 0 )
53
54
#define ASG_CHECK_2( EXP, RET ) \
55
do { \
56
const StatusCode sc__(EXP); \
57
if( ! sc__.isSuccess() ) [[unlikely]] { \
58
ATH_MSG_ERROR( "Failed to call \"" << #EXP << "\"" ); \
59
return RET; \
60
} \
61
} while( 0 )
62
63
#endif
// __CPPCHECK__
64
65
75
#define ASG_CHECK_SA( SOURCE, EXP ) \
76
do { \
77
const StatusCode sc__(EXP); \
78
if( ! sc__.isSuccess() ) [[unlikely]] { \
79
static MsgStream msg( SOURCE ); \
80
msg << MSGSTREAM_REPORT_PREFIX << MSG::ERROR \
81
<< "Failed to call \"" << #EXP << "\"" << endmsg; \
82
return sc__; \
83
} \
84
} while( 0 )
85
87
#ifdef XAOD_STANDALONE
88
# define ATH_CHECK ASG_CHECK
89
#else
90
# include "
AthenaBaseComps/AthCheckMacros.h
"
91
#endif
92
93
#endif
// ASGMESSAGING_CHECK_H
AthCheckMacros.h
MsgStreamMacros.h
Generated on
for ATLAS Offline Software by
1.17.0