]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawReader.cxx
Adding new URI for raw data - 'raw://run<#>', where <#> is the run number. The URI...
[u/mrichter/AliRoot.git] / RAW / AliRawReader.cxx
index beb5a7ee14525ce91c59583f2062384a97915fc0..a336d4693f7dfc3bc900ac78dfbf663009cb29bf 100644 (file)
@@ -232,6 +232,17 @@ AliRawReader* AliRawReader::Create(const char *uri)
     AliInfoClass(Form("Creating raw-reader in order to read raw-data files collection defined in %s",fileURI.Data()));
     rawReader = new AliRawReaderChain(fileURI);
   }
+  else if (fileURI.BeginsWith("raw://run")) {
+    fileURI.ReplaceAll("raw://run","");
+    if (fileURI.IsDigit()) {
+      rawReader = new AliRawReaderChain(fileURI.Atoi());
+    }
+    else {
+      AliErrorClass(Form("Invalid syntax: %s",fileURI.Data()));
+      fields->Delete();
+      return NULL;
+    }
+  }
   else {
     AliInfoClass(Form("Creating raw-reader in order to read raw-data file: %s",fileURI.Data()));
     TString filename(gSystem->ExpandPathName(fileURI.Data()));