X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=DPMJET%2FAliDpmJetRndm.cxx;h=ce287b3728686f4c63136584416de0ef23cf3670;hb=01bf853bcb42a3006198259c3df83cf0ebe84b37;hp=bf5de78a4ea3909c511168804eb3fcc5376369f4;hpb=6ceb0b460f94558ed452ca6e93a6080ec21d6524;p=u%2Fmrichter%2FAliRoot.git diff --git a/DPMJET/AliDpmJetRndm.cxx b/DPMJET/AliDpmJetRndm.cxx index bf5de78a4ea..ce287b37286 100644 --- a/DPMJET/AliDpmJetRndm.cxx +++ b/DPMJET/AliDpmJetRndm.cxx @@ -17,12 +17,15 @@ //----------------------------------------------------------------------------- // Class: AliDpmJetRndm -// Random Number Interface to Fortran -// Since AliGenDpmJet belongs to another module (TDPMjet) one cannot -// pass the ponter to the generator via static variable +// Responsibilities: Interface to Root random number generator +// from Fortran (re-implements FINCTION dt_rndm_dpmjet) +// Very similar to AliHijingRndm +// Note: Since AliGenDpmJet belongs to another module (TDPMjet) one cannot +// pass the ponter to the generator via static variable +// Collaborators: AliGenDPMjet class //----------------------------------------------------------------------------- -#include +#include #include "AliDpmJetRndm.h" @@ -30,39 +33,6 @@ TRandom * AliDpmJetRndm::fgDpmJetRandom=0; ClassImp(AliDpmJetRndm) -//_______________________________________________________________________ -AliDpmJetRndm::AliDpmJetRndm() -{ - // - // Default ctor - // -} - -//_______________________________________________________________________ -AliDpmJetRndm::AliDpmJetRndm(const AliDpmJetRndm& rn) -{ - // - // Copy constructor - // - rn.Copy(*this); -} - -//_______________________________________________________________________ -AliDpmJetRndm::~AliDpmJetRndm() { - // - // Destructor - // - fgDpmJetRandom=0; -} - -//_______________________________________________________________________ -void AliDpmJetRndm::Copy(AliDpmJetRndm&) const -{ - // - // No copy is allowed - // - ::Fatal("Copy","Not implemented\n"); -} //_______________________________________________________________________ void AliDpmJetRndm::SetDpmJetRandom(TRandom *ran) { @@ -86,28 +56,38 @@ TRandom * AliDpmJetRndm::GetDpmJetRandom() { # define dt_rndmst_dpmjet dt_rndmst_dpmjet_ # define dt_rndmin_dpmjet dt_rndmin_dpmjet_ # define dt_rndmou_dpmjet dt_rndmou_dpmjet_ +# define rninit_dpmjet rninit_dpmjet_ # define type_of_call #else # define dt_rndm_dpmjet DT_RNDM_DPMJET_ # define dt_rndmst_dpmjet DT_RNDMST_DPMJET # define dt_rndmin_dpmjet DT_RNDMIN_DPMJET # define dt_rndmou_dpmjet DT_RNDMOU_DPMJET +# define rninit_dpmjet RNINIT_DPMJET # define type_of_call _stdcall #endif extern "C" { - void type_of_call dt_rndmst_dpmjet(Int_t &, Int_t &, Int_t &, Int_t &) + void type_of_call dt_rndmst_(Int_t &, Int_t &, Int_t &, Int_t &) {printf("Dummy version of dt_rndmst reached\n");} - void type_of_call dt_rndmin_dpmjet(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &) + void type_of_call dt_rndmin_(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &) {printf("Dummy version of dt_rndmin reached\n");} - void type_of_call dt_rndmou_dpmjet(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &) + void type_of_call dt_rndmou_(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &) {printf("Dummy version of dt_rndmou reached\n");} - Double_t type_of_call dt_rndm_dpmjet(Int_t &) + void type_of_call dt_rndmte_(Int_t &, Int_t &, Int_t &, Int_t &, Int_t &, Int_t &) + {printf("Dummy version of dt_rndmou reached\n");} + + void type_of_call rninit_(Int_t &, Int_t &, Int_t &, Int_t &) + {printf("Dummy version of rninit reached\n");} + + Double_t type_of_call dt_rndm_(Int_t &) { + // Wrapper to static method which retrieves the + // pointer to the Root (C++) generator Float_t r; do r = AliDpmJetRndm::GetDpmJetRandom()->Rndm(); while(0 >= r || r >= 1);