From 3fe464932e53ec7b5c764aeb95fc72ea857b5204 Mon Sep 17 00:00:00 2001 From: hristov Date: Tue, 13 Jan 2004 11:45:46 +0000 Subject: [PATCH] Removing warnings (icc), adding more detailed description --- HIJING/AliHijingRndm.cxx | 52 ++++++++++------------------------------ HIJING/AliHijingRndm.h | 28 ++++++++++++++++------ 2 files changed, 34 insertions(+), 46 deletions(-) diff --git a/HIJING/AliHijingRndm.cxx b/HIJING/AliHijingRndm.cxx index d17334b1b5b..0aad668d4da 100644 --- a/HIJING/AliHijingRndm.cxx +++ b/HIJING/AliHijingRndm.cxx @@ -17,13 +17,21 @@ //----------------------------------------------------------------------------- // Class: AliHijingRndm -// Random Number Interface to Fortran (FINCTION RLU_HIJING from HIJING) -// Since AliGenHijing belongs to another module (THijing) one cannot -// pass the ponter to the generator via static variable -// Author: +// Responsibilities: Interface to Root random number generator +// from Fortran (re-implements FINCTION RLU_HIJING +// from HIJING) +// Note: Since AliGenHijing belongs to another module (THijing) one cannot +// pass the ponter to the generator via static variable +// Collaborators: AliGenHijing class +// Example: +// +// root> AliGenHijing *gener = new AliGenHijing(-1); +// root> AliHijingRndm::SetHijingRandom(new TRandom3()); +// root> AliHijingRndm::GetHijingRandom()->SetSeed(0); +// root> cout<<"Seed "<< AliHijingRndm::GetHijingRandom()->GetSeed() < +#include #include "AliHijingRndm.h" @@ -31,40 +39,6 @@ TRandom * AliHijingRndm::fgHijingRandom=0; ClassImp(AliHijingRndm) -//_______________________________________________________________________ -AliHijingRndm::AliHijingRndm() -{ - // - // Default ctor - // -} - -//_______________________________________________________________________ -AliHijingRndm::AliHijingRndm(const AliHijingRndm& rn) -{ - // - // Copy constructor - // - rn.Copy(*this); -} - -//_______________________________________________________________________ -AliHijingRndm::~AliHijingRndm() { - // - // Destructor - // - fgHijingRandom=0; -} - -//_______________________________________________________________________ -void AliHijingRndm::Copy(AliHijingRndm&) const -{ - // - // No copy is allowed - // - ::Fatal("Copy","Not implemented\n"); -} - //_______________________________________________________________________ void AliHijingRndm::SetHijingRandom(TRandom *ran) { // diff --git a/HIJING/AliHijingRndm.h b/HIJING/AliHijingRndm.h index a8d7b74b187..e76268f8a37 100644 --- a/HIJING/AliHijingRndm.h +++ b/HIJING/AliHijingRndm.h @@ -5,21 +5,35 @@ /* $Id$ */ -#include "TRandom.h" +#include +#include + +class TRandom; class AliHijingRndm { public: - AliHijingRndm(); - AliHijingRndm(const AliHijingRndm &rnd); - virtual ~AliHijingRndm(); - AliHijingRndm & operator=(const AliHijingRndm& rn) - {rn.Copy(*this); return (*this);} + AliHijingRndm() { + // Default constructor. The static data member is initialized + // in the implementation file + } + AliHijingRndm(const AliHijingRndm &/*rn*/) { + // Copy constructor: no copy allowed for the object + ::Fatal("Copy constructor","Not allowed\n"); + } + virtual ~AliHijingRndm() { + // Destructor + fgHijingRandom=0; + } + AliHijingRndm & operator=(const AliHijingRndm& /*rn*/) { + // Assignment operator: no assignment allowed + ::Fatal("Assignment operator","Not allowed\n"); + return (*this); + } static void SetHijingRandom(TRandom *ran=0); static TRandom * GetHijingRandom(); private: - void Copy(AliHijingRndm &rn) const; static TRandom * fgHijingRandom; //! pointer to the random number generator -- 2.43.0