diff --git a/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx b/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx index 73e0009f1e1590a273a498159084bd247bafbbc4..07a2196ae92543c859aeb86960d1a425f4b76713 100644 --- a/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthFilterAlgorithm.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // AthFilterAlgorithm.cxx @@ -74,10 +74,10 @@ AthFilterAlgorithm::sysInitialize() if ( Gaudi::StateMachine::INITIALIZED <= FSMState() ) return StatusCode::SUCCESS; // Set the Algorithm's properties - ATH_CHECK(setProperties()); + bindPropertiesTo( serviceLocator()->getOptsSvc() ); // Bypass the initialization if the algorithm is disabled. - // Need to do this after setProperties. + // Need to do this after bindPropertiesTo. if ( !isEnabled( ) ) return StatusCode::SUCCESS; // ---- stolen from GaudiKernel/Algorithm::sysInitialize ------- END --- diff --git a/Control/AthenaBaseComps/src/AthHistogramAlgorithm.cxx b/Control/AthenaBaseComps/src/AthHistogramAlgorithm.cxx index dbdb3798d05db55564dd17648acba2beed6bb4da..6fff2f3b478afe42b8a53bd1fee50e625d0cba13 100644 --- a/Control/AthenaBaseComps/src/AthHistogramAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthHistogramAlgorithm.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /// @class AthHistogramAlgorithm.h @@ -80,10 +80,10 @@ StatusCode AthHistogramAlgorithm::sysInitialize() if ( Gaudi::StateMachine::INITIALIZED <= FSMState() ) return StatusCode::SUCCESS; // Set the Algorithm's properties - ATH_CHECK(setProperties()); + bindPropertiesTo( serviceLocator()->getOptsSvc() ); // Bypass the initialization if the algorithm is disabled. - // Need to do this after setProperties. + // Need to do this after bindPropertiesTo. if ( !isEnabled( ) ) return StatusCode::SUCCESS; // ---- stolen from GaudiKernel/Algorithm::sysInitialize ------- END --- diff --git a/Control/AthenaBaseComps/test/AthAlgTool_test.cxx b/Control/AthenaBaseComps/test/AthAlgTool_test.cxx index 681a9368d143a2b8dde46d61c3f247a705a230a8..bbf45192f95bc3988b3620a2d744c6a7fe37bba0 100644 --- a/Control/AthenaBaseComps/test/AthAlgTool_test.cxx +++ b/Control/AthenaBaseComps/test/AthAlgTool_test.cxx @@ -1,8 +1,7 @@ /* - * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration. + * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. */ -// $Id$ /** * @file AthenaBaseComps/test/AthAlgTool_test.cxx * @author scott snyder <snyder@bnl.gov> @@ -137,7 +136,7 @@ void test1 (ISvcLocator* svcloc) MyAlg alg ("toolalg", svcloc); alg.addRef(); MyAlgTool tool ("MyAlgTool", "tool2", &alg); tool.addRef(); - assert (tool.setProperties().isSuccess()); + tool.bindPropertiesTo(svcloc->getOptsSvc()); assert (tool.sysInitialize().isSuccess()); assert (tool.rkey.clid() == 293847295); @@ -210,14 +209,14 @@ void test2 (ISvcLocator* svcLoc) MyAlg alg ("arralg", svcLoc); alg.addRef(); MyArrAlgTool tool ("MyAlgTool", "arrtool", &alg); tool.addRef(); - assert (tool.setProperties().isSuccess()); + tool.bindPropertiesTo(svcLoc->getOptsSvc()); assert (tool.sysInitialize().isSuccess()); comphandles (tool.inputHandles(),{"StoreGateSvc+raa", "StoreGateSvc+rbb", "StoreGateSvc+rcc", "StoreGateSvc+rdd", "StoreGateSvc+ree", "StoreGateSvc+rff", "StoreGateSvc+rrr"}); comphandles (tool.outputHandles(),{"StoreGateSvc+waa", "StoreGateSvc+wbb", "StoreGateSvc+wcc", "StoreGateSvc+wdd", "StoreGateSvc+wee", "StoreGateSvc+wff", "StoreGateSvc+www"}); // Test that circular dependency detection worksd. MyArrAlgTool tool2 ("MyArrAlgTool", "arrtool2", &alg); tool2.addRef(); - assert (tool2.setProperties().isSuccess()); + tool2.bindPropertiesTo(svcLoc->getOptsSvc()); assert (tool2.sysInitialize().isFailure()); } diff --git a/Control/AthenaBaseComps/test/AthAlgorithm_test.cxx b/Control/AthenaBaseComps/test/AthAlgorithm_test.cxx index 9ae1da40c34af54f9ec0965d9da07f2cf11e7132..323fc19036086d8cc7c37e4441a2cc4d5f6c048d 100644 --- a/Control/AthenaBaseComps/test/AthAlgorithm_test.cxx +++ b/Control/AthenaBaseComps/test/AthAlgorithm_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. */ // $Id$ @@ -117,7 +117,6 @@ void test1 (ISvcLocator* svcLoc) std::cout << "test1\n"; MyAlg alg ("ralg", svcLoc); alg.addRef(); - //assert (alg.setProperties().isSuccess()); assert (alg.sysInitialize().isSuccess()); assert (alg.rkey.clid() == 293847295); diff --git a/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx b/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx index a0489f7549f66ac55aa3bd3902e3070958e6fb96..19f881f05c4e1066dadb6be13a5bc94f3963d26f 100644 --- a/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx +++ b/Control/AthenaBaseComps/test/AthReentrantAlgorithm_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -114,7 +114,6 @@ void test1 (ISvcLocator* svcLoc) std::cout << "test1\n"; MyAlg alg ("ralg", svcLoc); alg.addRef(); - //assert (alg.setProperties().isSuccess()); assert (alg.sysInitialize().isSuccess()); assert (alg.rkey.clid() == 293847295); diff --git a/Control/AthenaBaseComps/test/propertyHandling_test.cxx b/Control/AthenaBaseComps/test/propertyHandling_test.cxx index 82bb2e66550cc3fa55514f535b2490f2a7792ba0..05dbdebd0377e3e913716170bd7162813e04fdd2 100644 --- a/Control/AthenaBaseComps/test/propertyHandling_test.cxx +++ b/Control/AthenaBaseComps/test/propertyHandling_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 */ // $Id$ @@ -218,7 +218,6 @@ void test1 (ISvcLocator* svcLoc) std::cout << "test1\n"; MyAthAlgorithm alg ("alg", svcLoc); alg.addRef(); - //assert (alg.setProperties().isSuccess()); assert (alg.sysInitialize().isSuccess()); assert (alg.rkey.clid() == 293847295); @@ -315,7 +314,7 @@ void test2 (ISvcLocator* svcLoc) MyAthAlgorithm alg ("alg", svcLoc); alg.addRef(); MyAthAlgTool tool ("MyAthAlgTool", "tool", &alg); tool.addRef(); - assert (tool.setProperties().isSuccess()); + tool.bindPropertiesTo(svcLoc->getOptsSvc()); assert (tool.sysInitialize().isSuccess()); assert (tool.rkey.clid() == 293847295);