]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliRndm.cxx
Transition to NewIO
[u/mrichter/AliRoot.git] / STEER / AliRndm.cxx
index 5be1bb3d886f4207ec5abbc2f46a12ee1e1dc91f..facdc8ee62d9e753e0ba3b731a5477419fe1d4b3 100644 (file)
@@ -17,7 +17,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
-//   Wrapper for the root random number generator                            //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -78,13 +77,13 @@ void AliRndm::ReadRandom(const char *filename)
   // Reads saved random generator status from filename
   //
   char *fntmp = gSystem->ExpandPathName(filename);
-  TFile *file = new TFile(fntmp,"read");
+  TFile *file = new TFile(fntmp,"r");
   delete [] fntmp;
   if(!file) {
     printf("AliRndm:: Could not open file %s\n",filename);
   } else {
     if(!fRandom) fRandom = new TRandom();
-    fRandom->Read(fRandom->GetName());
+    fRandom->Read("Random");
     file->Close();
     delete file;
   }
@@ -97,7 +96,7 @@ void AliRndm::WriteRandom(const char *filename) const
   // Writes random generator status to filename
   //
   char *fntmp = gSystem->ExpandPathName(filename);
-  TFile *file = new TFile(fntmp,"update");
+  TFile *file = new TFile(fntmp,"new");
   delete [] fntmp;
   if(!file) {
     printf("AliRndm:: Could not open file %s\n",filename);