Skip to content
Snippets Groups Projects
Commit 18c14cf4 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

ControlTest: remove usage of deprecated ISvcLocator APIs

parent b00dde60
No related branches found
No related tags found
16 merge requests!78241Draft: FPGATrackSim: GenScan code refactor,!78236Draft: Switching Streams https://its.cern.ch/jira/browse/ATR-27417,!78056AFP monitoring: new synchronization and cleaning,!78041AFP monitoring: new synchronization and cleaning,!77990Updating TRT chip masks for L1TRT trigger simulation - ATR-28372,!77731Draft: Updates to ZDC reconstruction,!77728Draft: updates to ZDC reconstruction,!77522Draft: sTGC Pad Trigger Emulator,!76725ZdcNtuple: Fix cppcheck warning.,!76611L1CaloFEXByteStream: Fix out-of-bounds array accesses.,!76475Punchthrough AF3 implementation in FastG4,!76474Punchthrough AF3 implementation in FastG4,!75729New implementation of ZDC nonlinear FADC correction.,!75703Draft: Update to HI han config for HLT jets,!75184Draft: Update file heavyions_run.config,!74639LumiBlockComps+StoreGate+ControlTest: remove usage of deprecated ISvcLocator APIs
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#undef NDEBUG
......@@ -44,10 +44,8 @@ int main() {
}
assert(pSvcLoc);
StoreGateSvc* pSG;
const bool CREATEIF(true);
assert((pSvcLoc->service("StoreGateSvc", pSG, CREATEIF)).isSuccess());
SmartIF<StoreGateSvc> pSG(pSvcLoc->service("StoreGateSvc"));
assert(pSG);
Circular *circ0(new Circular), *circ1(new Circular);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/***************************************************************************
......@@ -8,7 +8,6 @@
ATLAS Collaboration
***************************************************************************/
// $Id: ClearStore_test.cxx,v 1.1 2007-07-10 01:14:31 calaf Exp $
#include <iostream>
......@@ -32,9 +31,7 @@ int main() {
}
assert(pSvcLoc);
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert((pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess());
SmartIF<StoreGateSvc> pStore(pSvcLoc->service("StoreGateSvc"));
assert(pStore);
cout << "*** ClearStore_test run standard testRecord a first time ***" << endl;
......
/*
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#undef NDEBUG
......@@ -20,8 +20,6 @@
#include <cassert>
const bool CREATEIF(true);
struct Bla{
Bla(): i(0) {}
Bla(int m): i(m) {}
......@@ -85,9 +83,7 @@ int main() {
assert( (DataProxy_cast<Bla>(&transientProxy))->i == 77 );
IConversionSvc* pIConvSvc(nullptr);
StatusCode cs((pSvcLoc->service("EventPersistencySvc", pIConvSvc, CREATEIF)));
assert(cs.isSuccess());
SmartIF<IConversionSvc> pIConvSvc(pSvcLoc->service("EventPersistencySvc"));
assert(pIConvSvc);
// create a transient address with IOA.
TransientAddress* tGen = new TransientAddress(ClassID_traits<Foo>::ID(),
......@@ -114,9 +110,7 @@ int main() {
fptr->doNothing(); //remove warning
IProxyProviderSvc* pIPPSvc(nullptr);
StatusCode psc(pSvcLoc->service("ProxyProviderSvc", pIPPSvc, CREATEIF));
assert( psc.isSuccess() );
SmartIF<IProxyProviderSvc> pIPPSvc(pSvcLoc->service("ProxyProviderSvc"));
assert( pIPPSvc );
TransientAddress* tad = new TransientAddress(ClassID_traits<Bla>::ID(), "bla");
......
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "TestTools/SGassert.h"
......@@ -133,10 +133,8 @@ int main() {
return 0;
}
assert(pSvcLoc);
StoreGateSvc* pSG;
const bool CREATEIF(true);
assert((pSvcLoc->service("StoreGateSvc", pSG, CREATEIF)).isSuccess());
SmartIF<StoreGateSvc> pSG(pSvcLoc->service("StoreGateSvc"));
assert(pSG);
linkVector(*pSG);
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
#include "TestTools/FLOATassert.h"
......@@ -134,9 +134,7 @@ int main(int argc, char** argv) {
std::cerr << " This test cannot be run without init Gaudi" << endl;
}
assert(pSvcLoc);
StoreGateSvc* pSG;
const bool CREATEIF(true);
assert((pSvcLoc->service("StoreGateSvc", pSG, CREATEIF)).isSuccess());
SmartIF<StoreGateSvc> pSG(pSvcLoc->service("StoreGateSvc"));
assert(pSG);
StatusCode sc;
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/** @file ProxyProviderSvc_test.cxx
......@@ -180,12 +180,9 @@ int main ATLAS_NOT_THREAD_SAFE () {
}
assert( pSvcLoc );
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert( (pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess() );
SmartIF<StoreGateSvc> pStore(pSvcLoc->service("StoreGateSvc"));
assert( pStore );
IProxyProviderSvc* pIPPSvc;
assert( (pSvcLoc->service("ProxyProviderSvc", pIPPSvc, CREATE)).isSuccess() );
SmartIF<IProxyProviderSvc> pIPPSvc(pSvcLoc->service("ProxyProviderSvc"));
assert( pIPPSvc );
pIPPSvc->addProvider(new TestProvider<Foo>("aFoo"));
......
......@@ -349,10 +349,7 @@ int main() {
errorcheck::ReportMessage::hideErrorLocus();
assert(pSvcLoc);
StoreGateSvc* pSG;
const bool CREATEIF(true);
assert((pSvcLoc->service("StoreGateSvc", pSG, CREATEIF)).isSuccess());
SmartIF<StoreGateSvc> pSG(pSvcLoc->service("StoreGateSvc"));
assert(pSG);
Foo* pFoo = new Foo;
......
/*
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/***************************************************************************
......@@ -284,9 +284,7 @@ int main ATLAS_NOT_THREAD_SAFE () {
}
assert(pSvcLoc);
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert((pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess());
SmartIF<StoreGateSvc> pStore(pSvcLoc->service("StoreGateSvc"));
assert(pStore);
testRecord(*pStore);
......@@ -337,8 +335,7 @@ int main ATLAS_NOT_THREAD_SAFE () {
///////
StoreGateSvc* detStore(nullptr);
assert((pSvcLoc->service("DetectorStore", detStore, CREATE)).isSuccess());
SmartIF<StoreGateSvc> detStore(pSvcLoc->service("DetectorStore"));
assert(detStore);
testRecord(*detStore);
......
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
*/
/***************************************************************************
......@@ -8,7 +8,6 @@
ATLAS Collaboration
***************************************************************************/
// $Id: StoreID_test.cxx 770224 2016-08-26 01:59:31Z ssnyder $
#include <iostream>
......@@ -32,18 +31,15 @@ int main() {
}
assert(pSvcLoc);
StoreGateSvc* pStore(nullptr);
static const bool CREATE(true);
assert((pSvcLoc->service("StoreGateSvc", pStore, CREATE)).isSuccess());
SmartIF<StoreGateSvc> pStore(pSvcLoc->service("StoreGateSvc"));
assert(pStore);
assert(pStore->storeID() == StoreID::EVENT_STORE);
assert((pSvcLoc->service("DetectorStore", pStore)).isSuccess());
pStore = pSvcLoc->service("DetectorStore");
assert(pStore);
assert(pStore->storeID() == StoreID::DETECTOR_STORE);
assert((pSvcLoc->service("ConditionStore", pStore, CREATE)).isSuccess());
pStore = pSvcLoc->service("ConditionStore");
assert(pStore);
assert(pStore->storeID() == StoreID::CONDITION_STORE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment