<commit_before>#include <iostream>

void SetAliEnSettings()
{
   // Routine to load settings from an AliEn environment file.

   ifstream fileIn;
   fileIn.open(Form("%s/gclient_env_%d", gSystem->TempDirectory(), gSystem->GetUid()));
   if (gDebug>0) {printf("P010_TAlien.C: parsing %s/gclient_env_$UID\n", gSystem->TempDirectory());}
   TString lineS,tmp;
   char line[4096];

   while (fileIn.good()){
      fileIn.getline(line,4096,'\n');
      lineS = line;
      if (lineS.IsNull()) continue;
      if (lineS.Contains("export ")) {
         lineS.ReplaceAll("export ","");

         TObjArray* array = lineS.Tokenize("=");

         if (array->GetEntries() == 2) {
            TObjString *strVar = (TObjString *) array->At(0);
            TObjString *strVal = (TObjString *) array->At(1);

            if ((strVar)&&(strVal)) {
               tmp = strVal->GetString();
               tmp.ReplaceAll("\"","");
               tmp.ReplaceAll("$LD_LIBRARY_PATH",gSystem->Getenv("LD_LIBRARY_PATH"));
               tmp.ReplaceAll("$DYLD_LIBRARY_PATH",gSystem->Getenv("DYLD_LIBRARY_PATH"));
               tmp.ReplaceAll(" ","");
               gSystem->Unsetenv(strVar->GetString());
               gSystem->Setenv(strVar->GetString(), tmp);
               if (gDebug>0) {
                  Info("P010_TAlien", "setting environment %s=\"%s\"", strVar->GetString().Data(), tmp.Data());
               }
               if (!strVar->GetString().CompareTo("GCLIENT_SERVER_LIST")) {
                  gSystem->Unsetenv("alien_API_SERVER_LIST");<commit_msg>No need to source /tmp/gclient_* for AliEn on OSX<commit_after>#include <iostream>

void SetAliEnSettings()
{
   // Routine to load settings from an AliEn environment file.

   ifstream fileIn;
   fileIn.open(Form("/tmp/gclient_env_%d", gSystem->GetUid()));
   if (gDebug>0) {printf("P010_TAlien.C: parsing /tmp/gclient_env_$UID\n");}
   TString lineS,tmp;
   char line[4096];

   while (fileIn.good()){
      fileIn.getline(line,4096,'\n');
      lineS = line;
      if (lineS.IsNull()) continue;
      if (lineS.Contains("export ")) {
         lineS.ReplaceAll("export ","");

         TObjArray* array = lineS.Tokenize("=");

         if (array->GetEntries() == 2) {
            TObjString *strVar = (TObjString *) array->At(0);
            TObjString *strVal = (TObjString *) array->At(1);

            if ((strVar)&&(strVal)) {
               tmp = strVal->GetString();
               tmp.ReplaceAll("\"","");
               tmp.ReplaceAll("$LD_LIBRARY_PATH",gSystem->Getenv("LD_LIBRARY_PATH"));
               tmp.ReplaceAll("$DYLD_LIBRARY_PATH",gSystem->Getenv("DYLD_LIBRARY_PATH"));
               tmp.ReplaceAll(" ","");
               gSystem->Unsetenv(strVar->GetString());
               gSystem->Setenv(strVar->GetString(), tmp);
               if (gDebug>0) {
                  Info("P010_TAlien", "setting environment %s=\"%s\"", strVar->GetString().Data(), tmp.Data());
               }
               if (!strVar->GetString().CompareTo("GCLIENT_SERVER_LIST")) {
                  gSystem->Unsetenv("alien_API_SERVER_LIST");
{'fraction_non_alphanumeric': 0.1736739974126779, 'fraction_numerical': 0.012289780077619664, 'mean_word_length': 2.5267958950969214, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4715607', 'n_tokens_mistral': 1020, 'n_tokens_neox': 987, 'n_words': 155}