Skip to content

Deprecate obsolete ISvcLocator APIs (Gaudi < v22)

Marco Clemencic requested to merge deprecate-v21-compatibility into master

Before Gaudi v21 services were accessed with something like:

IMyService *svc = nullptr;
svcLocator()->service("MyService", svc);
svc->doSomething();
svc->release();

with the usual mistake of forgetting the call to release().

As of Gaudi v21 one can do

SmartIF<IMyService> svc = svcLocator()->service("MyService");
svc->doSomething();

or (in C++11)

auto svc = svcLocator()->service<IMyService>("MyService");
svc->doSomething();

The plan was to remove the old API in Gaudi v22, but it was forgotten.

This MR deprecates the obsolete API so that we can clean up downstream code with the aim of removing the backward compatibility hacks in %v40r0.

Edited by Marco Clemencic

Merge request reports

Loading