Fix for the raw-data filename. First try with the path, fallback with giving the...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Aug 2008 15:48:40 +0000 (15:48 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Aug 2008 15:48:40 +0000 (15:48 +0000)
EVE/EveBase/AliEveEventManager.cxx

index c44026b..9a08ea5 100644 (file)
@@ -260,7 +260,17 @@ void AliEveEventManager::Open()
   // Open raw-data file
 
   TString rawPath(Form("%s/%s", fPath.Data(), fgRawFileName.Data()));
-  fRawReader = AliRawReader::Create(rawPath);
+  // If i use open directly, raw-reader reports an error but i have     
+  // no way to detect it.       
+  // Is this (AccessPathName check) ok for xrootd / alien? Yes, not for http.   
+  if (gSystem->AccessPathName(rawPath, kReadPermission) == kFALSE)      
+  {
+    fRawReader = AliRawReader::Create(rawPath);
+  }
+  else
+  {
+    fRawReader = AliRawReader::Create(fgRawFileName);
+  }
   if (fRawReader == 0)
   {
     if (fgAssertRaw)