]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawReaderFile.cxx
Moving fourier decomposition analysis code
[u/mrichter/AliRoot.git] / RAW / AliRawReaderFile.cxx
index 22f29c556b12f9a04ecd56b1975ab83a2a8b13cd..c379c0a6a978d1974d4456cdc1b11e8ee014e039 100644 (file)
@@ -60,7 +60,8 @@ AliRawReaderFile::AliRawReaderFile(Int_t eventNumber) :
 // in the current directory
 
   fDirectory = OpenDirectory();
-  OpenNextFile();
+  if (!fDirectory) fIsValid = kFALSE;
+  if (!OpenNextFile()) fIsValid = kFALSE;
   fHeader = new AliRawDataHeader;
 
   fId[0] = fId[1] = 0;
@@ -86,7 +87,8 @@ AliRawReaderFile::AliRawReaderFile(const char* dirName, Int_t eventNumber) :
 // 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;
@@ -163,7 +165,7 @@ Bool_t AliRawReaderFile::CreateFileIndex()
   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")) {