]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add protection against null pointer to ITS RecPoint branch in VertexerZ; updated...
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Oct 2009 09:04:59 +0000 (09:04 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 8 Oct 2009 09:04:59 +0000 (09:04 +0000)
ITS/AliITSVertexer3D.cxx
ITS/AliITSVertexerZ.cxx

index a645099fa5b0d08b1f859b2a441d411464c47699..632e4f53b74b2e20d5ddfbe371a31c591b0e4e9a 100644 (file)
@@ -282,7 +282,7 @@ Int_t AliITSVertexer3D::FindTracklets(TTree *itsClusterTree, Int_t optCuts){
   TBranch *branch = NULL;
   branch = tR->GetBranch("ITSRecPoints");
   if(!branch){
-    AliError("Null pointer for RecPoints branch");
+    AliWarning("Null pointer for RecPoints branch, vertex not calculated");
     return -1;
   }
 
@@ -331,6 +331,7 @@ Int_t AliITSVertexer3D::FindTracklets(TTree *itsClusterTree, Int_t optCuts){
     fDetTypeRec->ResetRecPoints();
   }
   if(nrpL1 == 0 || nrpL2 == 0){
+    AliDebug(1,Form("No RecPoints in at least one SPD layer (%d %d)",nrpL1,nrpL2));
     return -1;
   }
   AliDebug(1,Form("RecPoints on Layer 1,2 = %d, %d\n",nrpL1,nrpL2));
index 68c6141ecccd6052704afe4e833fa01a7df30d37..e3550c3d024825d07361e5a3a6b97284db2bba1e 100644 (file)
@@ -205,6 +205,12 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
   itsRec = fDetTypeRec->RecPoints();
   TBranch *branch;
   branch = tR->GetBranch("ITSRecPoints");
+  if(!branch){
+    AliWarning("Null pointer for RecPoints branch, vertex not calculated");
+    ResetHistograms();
+    fCurrentVertex = new AliESDVertex(0.,5.3,-2);
+    return;
+  }
 
   Int_t nrpL1 = 0;
   Int_t nrpL2 = 0;
@@ -222,6 +228,7 @@ void AliITSVertexerZ::VertexZFinder(TTree *itsClusterTree){
     fDetTypeRec->ResetRecPoints();
   }
   if(nrpL1 == 0 || nrpL2 == 0){
+    AliDebug(1,Form("No RecPoints in at least one SPD layer (%d %d)",nrpL1,nrpL2));
     ResetHistograms();
     fCurrentVertex = new AliESDVertex(0.,5.3,-2);
     return;