return 0;
}
-//____________________________________________________________________________
-void AliConfig::Add (char *list)
-{
- // Adds space separated list of objects to the
- // configuration macro (?)
- char *path;
-
- const char *confPath = gSystem->Getenv ("ALICE_CONFIG_PATH");
- if (confPath) {
- path = new char[strlen (confPath)+1];
- strcpy (path, confPath);
- } else {
- const char *alice = gSystem->Getenv ("ALICE_ROOT");
- path = new char[strlen (alice) + 32];
-
- strcpy (path, ".:");
- if (alice) {
- strcat (path, alice);
- }
- strcat (path, "/macros/config");
- }
-
- char *token = strtok (path, ":");
-
- TList *dirlist = new TList;
-
- while (token != NULL)
- {
- dirlist->Add (new TObjString(token));
- token = strtok (NULL, ":");
- }
-
- token = strtok (list, " ");
-
- while (token != NULL)
- {
- AliInfo(Form("Configuring token=%s",token));
-
- TObject *obj;
- TIter next (dirlist);
- TString found = "\0";
-
- while ((obj = next ()))
- {
- TString dir(obj->GetName());
- TString apath = dir + "/" + token;
- TString macro = apath + ".C";
- if (!gSystem->AccessPathName (macro.Data()))
- {
- gInterpreter->ExecuteMacro (macro.Data());
- found = "(" + macro + ")";
- if (macro.Contains("/"))
- {
- TString dirname = gSystem->DirName(macro.Data());
- TString macroConfigure = dirname + "/Configure.C";
- if (!gSystem->AccessPathName (macroConfigure.Data()))
- {
- gInterpreter->ExecuteMacro (macroConfigure.Data());
- found += " => Configured";
- }
- }
- break;
- }
- else
- {
- TString macroDefault = apath + "/Default.C";
- if (!gSystem->AccessPathName (macroDefault.Data()))
- {
- gInterpreter->ExecuteMacro (macroDefault.Data());
- found = "(" + macro + ")";
- TString macroConfigure = apath + "/Configure.C";
- if (!gSystem->AccessPathName (macroConfigure.Data()))
- {
- gInterpreter->ExecuteMacro (macroConfigure.Data());
- found += " => Configured";
- }
- break;
- }
- }
- }
-
- if (strlen(found.Data()))
- {
- AliInfo(Form("found=%s => OK",found.Data()));
- }
- else
- {
- AliError(" => FAILED.");
- exit(1);
- }
-
- token = strtok (NULL," ");
- }
-
- if (dirlist) delete dirlist;
-
-}
-
/*****************************************************************************/
TFolder* AliConfig::BuildEventFolder(const char* name,const char* title)
TFolder *configuration = eventfolder->AddFolder(fgkConfigurationFolderName, "Run configuration");
configuration->AddFolder(fgkFieldFolderName, "Magnetic field maps");
configuration->AddFolder(fgkGeneratorsFolderName,"list of generator objects");
- configuration->AddFolder(fgkVirtualMCFolderName,"the Virtual MC");
+ //PH configuration->AddFolder(fgkVirtualMCFolderName,"the Virtual MC");
eventfolder->AddFolder(fgkHeaderFolderName,"MonteCarlo event header");