Skip to content

Revert some interface changes of THistSvc

Martin Errenst requested to merge merrenst/Gaudi:THistSvc-180131 into master

The recent interface changes in THistSvc would require too much manual intervention for quick adaption in Athena. For this reason I reverted some of the changes and added (deprecated) methods to preserve most of the old interface. This also means, that there are more StatusCodes again, opposed to returning nullable types to communicate failures.

As a rule, the THistSvc is expected to take ownership of the managed histograms, but a very common use case is to register a histogram pointer and continue to work on it afterwards. The interface now offers methods to do exactly that in one call, while communicating ownership transfer to the service to some extend.

This affects only histogram methods. regTree, getTree, regGraph and getGraph aren't used that often in Athena (< 100 times), so that I should be able to migrate those to unique_ptrs within a couple of days on my own.

The deprecation attribute is introducing one additional compiler warning in Gaudi (ITHistSvc.h -> THistSvc.h), so how should I address that in the future? I could remove the attribute from the interface and only leave a comment there. This way, only clients of the THistSvc implementation would be marked during compile time. (None in Gaudi; O(1000) times in Athena without any scripted migration to a non-deprecated method)

To prepare the THistSvc for future rewriting efforts (with ROOT 7 histograms in mind), I have changed the order of functions and added many comments. Hopefully this makes the MR/commits not too bloated for everyones taste.

Edited by Marco Clemencic

Merge request reports