PluginServiceV2: allow factories to be deprecated
Sometimes it is useful to be able to deprecate components, i.e. to make sure a particular job does not use a certain set of components (e.g. a multi-threaded job should not use components that are known to be not thread-safe).
This can now be achieved by setting the "deprecated" property in the plugin registry:
Registry::instance().addProperty( "MyTool", "deprecated", "optional message" );
or via:
DECLARE_COMPONENT( MyTool )
DECLARE_COMPONENT_PROPERTY( MyTool, "deprecated", "optional message" )
In addition, the warning can be turned into an error using the new
setError
method.
TODO after discussion at the Gaudi meeting:
-
use the deprecated property only for warnings and allow a message to be added -
add a global flag to turn the warning into an error -
add support for setting the flag via DECLARE_COMPONENT
Edited by Frank Winklmeier