// initialized
if (fEquipmentIdsIn) delete fEquipmentIdsIn;
if (fEquipmentIdsOut) delete fEquipmentIdsOut;
+ fErrorLogs.Delete();
}
Int_t AliRawReader::GetMappedEquipmentId() const
return;
}
- new (fErrorLogs[fErrorLogs.GetEntriesFast()])
- AliRawDataErrorLog(fEventNumber,
- ddlId,
- level,
- code,
- message);
+ Int_t prevEventNumber = -1;
+ Int_t prevDdlId = -1;
+ Int_t prevErrorCode = -1;
+ AliRawDataErrorLog *prevLog = (AliRawDataErrorLog *)fErrorLogs.Last();
+ if (prevLog) {
+ prevEventNumber = prevLog->GetEventNumber();
+ prevDdlId = prevLog->GetDdlID();
+ prevErrorCode = prevLog->GetErrorCode();
+ }
+
+ if ((prevEventNumber != fEventNumber) ||
+ (prevDdlId != ddlId) ||
+ (prevErrorCode != code)) {
+ new (fErrorLogs[fErrorLogs.GetEntriesFast()])
+ AliRawDataErrorLog(fEventNumber,
+ ddlId,
+ level,
+ code,
+ message);
+ }
+ else
+ if (prevLog) prevLog->AddCount();
+
}
return AddErrorLog(AliRawDataErrorLog::kFatal,code,message);
}
Int_t GetNumberOfErrorLogs() const { return fErrorLogs.GetEntriesFast(); }
+ const TClonesArray &GetAllErrorLogs() const { return fErrorLogs; }
AliRawDataErrorLog *GetErrorLog(Int_t i) const {
return (AliRawDataErrorLog *)fErrorLogs.UncheckedAt(i);
}
fEventNumber(-1),
fDdlID(-1),
fErrorLevel(AliRawDataErrorLog::kMinor),
- fErrorCode(0)
+ fErrorCode(0),
+ fCount(0)
{
// Default constructor
}
fEventNumber(eventNumber),
fDdlID(ddlId),
fErrorLevel(errorLevel),
- fErrorCode(errorCode)
+ fErrorCode(errorCode),
+ fCount(1)
{
// Constructor that specifies
// the event number, ddl id, error type and
fEventNumber(source.fEventNumber),
fDdlID(source.fDdlID),
fErrorLevel(source.fErrorLevel),
- fErrorCode(source.fErrorCode)
+ fErrorCode(source.fErrorCode),
+ fCount(source.fCount)
{
// Copy constructor
}
fDdlID = source.GetDdlID();
fErrorLevel = source.GetErrorLevel();
fErrorCode = source.GetErrorCode();
+ fCount = source.GetCount();
}
return *this;
}
ERawDataErrorLevel GetErrorLevel() const { return fErrorLevel; }
Int_t GetErrorCode() const { return fErrorCode; }
const char * GetMessage() const { return fName.Data(); }
+ Int_t GetCount() const { return fCount; }
Bool_t IsSortable() const {return kTRUE;}
Int_t Compare(const TObject* obj) const;
+ void AddCount() { fCount++; }
+
private:
Int_t fEventNumber; // Event number as it appears in the input raw-data file
Int_t fDdlID; // ID of the DLL in which the error occured
ERawDataErrorLevel fErrorLevel; // Level of the raw data error
Int_t fErrorCode; // Code of the raw data error (detector-specific)
+ Int_t fCount; // Counter of identical errors (occurances)
- ClassDef(AliRawDataErrorLog, 2)
+ ClassDef(AliRawDataErrorLog, 3)
};
#endif