ATLAS Offline Software
PhysicsAnalysis/RingerSelectorTools/RingerSelectorTools/tools/cxx/errorcheck.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef RINGERSELECTORTOOLS_TOOLS_CXX_ERRORCHECK_H
6 #define RINGERSELECTORTOOLS_TOOLS_CXX_ERRORCHECK_H
7 
8 #if !defined(RINGER_STANDALONE) && !defined(XAOD_STANDALONE)
10 #else
11 # ifndef XAOD_STANDALONE
12 # include <TError.h> // Include ::Error from root
13 # endif
14 # define PLACE_INFO __FILE__
15 # define CHECK( ARG ) \
16  do { \
17  const bool result = ARG; \
18  if( ! result ) { \
19  ::Error( PLACE_INFO, "Failed to execute: \"%s\"", \
20  #ARG ); \
21  return 1; \
22  } \
23  } while( false )
24 #define ATH_CHECK CHECK
25 #endif
26 
27 #endif // RINGERSELECTORTOOLS_TOOLS_CXX_ERRORCHECK_H
errorcheck.h
Helpers for checking error return status codes and reporting errors.