]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliRun.cxx
correct for omission
[u/mrichter/AliRoot.git] / STEER / AliRun.cxx
index bd38e1ac27fd1faadb33c22aea8838033d78a3f1..58407ebe5942c504508637e317631c19a7180a47 100644 (file)
@@ -71,7 +71,6 @@ AliRun::AliRun():
   fMCApp(0),
   fNdets(0),
   fConfigFunction(""),
-  fRandom(0),
   fBaseFileName(""),
   fRunLoader(0x0)
 {
@@ -91,7 +90,6 @@ AliRun::AliRun(const char *name, const char *title):
   fMCApp(new AliMC(GetName(),GetTitle())),
   fNdets(0),
   fConfigFunction("Config();"),
-  fRandom(new TRandom3()),
   fBaseFileName(""),
   fRunLoader(0x0)
 {
@@ -105,7 +103,7 @@ AliRun::AliRun(const char *name, const char *title):
   gAlice     = this;
 
   // Set random number generator
-  gRandom = fRandom;
+  gRandom = new TRandom3();
 
   if (gSystem->Getenv("CONFIG_SEED")) {
      gRandom->SetSeed(static_cast<UInt_t>(atoi(gSystem->Getenv("CONFIG_SEED"))));
@@ -128,6 +126,7 @@ AliRun::~AliRun()
    {
     TFolder* evfold = fRunLoader->GetEventFolder();
     TFolder* modfold = dynamic_cast<TFolder*>(evfold->FindObjectAny(AliConfig::GetModulesFolderName()));
+    if(!modfold) AliFatal(Form("Folder %s not found\n",AliConfig::GetModulesFolderName().Data()));
     TIter next(fModules);
     AliModule *mod;
     while((mod = (AliModule*)next()))
@@ -361,8 +360,7 @@ void AliRun::Streamer(TBuffer &R__b)
     if (!gAlice) gAlice = this;
     AliRun::Class()->ReadBuffer(R__b, this);
     gROOT->GetListOfBrowsables()->Add(this,"Run");
-
-    gRandom = fRandom;
+    gRandom = new TRandom3();
   } else {
     AliRun::Class()->WriteBuffer(R__b, this);
   }
@@ -400,7 +398,7 @@ void AliRun::SetRunLoader(AliRunLoader* rloader)
   TString evfoldname;
   TFolder* evfold = fRunLoader->GetEventFolder();
   if (evfold) evfoldname = evfold->GetName();
-  else AliWarning("Did not get Event Folder from Run Loader");
+  else AliFatal("Did not get Event Folder from Run Loader");
   
   if ( fRunLoader->GetAliRun() )
    {//if alrun already exists in folder