865 |
// |
// |
866 |
// Write the correct length |
// Write the correct length |
867 |
// |
// |
868 |
fDataCALO[fSecPointer+1] = fCALOlength-fSecPointer+1 ; |
fDataCALO[fSecPointer+1] = (fCALOlength-fSecPointer+1)-2 ; |
869 |
|
// total length of the packet: -2: because the words with status and length are not included |
870 |
fDataCALO[fNofTStripsPointer] = NofTransmittedStrips ; |
fDataCALO[fNofTStripsPointer] = NofTransmittedStrips ; |
871 |
// |
// |
872 |
// here we calculate and save the CRC |
// here we calculate and save the CRC |
873 |
// |
// |
874 |
Short_t CRC = 0; |
Short_t CRC = 0; |
875 |
|
fDataCALO[fCALOlength] =0 ; |
876 |
for (UInt_t i=0; i<(fCALOlength-fSecPointer); i++){ |
for (UInt_t i=0; i<(fCALOlength-fSecPointer); i++){ |
877 |
CRC=crc(CRC,fDataCALO[i+fSecPointer]); |
CRC=crc(CRC,fDataCALO[i+fSecPointer]); |
878 |
}; |
}; |