RooAbsNumGenerator derived class in ROOT 6.28.00

Dear all,

In our framework we have a class RooMultiCatDenerator derived from RooAbsNumGenerator, which is not publically accessible anymore in ROOT 6.28 ([RF] Remove RooAbsNumGenerator classes from the public interface by guitargeek · Pull Request #11905 · root-project/root · GitHub)
Our source code is attached.
How should we adapt it with RooAbsNumGenerator not being accesible anymore?

Best,
Valeriia
RooMultiCatGenerator.h (2.4 KB)
RooMultiCatGenerator.cxx (5.9 KB)

Hi @watmann,

thank you very much for posting about this!

The generator interface is fundamental to RooFit, and any generator implementation made in experiment frameworks is surely worth up-streaming to ROOT such that everyone can benefit from it and the experiments need to maintain less code. So it’s great that you share this problem here! Your generator seems to be an efficient implementation of sampling for the RooMultiCategory, so indeed it’s relevant enough to upstream. Or do I understand the usecase wrong? Do you have the link to your full framework so I can see how it is used?

My preferred solution would be therefore either you make a PR to ROOT with this RooMultiCatGenerator, or even better you show me how it’s used in your framework so I can integrate it myself and write unit tests that reflect your usecase. Then you will have it in ROOT 6.28.04.

Let me know if this solution is acceptable to you.

Cheers,
Jonas

Hi @jonas,

Sorry for the late reply.
Yes, it is a part of multicategory sampling for toys studies. We do not actively use it any more, it was used for cross-checks in the past. We anyway would like to preserve it when the checks are repeated in the future.
This is the link to the full framework - scripts contain really particular analysis files. - I hope it is accessible for you.

Best,
Valeriia

Hi, thanks for your answer!

Sorry, I can’t see the framework. Probably I’m missing access rights. Can you maybe fix this, or share the code with other means?

We do not actively use it any more, it was used for cross-checks in the past. We anyway would like to preserve it when the checks are repeated in the future.

This completely changes my assessment from the previous post. If you are not using this class in new code anyway, then it is probably also not that useful to others and should not be upstreamed.

So if you just need this class for validating old code in a framework, and not for end users, why not just copy the header file from the ROOT repository (root/roofit/roofitcore/src/RooAbsNumGenerator.h at master · root-project/root · GitHub) into your framework? Just because the header is not shipped with ROOT, it doesn’t mean that you can’t use it. Of course, since the header is not part of the public interfaces, it might be changed without notice in new ROOT versions. But this is the temporary price that you’d need to pay before fully replacing your old code in the framework.

Is that okay for you?

Cheers,
Jonas

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