Additional documentation
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Jan 2004 13:31:23 +0000 (13:31 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Jan 2004 13:31:23 +0000 (13:31 +0000)
DPMJET/AliDpmJetRndm.cxx
DPMJET/AliDpmJetRndm.h

index bf5de78..55f7af1 100644 (file)
 
 //-----------------------------------------------------------------------------
 //   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"
 
@@ -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) {
@@ -108,6 +78,8 @@ extern "C" {
 
   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);
index 79b8e43..7935723 100644 (file)
@@ -5,21 +5,36 @@
 
 /* $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