]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Header$ |
2 | ||
3 | void alieve_init(const Text_t* path=".", Int_t event=0, | |
5ce2e42b | 4 | Bool_t use_runloader=true, Bool_t use_esd=true) |
5a5a1232 | 5 | { |
6 | ||
7 | // Set-up environment, load libraries. | |
8 | ||
9 | Reve::SetupEnvironment(); | |
5987168b | 10 | // alieve executable linked against ALICE nad EVE shared libraries. |
11 | // Reve::AssertMacro("alieve_loadlibs.C"); | |
5a5a1232 | 12 | |
13 | ||
14 | // Put macros in the list of browsables, spawn a browser. | |
15 | ||
5a5a1232 | 16 | TString macdir("$(REVESYS)/alice-macros"); |
17 | gSystem->ExpandPathName(macdir); | |
18 | ||
46a5da3d | 19 | TFolder* f = gReve->GetMacroFolder(); |
5a5a1232 | 20 | void* dirhandle = gSystem->OpenDirectory(macdir.Data()); |
21 | if(dirhandle != 0) { | |
22 | char* filename; | |
23 | TPRegexp re("\.C$"); | |
24 | while((filename = gSystem->GetDirEntry(dirhandle)) != 0) { | |
25 | if(re.Match(filename)) { | |
26 | printf("Adding macro '%s'\n", filename); | |
46a5da3d | 27 | f->Add(new Reve::RMacro(Form("%s/%s", macdir.Data(), filename))); |
5a5a1232 | 28 | } |
29 | } | |
30 | } | |
31 | gSystem->FreeDirectory(dirhandle); | |
32 | ||
5a5a1232 | 33 | gROOT->GetListOfBrowsables()->Add |
46a5da3d | 34 | // (new TSystemDirectory("alice-macros", macdir.Data())); // !!!! this spits blood, but then works |
5a5a1232 | 35 | (new TSystemDirectory(macdir.Data(), macdir.Data())); |
36 | ||
37 | new TBrowser; | |
38 | ||
092578a7 | 39 | Reve::AssertMacro("region_marker.C"); |
40 | ||
5a5a1232 | 41 | // Open event |
5ce2e42b | 42 | if(path != 0) { |
43 | Alieve::Event::Initialize(use_runloader, use_esd); | |
5a5a1232 | 44 | |
5ce2e42b | 45 | printf("Opening event %d from '%s' ...", event, path); fflush(stdout); |
46 | Alieve::gEvent = new Alieve::Event(path, event); | |
47 | printf(" done.\n"); | |
48 | gReve->AddEvent(Alieve::gEvent); | |
49 | } | |
5a5a1232 | 50 | } |