]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
o fix loading of map
authorwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Oct 2013 01:09:08 +0000 (01:09 +0000)
committerwiechula <wiechula@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Oct 2013 01:09:08 +0000 (01:09 +0000)
TPC/Upgrade/AliToyMCReconstruction.cxx

index e73c1093ddc58ef4364a89ee3370de602b9096c5..34abc2b67d3d3092ce0b99f1e34a942a7d335c1a 100644 (file)
@@ -1769,14 +1769,15 @@ void AliToyMCReconstruction::InitSpaceCharge()
   // Init the space charge map
   //
 
-  TString filename="$ALICE_ROOT/TPC/Calib/maps/SC_NeCO2_eps5_50kHz_precal.root";
+//   TString filename="$ALICE_ROOT/TPC/Calib/maps/SC_NeCO2_eps5_50kHz_precal.root";
+  TString filename;
   if (fTree) {
     TList *l=fTree->GetUserInfo();
     for (Int_t i=0; i<l->GetEntries(); ++i) {
       TObject *o=l->At(i);
       if (o->IsA() == TObjString::Class()){
         TString s(o->GetName());
-        if (s.Contains("SC_")) {
+        if (s.Contains("lookup.root")) {
           filename=s;
           break;
         }
@@ -1784,7 +1785,12 @@ void AliToyMCReconstruction::InitSpaceCharge()
     }
   }
 
-  printf("Initialising the space charge map using the file: '%s'\n",filename.Data());
+  if (filename.IsNull()) {
+    AliFatal("No SC map provided in the Userinfo of the simulation tree");
+    return;
+  }
+  
+  AliInfo(Form("Initialising the space charge map using the file: '%s'\n",filename.Data()));
   TFile f(filename.Data());
   fTPCCorrection=(AliTPCCorrection*)f.Get("map");