From 0e73d04c16c81d9b1a8bb89fdcabbc73dc100977 Mon Sep 17 00:00:00 2001 From: nilsen Date: Wed, 25 Feb 2004 21:44:51 +0000 Subject: [PATCH] Protection involving the existance of gMC added. Usefull when the ITS is used without a Monte Carlo. --- ITS/AliITS.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ITS/AliITS.cxx b/ITS/AliITS.cxx index 19b0a77616e..001322c2556 100644 --- a/ITS/AliITS.cxx +++ b/ITS/AliITS.cxx @@ -194,7 +194,7 @@ AliITS::AliITS(const char *name, const char *title):AliDetector(name,title){ fIshunt = 0; // not zeroed in AliDetector fHits = new TClonesArray("AliITShit", 1560);//not done in AliDetector - gAlice->GetMCApp()->AddHitList(fHits); // Not done in AliDetector. + if(gAlice->GetMCApp()) gAlice->GetMCApp()->AddHitList(fHits);// Not done in AliDetector. fEuclidOut = 0; fITSgeom = 0; @@ -360,7 +360,7 @@ void AliITS::Init(){ SetDefaults(); // Array of TStrings - for(i=0;iVolId(fIdName[i]); + if(gMC) for(i=0;iVolId(fIdName[i]); } //______________________________________________________________________ void AliITS::SetDefaults(){ -- 2.39.3