//-----------------------------------------------------------------------------
// 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 <TError.h>
+#include <TRandom.h>
#include "AliDpmJetRndm.h"
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) {
Double_t type_of_call dt_rndm_dpmjet(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);
/* $Id$ */
-#include "TRandom.h"
+#include <Rtypes.h>
+#include <TError.h>
+
+class TRandom;
class AliDpmJetRndm {
public:
- AliDpmJetRndm();
- AliDpmJetRndm(const AliDpmJetRndm &rnd);
- virtual ~AliDpmJetRndm();
- AliDpmJetRndm & operator=(const AliDpmJetRndm& rn)
- {rn.Copy(*this); return (*this);}
+ AliDpmJetRndm() {
+ // Default constructor. The static data member is initialized
+ // in the implementation file
+ }
+ AliDpmJetRndm(const AliDpmJetRndm & /*rn*/) {
+ // Copy constructor: no copy allowed for the object
+ ::Fatal("Copy constructor","Not allowed\n");
+ }
+ virtual ~AliDpmJetRndm() {
+ // Destructor
+ fgDpmJetRandom=0;
+ }
+
+ AliDpmJetRndm & operator=(const AliDpmJetRndm& /*rn*/) {
+ // Assignment operator: no assignment allowed
+ ::Fatal("Assignment operator","Not allowed\n");
+ return (*this);
+ }
static void SetDpmJetRandom(TRandom *ran=0);
static TRandom * GetDpmJetRandom();
private:
- void Copy(AliDpmJetRndm &rn) const;
static TRandom * fgDpmJetRandom; //! pointer to the random number generator