fFile = fopen(fileName, "rb");
if (!fFile) {
Error("AliRawReaderDate", "could not open file %s", fileName);
+ fIsValid = kFALSE;
return;
}
if (eventNumber < 0) return;
// "read" the data header
fHeader = (AliRawDataHeader*) fPosition;
if ((fPosition + fHeader->fSize) != fEnd) {
- if (fHeader->fSize != 0xFFFFFFFF)
+ if ((fHeader->fSize != 0xFFFFFFFF) &&
+ (fEquipment->equipmentId != 4352))
Warning("ReadHeader",
"raw data size found in the header is wrong (%d != %d)! Using the equipment size instead !",
fHeader->fSize, fEnd - fPosition);
// go to the next event in the date file
#ifdef ALI_DATE
- if (!fFile) return kFALSE;
+ if (!fFile) {
+ if (fEventNumber < 0 && fEvent) {
+ fEventNumber++;
+ return kTRUE;
+ }
+ else
+ return kFALSE;
+ }
Reset();
eventHeaderStruct header;
{
// go back to the beginning of the date file
- if (!fFile) return kFALSE;
+ if (fFile)
+ fseek(fFile, 0, SEEK_SET);
- fseek(fFile, 0, SEEK_SET);
fEventNumber = -1;
return Reset();
}