TRandom3 problem setting seed

I am a bit confused, how I should set the random generator seed? I thought I should get back the seed is 3, but I always get 624.

I get the following in a root interactive session:

   ------------------------------------------------------------------
  | Welcome to ROOT 6.26/06                        https://root.cern |
  | (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Oct 11 2022, 13:18:00                 |
  | From heads/latest-stable@274b476a                                |
  | With c++ (Debian 8.3.0-6) 8.3.0                                  |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |
   ------------------------------------------------------------------

root [0] TRandom3 *rnd = new TRandom3(3);
root [1] rnd->GetSeed()
(unsigned int) 624
root [2] rnd->SetSeed(3)
root [3] rnd->GetSeed()
(unsigned int) 624
root [4] 

Ok, if I use gRandom->TRandom::GetSeed() I recover back the good seed. But I do not understand why fRandom->GetSeed() just does not return the good seed value, since it is the most intuitive way.

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