]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
protection against missing header
authortkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 May 2004 14:09:48 +0000 (14:09 +0000)
committertkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 7 May 2004 14:09:48 +0000 (14:09 +0000)
STEER/AliReconstruction.cxx

index 7867d3384fb464f1bfaec225b4f85126a7a04a41..7d45f9a7f0ad40ce2d36877538977200fbb6a58a 100644 (file)
@@ -373,8 +373,10 @@ Bool_t AliReconstruction::RunVertexFinder(AliESD*& esd)
   Double_t vtxPos[3] = {0, 0, 0};
   Double_t vtxErr[3] = {0.07, 0.07, 0.1};
   TArrayF mcVertex(3); 
-  fRunLoader->GetHeader()->GenEventHeader()->PrimaryVertex(mcVertex);
-  for (Int_t i = 0; i < 3; i++) vtxPos[i] = mcVertex[i];
+  if (fRunLoader->GetHeader() && fRunLoader->GetHeader()->GenEventHeader()) {
+    fRunLoader->GetHeader()->GenEventHeader()->PrimaryVertex(mcVertex);
+    for (Int_t i = 0; i < 3; i++) vtxPos[i] = mcVertex[i];
+  }
 
   if (fITSVertexer) {
     Info("RunVertexFinder", "running the ITS vertex finder");