1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //-----------------------------------------------------------------------------
20 // Responsibilities: Interface to Root random number generator
21 // from Fortran (re-implements FINCTION RLU_HIJING
23 // Note: Since AliGenDime belongs to another module (TDime) one cannot
24 // pass the ponter to the generator via static variable
25 // Collaborators: AliGenDime class
28 // root> AliGenDime *gener = new AliGenDime(-1);
29 // root> AliDimeRndm::SetDimeRandom(new TRandom3());
30 // root> AliDimeRndm::GetDimeRandom()->SetSeed(0);
31 // root> cout<<"Seed "<< AliDimeRndm::GetDimeRandom()->GetSeed() <<endl;
32 //-----------------------------------------------------------------------------
36 #include "AliDimeRndm.h"
38 TRandom * AliDimeRndm::fgDimeRandom=0;
42 //_______________________________________________________________________
43 void AliDimeRndm::SetDimeRandom(TRandom *ran) {
45 // Sets the pointer to an existing random numbers generator
47 if(ran) fgDimeRandom=ran;
48 else fgDimeRandom=gRandom;
51 //_______________________________________________________________________
52 TRandom * AliDimeRndm::GetDimeRandom() {
54 // Retrieves the pointer to the random numbers generator
59 //_______________________________________________________________________
60 //# define rluget_hijing rluget_hijing_
61 //# define rluset_hijing rluset_hijing_
62 //# define rlu_hijing rlu_hijing_
66 // void rluget_hijing(Int_t & /*lfn*/, Int_t & /*move*/)
67 //{printf("Dummy version of rluget_hijing reached\n");}
69 //void rluset_hijing(Int_t & /*lfn*/, Int_t & /*move*/)
70 //{printf("Dummy version of rluset_hijing reached\n");}
72 //Float_t rlu_hijing(Int_t & /*idum*/)
74 // Wrapper to FINCTION RLU_HIJING from HIJING
75 // Uses static method to retrieve the pointer to the (C++) generator
77 // do r=AliDimeRndm::GetDimeRandom()->Rndm();
78 // while(0 >= r || r >= 1);