}
//_____________________________________________________________________________
-void AliAltroBuffer::WriteDataHeader(Bool_t dummy, Bool_t compressed)
+void AliAltroBuffer::WriteDataHeader(Bool_t dummy, Bool_t /*compressed*/)
{
//Write a (dummy or real) DDL data header,
-//set the compression bit if compressed
+//set the attributes according to the RCU version
AliRawDataHeaderSim header;
if (dummy) {
fDataHeaderPos = fFile->Tellp();
fFile->WriteBuffer((char*)(&header), sizeof(header));
} else {
- WriteRCUTrailer(0);
+ UChar_t rcuVer = WriteRCUTrailer(0);
UInt_t currentFilePos = fFile->Tellp();
fFile->Seekp(fDataHeaderPos);
header.fSize = 0xFFFFFFFF; // RCU can't write raw-data size so we always get an 'invalid' size field
- // header.fSize = currentFilePos-fDataHeaderPos;
- header.SetAttribute(0); // valid data
- if (compressed) header.SetAttribute(1);
+ header.fAttributesSubDetectors |= (rcuVer << 24);
fFile->WriteBuffer((char*)(&header), sizeof(header));
fFile->Seekp(currentFilePos);
}
}
//_____________________________________________________________________________
-void AliAltroBuffer::WriteRCUTrailer(Int_t rcuId)
+UChar_t AliAltroBuffer::WriteRCUTrailer(Int_t rcuId)
{
// Writes the RCU trailer
// rcuId the is serial number of the corresponding
if ((size % 5) != 0) {
AliFatal(Form("The current raw data payload is not a mutiple of 5 (%d) ! Can not write the RCU trailer !",size));
- return;
+ return 0;
}
// Now put the size in unit of number of 40bit words
// FOr the moment the triler size is 2 32-bit words
UInt_t buffer = (2 & 0x7F);
buffer |= ((rcuId & 0x1FF) << 7);
- buffer |= 0xAAAA << 16;
+ buffer |= 0xAAAAU << 16;
fFile->WriteBuffer((char *)(&buffer),sizeof(UInt_t));
+ return 0;
}