8 void alieve_init(const Text_t* path = ".", Int_t event=0,
9 const Text_t* cdburi = 0,
10 Bool_t assert_runloader=kFALSE, Bool_t assert_esd=kFALSE)
12 Info("alieve_init", "Adding standard macros.");
13 TString hack = gSystem->pwd(); // Problem with TGFileBrowser cding
14 alieve_init_import_macros();
17 // AssertMacro("region_marker.C");
19 gSystem->ProcessEvents();
23 Alieve::Event::SetCdbUri(cdburi);
24 Alieve::Event::SetAssertElements(assert_runloader, assert_esd);
25 printf("Opening event %d from '%s' ...", event, path); fflush(stdout);
26 Alieve::gEvent = new Alieve::Event(path, event);
28 gEve->AddEvent(Alieve::gEvent);
32 void alieve_init_import_macros()
34 // Put macros in the list of browsables, add a macro browser to
37 TString macdir("$(REVESYS)/alice-macros");
38 gSystem->ExpandPathName(macdir);
40 TFolder* f = gEve->GetMacroFolder();
41 void* dirhandle = gSystem->OpenDirectory(macdir.Data());
45 std::list<string> names;
46 while((filename = gSystem->GetDirEntry(dirhandle)) != 0) {
47 if(re.Match(filename)) {
48 names.push_back(filename);
52 //PH The line below is replaced waiting for a fix in Root
53 //PH which permits to use variable siza arguments in CINT
54 //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
55 // f->Add(new TEveMacro(Form("%s/%s", macdir.Data(), filename)));
57 for (std::list<string>::iterator si=names.begin(); si!=names.end(); ++si)
59 sprintf(fullName,"%s/%s", macdir.Data(), si->c_str());
60 f->Add(new TEveMacro(fullName));
63 gSystem->FreeDirectory(dirhandle);
65 gROOT->GetListOfBrowsables()->Add
66 // (new TSystemDirectory("alice-macros", macdir.Data())); // !!!! this spits blood, but then works
67 (new TSystemDirectory(macdir.Data(), macdir.Data()));
70 TEveBrowser *br = gEve->GetBrowser();
71 TGFileBrowser *fb = 0;
72 fb = br->GetFileBrowser();
75 br->StartEmbedding(0);
76 fb = br->MakeFileBrowser();
80 br->SetTabTitle("Macros", 0);