X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFRawStream.cxx;h=9109fce54aaa64fd56b64fa135d4287abfadf8d4;hb=52a564eeeed3ad431eba15a08cfc0a5f4594e891;hp=6b0ede669d23cb6cb27a43b86738718f05854988;hpb=a58bb7da67f48fb9c7ff2024b757640a26ee6844;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFRawStream.cxx b/TOF/AliTOFRawStream.cxx index 6b0ede669d2..9109fce54aa 100644 --- a/TOF/AliTOFRawStream.cxx +++ b/TOF/AliTOFRawStream.cxx @@ -125,6 +125,7 @@ Revision 0.01 2005/07/22 A. De Caro #include "AliRawEventHeaderBase.h" #include "AliRawDataHeader.h" +#include "AliRawDataHeaderV3.h" #include "AliTOFDecoderV2.h" #include "AliTOFTDCHit.h" @@ -504,7 +505,6 @@ AliTOFRawStream::~AliTOFRawStream() // destructor fPackedDigits = 0; - delete fDecoder; delete fDecoderV2; @@ -1437,7 +1437,8 @@ Bool_t AliTOFRawStream::Decode(Int_t verbose = 0) { Int_t currentEquipment; Int_t currentDDL; - const AliRawDataHeader *currentCDH; + const AliRawDataHeader *currentCDH = 0x0; + const AliRawDataHeaderV3 *currentCDHV3 = 0x0; //pointers UChar_t *data = 0x0; @@ -1457,6 +1458,7 @@ Bool_t AliTOFRawStream::Decode(Int_t verbose = 0) { } currentCDH = fRawReader->GetDataHeader(); + if (!currentCDH) currentCDHV3 = fRawReader->GetDataHeaderV3(); const Int_t kDataSize = fRawReader->GetDataSize(); const Int_t kDataWords = kDataSize / 4; data = new UChar_t[kDataSize]; @@ -1488,9 +1490,9 @@ Bool_t AliTOFRawStream::Decode(Int_t verbose = 0) { fDecoder->SetPackedDataBuffer(&fPackedDataBuffer[currentDDL]); //start decoding - if (fDecoder->Decode((UInt_t *)data, kDataWords, currentCDH) == kTRUE) { + if (fDecoder->Decode((UInt_t *)data, kDataWords, currentCDH, currentCDHV3) == kTRUE) { fRawReader->AddMajorErrorLog(kDDLDecoder,Form("DDL # = %d",currentDDL)); - AliWarning(Form("Error while decoding DDL # %d: decoder returned with errors", currentDDL)); + if (verbose) AliWarning(Form("Error while decoding DDL # %d: decoder returned with errors", currentDDL)); ResetDataBuffer(currentDDL); ResetPackedDataBuffer(currentDDL); } @@ -1559,7 +1561,7 @@ Bool_t AliTOFRawStream::DecodeV2(Int_t verbose = 0) { //start decoding if (fDecoderV2->Decode((UInt_t *)data, kDataWords) == kTRUE) { fRawReader->AddMajorErrorLog(kDDLDecoder,Form("DDL # = %d",currentDDL)); - AliWarning(Form("Error while decoding DDL # %d: decoder returned with errors", currentDDL)); + if (verbose) AliWarning(Form("Error while decoding DDL # %d: decoder returned with errors", currentDDL)); } delete [] data; @@ -1720,8 +1722,11 @@ AliTOFRawStream::LoadRawDataBuffersV2(Int_t indexDDL, Int_t verbose) /* read and check CDH info */ const AliRawDataHeader *currentCDH = fRawReader->GetDataHeader(); - Int_t currentMiniEventID = currentCDH->GetMiniEventID(); - Int_t currentEventID1 = currentCDH->GetEventID1(); + const AliRawDataHeaderV3 *currentCDHV3 = fRawReader->GetDataHeaderV3(); + Int_t currentMiniEventID = currentCDH ? currentCDH->GetMiniEventID(): -1; + currentMiniEventID = currentCDHV3 ? currentCDHV3->GetMiniEventID(): currentMiniEventID; + Int_t currentEventID1 = currentCDH? currentCDH->GetEventID1() : -1; + currentEventID1 = currentCDHV3? currentCDHV3->GetEventID1() : currentEventID1; /* read decoder summary data */ AliTOFDecoderSummaryData *decodersd; @@ -1738,12 +1743,12 @@ AliTOFRawStream::LoadRawDataBuffersV2(Int_t indexDDL, Int_t verbose) /* check error detected/recovered */ if (decodersd->GetErrorDetected()) { - AliWarning(Form("Error detected while decoding DDL %d (errorSlotID mask = %04x)", indexDDL, decodersd->GetErrorSlotID())); + AliDebug(2, Form("Error detected while decoding DDL %d (errorSlotID mask = %04x)", indexDDL, decodersd->GetErrorSlotID())); if (decodersd->GetRecoveringError()) { - AliWarning("Couldn't recover from error"); + AliDebug(2, "Couldn't recover from error"); } else { - AliWarning("Error recovered, anyway something is probably lost"); + AliDebug(2, "Error recovered, anyway something is probably lost"); } } /* check DRM header/trailer */ @@ -1754,10 +1759,10 @@ AliTOFRawStream::LoadRawDataBuffersV2(Int_t indexDDL, Int_t verbose) } /* check partecipating mask */ if (drmsd->GetPartecipatingSlotID() != drmsd->GetDecoderSlotEnableMask()) { - AliWarning(Form("DRM slot enable mask differs from decoder slot enable mask (%08x != %08x) in DDL %d", drmsd->GetSlotEnableMask(), drmsd->GetDecoderSlotEnableMask(), indexDDL)); + AliDebug(2, Form("DRM slot enable mask differs from decoder slot enable mask (%08x != %08x) in DDL %d", drmsd->GetSlotEnableMask(), drmsd->GetDecoderSlotEnableMask(), indexDDL)); for (Int_t ibit = 0; ibit < 11; ibit++) if ((drmsd->GetPartecipatingSlotID() & (0x1 << ibit)) && !(drmsd->GetDecoderSlotEnableMask() & (0x1 << ibit))) - AliWarning(Form("readout slot %d data is missing in decoder", ibit + 2)); + AliDebug(2, Form("readout slot %d data is missing in decoder", ibit + 2)); } /* get DRM data */