]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Corrected storage/retrieval of fRandom
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 May 2003 10:23:06 +0000 (10:23 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 May 2003 10:23:06 +0000 (10:23 +0000)
STEER/AliRndm.cxx

index 8dc9dbd551d05369d94620fc80329cbd5552a6f9..5be1bb3d886f4207ec5abbc2f46a12ee1e1dc91f 100644 (file)
@@ -78,13 +78,13 @@ void AliRndm::ReadRandom(const char *filename)
   // Reads saved random generator status from filename
   //
   char *fntmp = gSystem->ExpandPathName(filename);
-  TFile *file = new TFile(fntmp,"r");
+  TFile *file = new TFile(fntmp,"read");
   delete [] fntmp;
   if(!file) {
     printf("AliRndm:: Could not open file %s\n",filename);
   } else {
     if(!fRandom) fRandom = new TRandom();
-    fRandom->Read("Random");
+    fRandom->Read(fRandom->GetName());
     file->Close();
     delete file;
   }
@@ -97,7 +97,7 @@ void AliRndm::WriteRandom(const char *filename) const
   // Writes random generator status to filename
   //
   char *fntmp = gSystem->ExpandPathName(filename);
-  TFile *file = new TFile(fntmp,"new");
+  TFile *file = new TFile(fntmp,"update");
   delete [] fntmp;
   if(!file) {
     printf("AliRndm:: Could not open file %s\n",filename);