From 4c64c06b7cb0b767b774046ea59679646aa7d123 Mon Sep 17 00:00:00 2001 From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> Date: Wed, 9 Dec 2020 10:58:10 +0100 Subject: [PATCH] Fixed the StatusCode handling in the unit test. This is necessary for making the test work in AthAnalysis. --- .../test/ut_xaodrootaccess_transtree_test.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx index f7b4e3d8138..c58c63c9e4b 100644 --- a/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx +++ b/Control/xAODRootAccess/test/ut_xaodrootaccess_transtree_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // System include(s): @@ -17,7 +17,6 @@ // Local include(s): #include "xAODRootAccess/Init.h" #include "xAODRootAccess/MakeTransientTree.h" -#include "xAODRootAccess/tools/ReturnCheck.h" #include "xAODRootAccess/tools/Message.h" int main() { @@ -26,7 +25,10 @@ int main() { static const char* APP_NAME = "ut_xaodrootaccess_transtree_test"; // Initialise the environment: - RETURN_CHECK( APP_NAME, xAOD::Init( APP_NAME ) ); + if( ! xAOD::Init( APP_NAME ).isSuccess() ) { + ::Error( APP_NAME, XAOD_MESSAGE( "Failed to call xAOD::Init()" ) ); + return 1; + } // Open it using a TFile: std::unique_ptr< ::TFile > ifile( ::TFile::Open( "$ASG_TEST_FILE_MC", -- GitLab