From 93dca16dbbd5751877d79483e52b9027c155b92f Mon Sep 17 00:00:00 2001 From: cvetan Date: Fri, 19 May 2006 08:34:49 +0000 Subject: [PATCH] Old Altro and TPC raw stream modified in a way that they work with the TPC cosmic data --- RAW/AliAltroRawStreamOld.cxx | 14 +++++++------- TPC/AliTPCRawStreamOld.cxx | 24 +++++++++++++++++++++++- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/RAW/AliAltroRawStreamOld.cxx b/RAW/AliAltroRawStreamOld.cxx index 47a416c8756..6a6b9040fff 100644 --- a/RAW/AliAltroRawStreamOld.cxx +++ b/RAW/AliAltroRawStreamOld.cxx @@ -274,23 +274,23 @@ Int_t AliAltroRawStreamOld::GetPosition() // Get the payload size from the RCU trailer // The trailer is actually one 32-bit word - Int_t position = (fData[fRawReader->GetDataSize()-1]) << 24; - position |= (fData[fRawReader->GetDataSize()-2]) << 16; - position |= (fData[fRawReader->GetDataSize()-3]) << 8; - position |= (fData[fRawReader->GetDataSize()-4]); + Int_t position = (fData[fRawReader->GetDataSize()-29]) << 24; + position |= (fData[fRawReader->GetDataSize()-30]) << 16; + position |= (fData[fRawReader->GetDataSize()-31]) << 8; + position |= (fData[fRawReader->GetDataSize()-32]); // The size is specified in a number of 40bits // Therefore we need to transform it to number of bytes position *= 5; // Check the consistency of the header and trailer - if ((fRawReader->GetDataSize() - 32) != position) + if ((fRawReader->GetDataSize() - 64) != position) AliFatal(Form("Inconsistent raw data size ! Expected %d bytes (from the header), found %d words (in the RCU trailer)!", - fRawReader->GetDataSize()-32, + fRawReader->GetDataSize()-64, position)); // Skip the Common Data Header which contains // only 7 (!) words - fData += 28; + fData += 32; // Return the position in units of 10-bit words return position*8/10; diff --git a/TPC/AliTPCRawStreamOld.cxx b/TPC/AliTPCRawStreamOld.cxx index a82276d4010..72b8bc794de 100644 --- a/TPC/AliTPCRawStreamOld.cxx +++ b/TPC/AliTPCRawStreamOld.cxx @@ -126,7 +126,29 @@ void AliTPCRawStreamOld::ApplyAltroMapping() // Take the DDL index, load // the corresponding altro mapping // object and fill the sector,row and pad indeces - Int_t ddlNumber = GetDDLNumber()-228; + Int_t ddlNumber = GetDDLNumber(); + switch (ddlNumber) { + case 152: + ddlNumber = 74; + break; + case 153: + ddlNumber = 75; + break; + case 253: + ddlNumber = 0; + break; + case 0: + ddlNumber = 73; + break; + case 1: + ddlNumber = 1; + break; + case 5: + ddlNumber = 72; + break; + default: + break; + } Int_t patchIndex; if (ddlNumber < 72) { fSector = ddlNumber / 2; -- 2.31.1