RooMultiCatIter is unnecessary, since all multi category classes know how to generate their own states. Use begin() / end() and range-based for loops on instances of these classes.
This function is unneccessary if the template parameter is RooAbsRealLValue (+ derived types) or RooAbsCategoryLValue (+derived types), as arg() will always return the correct type.