X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALDigitizer.cxx;h=8a6bc3193061224abeda5c1e6dd308504c9b2fbf;hb=cdffeaea701fbd9e9680151faeb669ee0f89bd6a;hp=e3fcfc70c9fee598aaabf34c621b526f402a59f8;hpb=61d80ce0d4dbde6e8a48d3c76bd7f818b351a9ed;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALDigitizer.cxx b/EMCAL/AliEMCALDigitizer.cxx index e3fcfc70c9f..8a6bc319306 100644 --- a/EMCAL/AliEMCALDigitizer.cxx +++ b/EMCAL/AliEMCALDigitizer.cxx @@ -342,11 +342,12 @@ void AliEMCALDigitizer::Digitize(Int_t event) if(emcalLoader2->SDigits()){ TClonesArray* sdigits2 = emcalLoader2->SDigits(); sdigArray->AddAt(sdigits2, i) ; - //Check if first sdigit is of embedded type, if so, handle the sdigits differently: + // Check if first sdigit is of embedded type, if so, handle the sdigits differently: // do not smear energy of embedded, do not add noise to any sdigits if(sdigits2->GetEntriesFast()>0){ //printf("Merged digit type: %d\n",dynamic_cast (sdigits2->At(0))->GetType()); - if(dynamic_cast (sdigits2->At(0))->GetType()==AliEMCALDigit::kEmbedded){ + AliEMCALDigit * digit2 = dynamic_cast (sdigits2->At(0)); + if(digit2 && digit2->GetType()==AliEMCALDigit::kEmbedded){ embed = kTRUE; } }