]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliSimulation.cxx
Fixing a memory leak.
[u/mrichter/AliRoot.git] / STEER / AliSimulation.cxx
index 0230d59f46e24019dfacfc8da940b49746e9af01..1acfcd94b5efa6838a34e5a861d082a9fcb0caad 100644 (file)
@@ -272,9 +272,9 @@ void AliSimulation::InitCDBStorage()
     fCDBUri = "";
   }
   else {
-    AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
-    AliWarning(Form("Default CDB storage is set to: %s",fCDBUri.Data()));
-    AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+    AliDebug(2,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+    AliDebug(2, Form("Default CDB storage is set to: %s",fCDBUri.Data()));
+    AliDebug(2, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
     man->SetDefaultStorage(fCDBUri);
   }
 
@@ -282,9 +282,9 @@ void AliSimulation::InitCDBStorage()
   for (Int_t i = 0; i < fSpecCDBUri.GetEntriesFast(); i++) {
     TObject* obj = fSpecCDBUri[i];
     if (!obj) continue;
-    AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
-    AliWarning(Form("Specific CDB storage for %s is set to: %s",obj->GetName(),obj->GetTitle()));
-    AliWarning("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+    AliDebug(2, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+    AliDebug(2, Form("Specific CDB storage for %s is set to: %s",obj->GetName(),obj->GetTitle()));
+    AliDebug(2, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
     man->SetSpecificStorage(obj->GetName(), obj->GetTitle());
   }
   man->Print();
@@ -372,7 +372,7 @@ Bool_t AliSimulation::ApplyAlignObjsToGeom(TObjArray* alObjArray)
     }
 
   if (AliDebugLevelClass() >= 1) {
-    gGeoManager->GetTopNode()->CheckOverlaps(20);
+    gGeoManager->GetTopNode()->CheckOverlaps(1);
     TObjArray* ovexlist = gGeoManager->GetListOfOverlaps();
     if(ovexlist->GetEntriesFast()){  
       AliError("The application of alignment objects to the geometry caused huge overlaps/extrusions!");
@@ -528,7 +528,7 @@ Bool_t AliSimulation::MisalignGeometry(AliRunLoader *runLoader)
        TObjArray* detArray = runLoader->GetAliRun()->Detectors();
        for (Int_t iDet = 0; iDet < detArray->GetEntriesFast(); iDet++) {
                AliModule* det = (AliModule*) detArray->At(iDet);
-               if (!det) continue;
+               if (!det || !det->IsActive()) continue;
                if (IsSelected(det->GetName(), detStr)) {
                        if(!SetAlignObjArraySingleDet(det->GetName())){
                                dataNotLoaded += det->GetName();
@@ -542,9 +542,9 @@ Bool_t AliSimulation::MisalignGeometry(AliRunLoader *runLoader)
   
        if ((detStr.CompareTo("ALL") == 0)) detStr = "";
        dataNotLoaded += detStr;
-       AliInfo(Form("Alignment data loaded for: %s",
+       if(!dataLoaded.IsNull()) AliInfo(Form("Alignment data loaded for: %s",
                          dataLoaded.Data()));
-       AliInfo(Form("Didn't/couldn't load alignment data for: %s",
+       if(!dataNotLoaded.IsNull()) AliInfo(Form("Didn't/couldn't load alignment data for: %s",
                          dataNotLoaded.Data()));
   } // fLoadAlignFromCDB flag