3 void alieve_init(const Text_t* path=".", Int_t event=0,
4 Bool_t use_runloader=true, Bool_t use_esd=true)
7 // Set-up environment, load libraries.
9 Reve::SetupEnvironment();
11 gROOT->SetMacroPath(Form("%s:%s/alice-macros:%s/macros",
12 gROOT->GetMacroPath(),
13 gSystem->Getenv("REVESYS"),
14 gSystem->Getenv("ALICE_ROOT")));
15 gInterpreter->AddIncludePath(Form("%s/macros", gSystem->Getenv("ALICE_ROOT")));
17 Reve::AssertMacro("alieve_loadlibs.C");
18 gSystem->Load("libAlieve.so");
21 // Put macros in the list of browsables, spawn a browser.
23 TFolder* f = new TFolder("ALICE EVE", "Visualization macros");
24 TString macdir("$(REVESYS)/alice-macros");
25 gSystem->ExpandPathName(macdir);
27 void* dirhandle = gSystem->OpenDirectory(macdir.Data());
31 while((filename = gSystem->GetDirEntry(dirhandle)) != 0) {
32 if(re.Match(filename)) {
33 printf("Adding macro '%s'\n", filename);
34 f->Add(new TMacro(Form("%s/%s", macdir.Data(), filename)));
38 gSystem->FreeDirectory(dirhandle);
40 gROOT->GetListOfBrowsables()->Add(f);
41 gROOT->GetListOfBrowsables()->Add
42 (new TSystemDirectory(macdir.Data(), macdir.Data()));
48 Alieve::Event::Initialize(use_runloader, use_esd);
50 printf("Opening event %d from '%s' ...", event, path); fflush(stdout);
51 Alieve::gEvent = new Alieve::Event(path, event);
53 gReve->AddEvent(Alieve::gEvent);