+ // Check the consistency of the header and trailer
+ if ((fRawReader->GetDataSize() - 4) != position) {
+ PrintDebug();
+ AliFatal(Form("Inconsistent raw data size ! Expected %d bytes (from the header), found %d bytes (in the RCU trailer)!",
+ fRawReader->GetDataSize()-4,
+ position));
+ }
+ }
+ else {
+ // Check the consistency of the header and trailer
+ // In this case the header is shorter by 4 bytes
+ if (fRawReader->GetDataSize() != position) {
+ PrintDebug();
+ AliFatal(Form("Inconsistent raw data size ! Expected %d bytes (from the header), found %d bytes (in the RCU trailer)!",
+ fRawReader->GetDataSize(),
+ position));
+ }
+
+ // 7 32-bit words Common Data Header
+ // therefore we have to shift back by 4 bytes
+ // the pointer to the raw data payload
+ fData -= 4;
+ }
+