- }
- else // galice not readable
- {
- Warning(kEH, "can not read '%s'.", fgGAliceFileName.Data());
- }
- if (fRunLoader == 0)
- {
- if (fgAssertRunLoader)
- throw (kEH + "Bootstraping of run-loader failed. Its precence was requested.");
- else
- Warning(kEH, "Bootstraping of run-loader failed.");
- }
-
- // Open raw-data file
-
- TString rawPath;
- if (fgRawFromStandardLoc)
- {
- if (!fgRawFileName.BeginsWith("alien:"))
- throw kEH + "Standard raw search requested, but the directory is not in AliEn.";
- if (!fgRawFileName.Contains("/ESDs/"))
- throw kEH + "Standard raw search requested, but does not contain 'ESDs' directory.";
-
- TPMERegexp chunk("/([\\d\\.])+/?$");
- Int_t nm = chunk.Match(fgRawFileName);
- if (nm != 2)
- throw kEH + "Standard raw search requested, but the path does not end with chunk-id directory.";
-
- TPMERegexp esdstrip("/ESDs/.*");
- rawPath = fgRawFileName;
- esdstrip.Substitute(rawPath, "/raw/");
- rawPath += chunk[0];
- rawPath += ".root";
-
- Info(kEH, "Standard raw search requested, using the following path:\n %s\n", rawPath.Data());
- }
- else
- {
- rawPath = fgRawFileName;
- }
- // 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.
- AliLog::EType_t oldLogLevel = (AliLog::EType_t) AliLog::GetGlobalLogLevel();
- if (fgAssertRaw == kFALSE)
- {
- AliLog::SetGlobalLogLevel(AliLog::kFatal);
- }
- if (gSystem->AccessPathName(rawPath, kReadPermission) == kFALSE)
- {
- fRawReader = AliRawReader::Create(rawPath);
- }
- else
- {
- fRawReader = AliRawReader::Create(fgRawFileName);
- }
- if (fgAssertRaw == kFALSE)
- {
- AliLog::SetGlobalLogLevel(oldLogLevel);
- }
-
- if (fRawReader == 0)
- {
- if (fgAssertRaw)
- {
- throw (kEH + "raw-data not initialized. Its precence was requested.");
- }
- else
- {
- Warning(kEH, "raw-data not initialized.");
- }
- }
-
- if (runNo < 0)
- {
- if (fRawReader)
- {
- if ( ! fRawReader->NextEvent())
- {
- throw (kEH + "can not go to first event in raw-reader to determine run-id.");
- }
- runNo = fRawReader->GetRunNumber();
- Info(kEH, "Determining run-no from raw ... run=%d.", runNo);
- fRawReader->RewindEvents();
- }
- else
- {
- fExternalCtrl = kTRUE;
- fEventId = 0;
- return;
- }
- }
-
+ }
+ else // galice not readable
+ {
+ Warning(kEH, "can not read '%s'.", fgGAliceFileName.Data());
+ }
+ if (fRunLoader == 0)
+ {
+ if (fgAssertRunLoader)
+ throw (kEH + "Bootstraping of run-loader failed. Its precence was requested.");
+ else
+ Warning(kEH, "Bootstraping of run-loader failed.");
+ }
+
+ // Open raw-data file
+
+ TString rawPath;
+ if (fgRawFromStandardLoc)
+ {
+ if (!fgRawFileName.BeginsWith("alien:"))
+ throw kEH + "Standard raw search requested, but the directory is not in AliEn.";
+ if (!fgRawFileName.Contains("/ESDs/"))
+ throw kEH + "Standard raw search requested, but does not contain 'ESDs' directory.";
+
+ TPMERegexp chunk("/([\\d\\.])+/?$");
+ Int_t nm = chunk.Match(fgRawFileName);
+ if (nm != 2)
+ throw kEH + "Standard raw search requested, but the path does not end with chunk-id directory.";
+
+ TPMERegexp esdstrip("/ESDs/.*");
+ rawPath = fgRawFileName;
+ esdstrip.Substitute(rawPath, "/raw/");
+ rawPath += chunk[0];
+ rawPath += ".root";
+
+ Info(kEH, "Standard raw search requested, using the following path:\n %s\n", rawPath.Data());
+ }
+ else
+ {
+ rawPath = fgRawFileName;
+ }
+ // 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.
+ AliLog::EType_t oldLogLevel = (AliLog::EType_t) AliLog::GetGlobalLogLevel();
+ if (fgAssertRaw == kFALSE)
+ {
+ AliLog::SetGlobalLogLevel(AliLog::kFatal);
+ }
+ if (gSystem->AccessPathName(rawPath, kReadPermission) == kFALSE)
+ {
+ fRawReader = AliRawReader::Create(rawPath);
+ }
+ else
+ {
+ fRawReader = AliRawReader::Create(fgRawFileName);
+ }
+ if (fgAssertRaw == kFALSE)
+ {
+ AliLog::SetGlobalLogLevel(oldLogLevel);
+ }
+
+ if (fRawReader == 0)
+ {
+ if (fgAssertRaw)
+ {
+ throw (kEH + "raw-data not initialized. Its precence was requested.");
+ }
+ else
+ {
+ Warning(kEH, "raw-data not initialized.");
+ }
+ }
+
+ if (runNo < 0)
+ {
+ if (fRawReader)
+ {
+ if ( ! fRawReader->NextEvent())
+ {
+ throw (kEH + "can not go to first event in raw-reader to determine run-id.");
+ }
+ runNo = fRawReader->GetRunNumber();
+ Info(kEH, "Determining run-no from raw ... run=%d.", runNo);
+ fRawReader->RewindEvents();
+ }
+ else
+ {
+ fExternalCtrl = kTRUE;
+ fEventId = 0;
+ return;
+ }
+ }
+ }