Hi,
I understand your use case. Unfortunately there is no way of getting the Engine directly from TRandomMixMax, but there is an easy workaround, given the fact that the Engine is a protected member of TRandomGen (i.e. TRandomMixMax).
The workaround is to create a derived class of TRandomGen as following:
struct Rng : public TRandomGen<ROOT::Math::MixMaxEngine<240,0>> { ROOT::Math::MixMaxEngine<240,0> & GetEngine() { return fEngine; } };
auto rng = new Rng();
auto mixmaxEngine = rng->GetEngine();
gRandom = rng;
I will consider for the future versions to add this possibility directly in the TRandomGen classes.
Thank you for your feedback !
Best regards
Lorenzo