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 //-----------------------------------------------------------------------------
19 // Class: AliPythiaRndm
20 // Random Number Interface to Fortran (FINCTION PYR from PYTHIA)
21 // Very similar to AliHijingRndm
23 //-----------------------------------------------------------------------------
27 #include "AliPythiaRndm.h"
29 TRandom * AliPythiaRndm::fgPythiaRandom=0;
31 ClassImp(AliPythiaRndm)
33 //_______________________________________________________________________
34 AliPythiaRndm::AliPythiaRndm()
41 //_______________________________________________________________________
42 AliPythiaRndm::AliPythiaRndm(const AliPythiaRndm& rn)
50 //_______________________________________________________________________
51 AliPythiaRndm::~AliPythiaRndm() {
58 //_______________________________________________________________________
59 void AliPythiaRndm::Copy(AliPythiaRndm&) const
62 // No copy is allowed for the object
64 ::Fatal("Copy","Not implemented\n");
67 //_______________________________________________________________________
68 void AliPythiaRndm::SetPythiaRandom(TRandom *ran) {
70 // Sets the pointer to an existing random numbers generator
72 if(ran) fgPythiaRandom=ran;
73 else fgPythiaRandom=gRandom;
76 //_______________________________________________________________________
77 TRandom * AliPythiaRndm::GetPythiaRandom() {
79 // Retrieves the pointer to the random numbers generator
81 return fgPythiaRandom;
84 //_______________________________________________________________________
86 #define pyrset pyrset_
87 #define pyrget pyrget_
92 // Wrapper to FINCTION PYR from PYTHIA
93 // Uses static method to retrieve the pointer to the (C++) generator
95 do r=AliPythiaRndm::GetPythiaRandom()->Rndm();
96 while(0 >= r || r >= 1);
99 void pyrset(Int_t*,Int_t*) {}
100 void pyrget(Int_t*,Int_t*) {}