X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=PHOS%2FAliPHOSTriggerRawReader.cxx;h=87de2a956ea82f1f9df6dc22c7d928ba2f791818;hp=b367ab29444dcd3278f1f4f2fad73ab685715cb0;hb=aab25bc622b1ba4726c73c071620ea9800fb6fcd;hpb=334ed7c060940bec881eb35ebcc1f9b5e381975f diff --git a/PHOS/AliPHOSTriggerRawReader.cxx b/PHOS/AliPHOSTriggerRawReader.cxx index b367ab29444..87de2a956ea 100644 --- a/PHOS/AliPHOSTriggerRawReader.cxx +++ b/PHOS/AliPHOSTriggerRawReader.cxx @@ -61,6 +61,10 @@ AliPHOSTRURawReader* AliPHOSTriggerRawReader::GetTRU(Int_t mod, Int_t truRow, In { // Get TRU Raw Reader. + if (mod<0 || mod>=kNMods) return 0x0; + if (truRow<0 || truRow>=kNTRURows) return 0x0; + if (branch<0 || branch>=kNBranches) return 0x0; + if( ! fTRUs[mod][truRow][branch] ) fTRUs[mod][truRow][branch] = new AliPHOSTRURawReader(); return fTRUs[mod][truRow][branch]; @@ -93,7 +97,8 @@ void AliPHOSTriggerRawReader::ReadFromStream(AliCaloRawStreamV3* rawStream) Int_t rcuRow = rawStream->GetRow(); Int_t branch = 1 - rawStream->GetBranch(); // !!! Found this to be necessary, -Henrik Qvigstad - GetTRU(module, rcuRow, branch)->ReadFromStream(rawStream); + AliPHOSTRURawReader* reader = GetTRU(module, rcuRow, branch); + if (reader) reader->ReadFromStream(rawStream); } // end while }