X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=PMD%2FAliPMDRawStream.cxx;h=b3c893faf91ffe29d0e12791c8193fbd519c9c97;hb=806e573c6b730246565e3218cc6be0f19c4cd806;hp=ba3cca9475091d3211153830a1dcc853b1ee8688;hpb=a0a6a406730db480c9430b3f50b3af1feaa53679;p=u%2Fmrichter%2FAliRoot.git diff --git a/PMD/AliPMDRawStream.cxx b/PMD/AliPMDRawStream.cxx index ba3cca94750..b3c893faf91 100644 --- a/PMD/AliPMDRawStream.cxx +++ b/PMD/AliPMDRawStream.cxx @@ -96,7 +96,8 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) if (dataSize <= 0) return kFALSE; if (indexDDL != iddl) { - AliError("Mismatch in the DDL index"); + AliWarning("Mismatch in the DDL index"); + fRawReader->AddFatalErrorLog(kDDLIndexMismatch); return kFALSE; } @@ -139,8 +140,10 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) ifstream infile; infile.open(fileName.Data(), ios::in); // ascii file - if(!infile) + if(!infile) { AliError(Form("Could not read the mapping file for DDL No = %d",iddl)); + fRawReader->AddFatalErrorLog(kNoMappingFile,Form("ddl=%d",iddl)); + } Int_t modulePerDDL = 0; if (iddl < 4) @@ -160,7 +163,6 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) Int_t startRowBus[kNPatchBus], endRowBus[kNPatchBus]; Int_t startColBus[kNPatchBus], endColBus[kNPatchBus]; - for (Int_t ibus = 0; ibus < kNPatchBus; ibus++) { mcmperBus[ibus] = -1; @@ -170,7 +172,6 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) endColBus[ibus] = -1; } - for (Int_t im = 0; im < modulePerDDL; im++) { infile >> modno; @@ -189,11 +190,8 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) } } - - infile.close(); - AliPMDBlockHeader blockHeader; AliPMDDspHeader dspHeader; AliPMDPatchBusHeader pbusHeader; @@ -211,11 +209,10 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) Int_t dspHeaderWord[10]; Int_t pbusHeaderWord[4]; - Int_t ilowLimit = 0; - Int_t iuppLimit = 0; - + Int_t ilowLimit = 0; + Int_t iuppLimit = 0; Int_t blRawDataLength = 0; - Int_t iwordcount = 0; + Int_t iwordcount = 0; for (Int_t iblock = 0; iblock < 2; iblock++) @@ -223,7 +220,6 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) ilowLimit = iuppLimit; iuppLimit = ilowLimit + kblHLen; - for (Int_t i = ilowLimit; i < iuppLimit; i++) { blHeaderWord[i-ilowLimit] = (Int_t) buffer[i]; @@ -247,7 +243,6 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) for (Int_t ibus = 0; ibus < 5; ibus++) { - ilowLimit = iuppLimit; iuppLimit = ilowLimit + kpbusHLen; @@ -279,6 +274,7 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) if (ibit != parity) { AliWarning("ComputeParity:: Parity Error"); + fRawReader->AddMajorErrorLog(kParityError); } GetRowCol(iddl, pbusid, imcm, ich, startRowBus, endRowBus, @@ -316,7 +312,6 @@ Bool_t AliPMDRawStream::DdlData(Int_t indexDDL, TObjArray *pmdddlcont) if (iwordcount == blRawDataLength) break; } // end of BLOCK - delete [] buffer; @@ -371,36 +366,38 @@ void AliPMDRawStream::GetRowCol(Int_t ddlno, Int_t pbusid, { if (pbusid < 18) { - if(mcmno > 11) - { - row = startRowBus[pbusid] + irownew; - col = startColBus[pbusid] + (mcmno-12)*4 + icolnew; - } - else + if (mcmno <= 11) { // Add 16 to skip the 1st 15 rows row = startRowBus[pbusid] + irownew + 16; col = startColBus[pbusid] + (mcmno)*4 + icolnew; } + else if(mcmno > 11) + { + row = startRowBus[pbusid] + irownew; + col = startColBus[pbusid] + (mcmno-12)*4 + icolnew; + } } else if(pbusid > 17) { - if(mcmno > 11) - { - row = endRowBus[pbusid] - (15 - irownew) ; - col = endColBus[pbusid] - (mcmno - 12)*4 - (3 - icolnew); - } - else + if (mcmno <= 11) { + col = endColBus[pbusid] - mcmno*4 - (3 - icolnew); + if(endRowBus[pbusid] - startRowBus[pbusid] > 16) row = endRowBus[pbusid] - (15 - irownew) - 16 ; else row = endRowBus[pbusid] - (15 - irownew) ; - col = endColBus[pbusid] - mcmno*4 - (3 - icolnew); + + + } + else if(mcmno > 11) + { + row = endRowBus[pbusid] - (15 - irownew) ; + col = endColBus[pbusid] - (mcmno - 12)*4 - (3 - icolnew); } } } - else if (ddlno == 5) { if (pbusid <= 17)