// destructor
fPackedDigits = 0;
-
delete fDecoder;
delete fDecoderV2;
- fTOFrawData->Clear();
- delete fTOFrawData;
+ if (fTOFrawData) {
+ fTOFrawData->Clear("C");
+ delete fTOFrawData;
+ }
//delete fCableLengthMap;
}
fDDL = fRawReader->GetDDLID();
+ if (fDDL==-1) {
+ fRawReader->AddMajorErrorLog(kDDLdataReading);
+ AliWarning("Error when load DDL. Go to next DDL");
+ return kFALSE;
+ }
fWordType = GetField(data,WORD_TYPE_MASK,WORD_TYPE_POSITION);
//loop and read DDL headers
while(fRawReader->ReadHeader()){
- //memory leak prevention (actually data should be always 0x0 here)
- if (data != 0x0)
- delete [] data;
-
//get equipment infos
currentEquipment = fRawReader->GetEquipmentId();
//start decoding
if (fDecoder->Decode((UInt_t *)data, kDataWords, currentCDH) == 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);
}
//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;
/* 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 */
}
/* 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 */
/* skip if bad TRM event counter detected */
if (trmsd->GetEventCounter() != drmsd->GetLocalEventCounter()) continue;
/* skip if bad TRM CRC detected */
+ AliDebug(2,Form("~~~~~~ %02d %02d --- TRM CRC: as written in raw data =%d and as computed =%d ~~~~~~",indexDDL,itrm,trmsd->GetEventCRC(), trmsd->GetDecoderCRC()));
if (trmsd->GetEventCRC() != trmsd->GetDecoderCRC()) continue;
/* loop over chains */