]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythiaRndm.h
Fix for coverity (AdC)
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythiaRndm.h
index d7330e6ef944aa94532af39b71b12d4a391f089d..d2dfc6ae47758b3af1adc29e856a00ba534235ec 100644 (file)
@@ -5,21 +5,35 @@
 
 /* $Id$ */
 
-#include "TRandom.h"
+#include <Rtypes.h>
+#include <TError.h>
+
+class TRandom;
 
 class AliPythiaRndm {
  public:
-  AliPythiaRndm();
-  AliPythiaRndm(const AliPythiaRndm &rnd);
-  virtual ~AliPythiaRndm();
-  AliPythiaRndm & operator=(const AliPythiaRndm& rn) 
-    {rn.Copy(*this); return (*this);}
+  AliPythiaRndm() {
+    // Default constructor. The static data member is initialized 
+    // in the implementation file
+  }
+  AliPythiaRndm(const AliPythiaRndm & /*rn*/) {
+    // Copy constructor: no copy allowed for the object
+    ::Fatal("Copy constructor","Not allowed\n");
+  }
+  virtual ~AliPythiaRndm() {
+    // Destructor
+    fgPythiaRandom=0;
+  }
+  AliPythiaRndm & operator=(const AliPythiaRndm& /*rn*/) {
+    // Assignment operator: no assignment allowed
+    ::Fatal("Assignment operator","Not allowed\n");
+    return (*this);
+  }
   
   static void SetPythiaRandom(TRandom *ran=0);
   static TRandom * GetPythiaRandom();
 
 private:
-  void Copy(AliPythiaRndm &rn) const;
 
   static TRandom * fgPythiaRandom; //! pointer to the random number generator