Fix for PROOF reco: Correct restoration of the magnetic field map on the workers.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Oct 2009 01:19:57 +0000 (01:19 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Oct 2009 01:19:57 +0000 (01:19 +0000)
STEER/AliReconstruction.cxx

index 167c733..e657bcd 100644 (file)
@@ -1367,6 +1367,7 @@ void AliReconstruction::SlaveBegin(TTree*)
   TProofOutputFile *outProofFile = NULL;
   if (fInput) {
     if (AliDebugLevel() > 0) fInput->Print();
+    if (AliDebugLevel() > 10) fInput->Dump();
     if (AliReconstruction *reco = (AliReconstruction*)fInput->FindObject("AliReconstruction")) {
       *this = *reco;
     }
@@ -1384,7 +1385,13 @@ void AliReconstruction::SlaveBegin(TTree*)
       }
     }
     if (AliMagF *map = (AliMagF*)fInput->FindObject("MagneticFieldMap")) {
-      TGeoGlobalMagField::Instance()->SetField(map);
+      AliMagF *newMap = new AliMagF(*map);
+      if (!newMap->LoadParameterization()) {
+       Abort("AliMagF::LoadParameterization", TSelector::kAbortProcess);
+       return;
+      }
+      TGeoGlobalMagField::Instance()->SetField(newMap);
+      TGeoGlobalMagField::Instance()->Lock();
     }
     if (TNamed *outputFileName = (TNamed*)fInput->FindObject("PROOF_OUTPUTFILE"))
       fProofOutputFileName = outputFileName->GetTitle();