--- PamelaDigitizer/DigitizeCalo.cxx 2009/10/16 09:15:49 1.3 +++ PamelaDigitizer/DigitizeCalo.cxx 2009/11/13 09:08:53 1.4 @@ -865,12 +865,14 @@ // // Write the correct length // - fDataCALO[fSecPointer+1] = fCALOlength-fSecPointer+1 ; + fDataCALO[fSecPointer+1] = (fCALOlength-fSecPointer+1)-2 ; + // total length of the packet: -2: because the words with status and length are not included fDataCALO[fNofTStripsPointer] = NofTransmittedStrips ; // // here we calculate and save the CRC // Short_t CRC = 0; + fDataCALO[fCALOlength] =0 ; for (UInt_t i=0; i<(fCALOlength-fSecPointer); i++){ CRC=crc(CRC,fDataCALO[i+fSecPointer]); };