From: nilsen Date: Wed, 25 Feb 2004 21:44:51 +0000 (+0000) Subject: Protection involving the existance of gMC added. Usefull when the ITS is used X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=0e73d04c16c81d9b1a8bb89fdcabbc73dc100977;p=u%2Fmrichter%2FAliRoot.git Protection involving the existance of gMC added. Usefull when the ITS is used without a Monte Carlo. --- 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(){