Commit 3e771893 authored by Dario Berzano's avatar Dario Berzano Committed by Nikola Hardi
Browse files

Fix TJAliEn error preventing proper loading

We don't check for the library to be under `$ROOTSYS` before loading any longer,
as this is no longer the case
parent e86e8fc8
#include <iostream>
void SetAliEnSettings()
void SetJAliEnSettings()
{
// Routine to load settings from an AliEn environment file.
ifstream fileIn;
fileIn.open(Form("/tmp/jclient_env_%d", gSystem->GetUid()));
if (gDebug>0) {printf("P010_TAlien.C: parsing /tmp/jclient_env_$UID\n");}
if (gDebug>0) {printf("P010_TJAlien.C: parsing /tmp/jclient_env_$UID\n");}
TString lineS,tmp;
char line[4096];
......@@ -32,7 +32,7 @@ void SetAliEnSettings()
gSystem->Unsetenv(strVar->GetString());
gSystem->Setenv(strVar->GetString(), tmp);
if (gDebug>0) {
Info("P010_TAlien", "setting environment %s=\"%s\"", strVar->GetString().Data(), tmp.Data());
Info("P010_TJAlien", "setting environment %s=\"%s\"", strVar->GetString().Data(), tmp.Data());
}
if (!strVar->GetString().CompareTo("GCLIENT_SERVER_LIST")) {
gSystem->Unsetenv("alien_API_SERVER_LIST");
......@@ -53,7 +53,7 @@ void SetAliEnSettings()
if (key.Length() && val.Length()) {
val.Resize(val.Length()-1);
if (gDebug>0) {
Info("P010_TAlien", "setting environment %s=\"%s\"", key.Data(), val.Data());
Info("P010_TJAlien", "setting environment %s=\"%s\"", key.Data(), val.Data());
}
gSystem->Unsetenv(key);
gSystem->Setenv(key, val);
......@@ -69,7 +69,7 @@ void SetAliEnSettings()
}
if (key.Length() && val.Length()) {
if (gDebug>0) {
Info("P010_TAlien", "setting environment %s=\"%s\"", key.Data(), val.Data());
Info("P010_TJAlien", "setting environment %s=\"%s\"", key.Data(), val.Data());
}
gSystem->Unsetenv(key);
gSystem->Setenv(key, val);
......@@ -81,24 +81,16 @@ void SetAliEnSettings()
void P010_TJAlien()
{
TString configfeatures = gROOT->GetConfigFeatures();
TString ralienpath = gSystem->Getenv("ROOTSYS");
ralienpath += "/lib/"; ralienpath += "libJAliEnROOT.so";
// only if ROOT was compiled with enable-jalien we do library setup and configure a handler
if ((!gSystem->AccessPathName(ralienpath)) || (configfeatures.contains("jalien"))) {
// you can enforce
if ((!gSystem->Getenv("GBBOX_ENVFILE")) ||
( gSystem->Getenv("ALIEN_SOURCE_GCLIENT_ENV")) ||
(!gSystem->Getenv("ALIEN_SKIP_GCLIENT_ENV")) ) {
SetAliEnSettings();
}
if ((!gSystem->Getenv("GBBOX_ENVFILE")) ||
( gSystem->Getenv("ALIEN_SOURCE_GCLIENT_ENV")) ||
(!gSystem->Getenv("ALIEN_SKIP_GCLIENT_ENV")) ) {
SetJAliEnSettings();
}
if (gSystem->Load("libJAliEnROOT.so")>=0) {
gPluginMgr->AddHandler("TGrid", "^alien", "TJAlien",
"JAliEnROOT", "TJAlien(const char*, const char*, const char*, const char*)");
} else {
Error("P010_TAlien","Please fix your loader path environment variable to be able to load libJAliEnROOT.so");
}
}
if (gSystem->Load("libJAliEnROOT.so")>=0) {
gPluginMgr->AddHandler("TGrid", "^alien", "TJAlien",
"JAliEnROOT", "TJAlien(const char*, const char*, const char*, const char*)");
} else {
Error("P010_TJAlien","Please fix your loader path environment variable to be able to load libJAliEnROOT.so");
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment