// in the current directory
fDirectory = OpenDirectory();
- OpenNextFile();
+ if (!fDirectory) fIsValid = kFALSE;
+ if (!OpenNextFile()) fIsValid = kFALSE;
fHeader = new AliRawDataHeader;
fId[0] = fId[1] = 0;
// create an object to read digits from the given directory
fDirectory = OpenDirectory();
- OpenNextFile();
+ if (!fDirectory) fIsValid = kFALSE;
+ if (fEventIndex >= 0 && (!OpenNextFile())) fIsValid = kFALSE;
fHeader = new AliRawDataHeader;
fId[0] = fId[1] = 0;
fDDLIndex=new TArrayC(0);
if (!fDDLIndex) return kFALSE;
TString entry;
- while (entry = gSystem->GetDirEntry(fDirectory)) {
+ while ((entry = gSystem->GetDirEntry(fDirectory))) {
const char* filename=entry.Data();
if (!filename || entry.IsNull()) break;
if (entry.BeginsWith("run")) {