X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RAW%2FAliAltroBuffer.cxx;h=e3af905783ac17079e86271a6174a787b3994f80;hb=45441b784678b0f756708bdd1c07264f823c11e4;hp=560c27935f971c7d599a1ca02e934690cf811a57;hpb=94b2b783a6066d5b9029a67b6d138af967582d28;p=u%2Fmrichter%2FAliRoot.git diff --git a/RAW/AliAltroBuffer.cxx b/RAW/AliAltroBuffer.cxx index 560c27935f9..e3af905783a 100644 --- a/RAW/AliAltroBuffer.cxx +++ b/RAW/AliAltroBuffer.cxx @@ -232,10 +232,10 @@ Int_t AliAltroBuffer::WriteBunch(Int_t nTimeBins, const Int_t* adcValues, } //_____________________________________________________________________________ -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) { @@ -243,20 +243,18 @@ void AliAltroBuffer::WriteDataHeader(Bool_t dummy, Bool_t compressed) 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 @@ -271,7 +269,7 @@ void AliAltroBuffer::WriteRCUTrailer(Int_t rcuId) 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 @@ -292,4 +290,5 @@ void AliAltroBuffer::WriteRCUTrailer(Int_t rcuId) buffer |= 0xAAAA << 16; fFile->WriteBuffer((char *)(&buffer),sizeof(UInt_t)); + return 0; }