From cef490e63ddca0a3b1b350e494f1b8b31f031dce Mon Sep 17 00:00:00 2001 From: hristov Date: Tue, 13 Jan 2004 11:17:01 +0000 Subject: [PATCH] Removing warnings (icc), adding more detailed description --- PYTHIA6/AliPythiaRndm.cxx | 49 ++++++++++----------------------------- PYTHIA6/AliPythiaRndm.h | 28 ++++++++++++++++------ 2 files changed, 33 insertions(+), 44 deletions(-) diff --git a/PYTHIA6/AliPythiaRndm.cxx b/PYTHIA6/AliPythiaRndm.cxx index c10eb9e5101..c0368062bf7 100644 --- a/PYTHIA6/AliPythiaRndm.cxx +++ b/PYTHIA6/AliPythiaRndm.cxx @@ -17,12 +17,20 @@ //----------------------------------------------------------------------------- // Class: AliPythiaRndm -// Random Number Interface to Fortran (FINCTION PYR from PYTHIA) -// Very similar to AliHijingRndm -// Author: +// Responsibilities: Interface to Root random number generator +// from Fortran (re-implements FINCTION PYR from PYTHIA) +// Very similar to AliHijingRndm +// Collaborators: AliPythia and AliGenPythia classes +// Example: +// +// root> AliPythia::Instance(); +// root> AliPythiaRndm::SetPythiaRandom(new TRandom3()); +// root> AliPythiaRndm::GetPythiaRandom()->SetSeed(0); +// root> cout<<"Seed "<< AliPythiaRndm::GetPythiaRandom()->GetSeed() < +#include #include "AliPythiaRndm.h" @@ -30,39 +38,6 @@ TRandom * AliPythiaRndm::fgPythiaRandom=0; ClassImp(AliPythiaRndm) -//_______________________________________________________________________ -AliPythiaRndm::AliPythiaRndm() -{ - // - // Default ctor - // -} - -//_______________________________________________________________________ -AliPythiaRndm::AliPythiaRndm(const AliPythiaRndm& rn) -{ - // - // Copy constructor - // - rn.Copy(*this); -} - -//_______________________________________________________________________ -AliPythiaRndm::~AliPythiaRndm() { - // - // Destructor - // - fgPythiaRandom=0; -} - -//_______________________________________________________________________ -void AliPythiaRndm::Copy(AliPythiaRndm&) const -{ - // - // No copy is allowed for the object - // - ::Fatal("Copy","Not implemented\n"); -} //_______________________________________________________________________ void AliPythiaRndm::SetPythiaRandom(TRandom *ran) { diff --git a/PYTHIA6/AliPythiaRndm.h b/PYTHIA6/AliPythiaRndm.h index d7330e6ef94..9bc644322f0 100644 --- a/PYTHIA6/AliPythiaRndm.h +++ b/PYTHIA6/AliPythiaRndm.h @@ -5,21 +5,35 @@ /* $Id$ */ -#include "TRandom.h" +#include +#include + +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 -- 2.43.5