From bd1cece157478a450f54af710965c84006444188 Mon Sep 17 00:00:00 2001 From: morsch Date: Fri, 30 Jun 2000 12:19:07 +0000 Subject: [PATCH] Type of fFileName changed to TString, fp has been !-ed. --- EVGEN/AliGenHalo.cxx | 11 +++++++---- EVGEN/AliGenHalo.h | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/EVGEN/AliGenHalo.cxx b/EVGEN/AliGenHalo.cxx index 44eba2023aa..9960ced03bc 100644 --- a/EVGEN/AliGenHalo.cxx +++ b/EVGEN/AliGenHalo.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.6 2000/06/09 20:36:01 morsch +All coding rule violations except RS3 corrected + Revision 1.5 1999/11/03 17:43:20 fca New version from G.Martinez & A.Morsch @@ -38,7 +41,7 @@ Introduction of the Copyright and cvs Log fName="Halo"; fTitle="Halo from LHC Tunnel"; // Set the default file - fFileName="~/marsip/marsip5.mu"; + fFileName=TString("~/marsip/marsip5.mu"); // // Read all particles fNpart=-1; @@ -52,7 +55,7 @@ AliGenHalo::AliGenHalo(Int_t npart) fName="Halo"; fTitle="Halo from LHC Tunnel"; // Set the default file - fFileName="~/marsip/marsip5.mu"; + fFileName=TString("~/marsip/marsip5.mu"); // // Read all particles fNpart=-1; @@ -83,9 +86,9 @@ void AliGenHalo::Generate() // Generate from input file FILE *fp = fopen(fFileName,"r"); if (fp) { - printf("\n File %s opened for reading ! \n ", fFileName); + printf("\n File %s opened for reading ! \n ", (char*) &fFileName); } else { - printf("\n Opening of file %s failed ! \n ", fFileName); + printf("\n Opening of file %s failed ! \n ", (char*) &fFileName); } // // MARS particle codes diff --git a/EVGEN/AliGenHalo.h b/EVGEN/AliGenHalo.h index abd376fceed..1811dfdb2b0 100644 --- a/EVGEN/AliGenHalo.h +++ b/EVGEN/AliGenHalo.h @@ -7,7 +7,7 @@ #include "AliGenerator.h" - +#include // Read background particles from a FLUKA boundary source file class AliGenHalo : public AliGenerator @@ -18,12 +18,12 @@ public: AliGenHalo(const AliGenHalo &Halo); virtual ~AliGenHalo(); virtual void Init(); - virtual void SetFileName(const Text_t *filname) {fFileName=filname;} + virtual void SetFileName(TString filename) {fFileName=TString(filename);} virtual void Generate(); AliGenHalo & operator=(const AliGenHalo & rhs); protected: - FILE *fp; // Pointer to file - const Text_t *fFileName; // ! Choose the file + FILE *fp; // ! Pointer to file + TString fFileName; // Choose the file ClassDef(AliGenHalo,1) // LHC background boundary source (MARS input) }; #endif -- 2.39.3