RooCategory::isValidIndex() is gone -> what is the appropriate replacement?

Dear experts,
I noticed that RooCategory::isValidIndex is not available in ROOT versions 6.22 and 6.24. I could not find a remark in the release notes where a replacement was recommended. There is a vague suggestion in the RooAbsCategory Doxygen (ROOT: RooAbsCategory Class Reference) to use hasIndex() instead but one cannot be really sure because of a typo/missing references. Can someone please tell me if this replacement is 100% safe to do? The implementation of these two methods is at least not 100% the same and it is absolutely crucial that I do not change the behaviour of the code I am using.
Many thanks!

Hello, thanks for asking!

Indeed, hasIndex() is the safe replacement. There is no type in the reference guide I think, do you mean because it says isValid and not isValidIndex? Well, isValid() is not a typo but it was indeed a function in ROOT 6.20:

Okay it’s true that the documentation doesn’t explicitly state that isValidIndex() should also be replaced with hasIndex(). When I update the reference guide the next time, I will also add this.


Ok, so all of these the same anyway. Thank a lot for the clarification! " do you mean because it says isValid and not isValidIndex" → yes, I thought since isValidIndex is not mentioned anywhere else this must be a typo, but isValid does exist indeed.
Vukan J.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.