From: shahoian Date: Thu, 17 Jun 2010 13:35:37 +0000 (+0000) Subject: Added protection against missing ESD pointer X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=6873ed4378f6d1eacec37d1d09abad213f2af6f3 Added protection against missing ESD pointer --- diff --git a/ITS/AliITSMultReconstructor.cxx b/ITS/AliITSMultReconstructor.cxx index 53e4338fd25..a7c7a2603e7 100644 --- a/ITS/AliITSMultReconstructor.cxx +++ b/ITS/AliITSMultReconstructor.cxx @@ -269,6 +269,8 @@ void AliITSMultReconstructor::Reconstruct(AliESDEvent* esd, TTree* treeRP) // After this method has been called, the clusters of the two layers // and the tracklets can be retrieved by calling the Get'er methods. + if (!treeRP) { AliError(" Invalid ITS cluster tree !\n"); return; } + if (!esd) {AliError("ESDEvent is not available, use old reconstructor"); return;} // reset counters if (fMult) delete fMult; fMult = 0; fNClustersLay1 = 0; @@ -276,8 +278,6 @@ void AliITSMultReconstructor::Reconstruct(AliESDEvent* esd, TTree* treeRP) fNTracklets = 0; fNSingleCluster = 0; // - if (!treeRP) { AliError(" Invalid ITS cluster tree !\n"); return; } - // fESDEvent = esd; fTreeRP = treeRP; // @@ -340,7 +340,7 @@ void AliITSMultReconstructor::FindTracklets(const Float_t *vtx) // LoadClusterArrays(fTreeRP); // flag clusters used by ESD tracks - ProcessESDTracks(); + if (fESDEvent) ProcessESDTracks(); if (!vtx) return; @@ -913,6 +913,7 @@ void AliITSMultReconstructor::ProcessESDTracks() // Flag the clusters used by ESD tracks // Flag primary tracks to be used for multiplicity counting // + if (!fESDEvent) return; AliESDVertex* vtx = (AliESDVertex*)fESDEvent->GetPrimaryVertexTracks(); if (!vtx) vtx = (AliESDVertex*)fESDEvent->GetPrimaryVertexSPD(); if (!vtx) { diff --git a/ITS/AliITSVertexer.cxx b/ITS/AliITSVertexer.cxx index 4c3ca507b94..ddcd63049c7 100644 --- a/ITS/AliITSVertexer.cxx +++ b/ITS/AliITSVertexer.cxx @@ -68,6 +68,7 @@ void AliITSVertexer::FindMultiplicity(TTree *itsClusterTree){ // Invokes AliITSMultReconstructor to determine the // charged multiplicity in the pixel layers if(fMult){delete fMult; fMult = 0;} + Bool_t success=kTRUE; Bool_t cosmics=kFALSE; if(!fCurrentVertex)success=kFALSE;