]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
check if STAGE_POOL and STAGE_HOST are set, if not warn user.
authorrdm <rdm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Jan 2004 11:27:37 +0000 (11:27 +0000)
committerrdm <rdm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Jan 2004 11:27:37 +0000 (11:27 +0000)
RAW/AliRawEvent.cxx

index 1d1ea4708cb2e4ae0118617128e7ce68c73f4216..742aa82cf5c6ea614dc9ccb919e416071256f306 100644 (file)
@@ -635,6 +635,12 @@ AliRawRFIODB::AliRawRFIODB(AliRawEvent *event, Double_t maxsize, Int_t compress)
       // WHATEVER HAS BEEN SET IN THE DATE SITE
       //gSystem->Setenv("STAGE_POOL", "lcg00");
       //gSystem->Setenv("STAGE_HOST", "stage013");
+
+      // however for sanity we check if they are really set
+      if (!gSystem->Getenv("STAGE_POOL"))
+         Error("AliRawRFIODB", "STAGE_POOL not set");
+      if (!gSystem->Getenv("STAGE_HOST"))
+         Error("AliRawRFIODB", "STAGE_HOST not set");
       init = 1;
    }
 #endif
@@ -727,6 +733,12 @@ AliRawCastorDB::AliRawCastorDB(AliRawEvent *event, Double_t maxsize, Int_t compr
       // WHATEVER HAS BEEN SET IN THE DATE SITE
       //gSystem->Setenv("STAGE_POOL", "lcg00");
       //gSystem->Setenv("STAGE_HOST", "stage013");
+
+      // however for sanity we check if they are really set
+      if (!gSystem->Getenv("STAGE_POOL"))
+         Error("AliRawRFIODB", "STAGE_POOL not set");
+      if (!gSystem->Getenv("STAGE_HOST"))
+         Error("AliRawRFIODB", "STAGE_HOST not set");
       init = 1;
    }
 #endif
@@ -1191,14 +1203,14 @@ void AliRunDB::UpdateAliEn(AliStats *stats)
    lfn += dt.GetDate();
 
    // check if directory exists, if not create it
-   Grid_ResultHandle_t res;
-   if (!(res = g->OpenDir(lfn))) {
+   Grid_ResultHandle_t res = 0;
+   //if (!(res = g->OpenDir(lfn))) {
       // directory does not exist, create it
       if (g->Mkdir(lfn, kTRUE) == -1) {
          Error("UpdateAliEn", "cannot create directory %s", lfn.Data());
          lfn = kAlienDir;
       }
-   }
+   //}
    if (res) g->CloseResult(res);
 
    lfn += "/";