3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////////////////
10 // Random Number Interface //
12 ///////////////////////////////////////////////////////////////////////////////
20 AliRndm(const AliRndm &rn);
21 virtual ~AliRndm() {fRandom=0;}
22 AliRndm & operator=(const AliRndm& rn)
23 {rn.Copy(*this); return (*this);}
25 // Random number generator bit
26 virtual void SetRandom(TRandom *ran=0)
28 else fRandom=gRandom;}
30 virtual TRandom* GetRandom() const {return fRandom;}
31 virtual void Rndm(Float_t* array, Int_t size) const;
33 virtual Float_t Rndm() const {return fRandom->Rndm();}
35 virtual Float_t Rndm() const {
37 do r=fRandom->Rndm(); while(0>=r || r>=1); return r;}
39 virtual void WriteRandom(const char *filename) const;
40 virtual void ReadRandom(const char *filename);
43 TRandom *fRandom; // Pointer to the random number generator
46 void Copy(AliRndm &rn) const;
48 ClassDef(AliRndm,1) //Random Number generator wrapper