AliEveEventManager
[u/mrichter/AliRoot.git] / EVE / macros / embed_init.C
CommitLineData
ba5d58f2 1void embed_init()
2{
3 TEveUtil::LoadMacro("alieve_init.C");
4 alieve_init("Signal", -1);
5
6 AliEveEventManager::GetMaster()->AddNewEventCommand("main_event()");
7
8 // ------------------------------------------------------------------------
9
10 Info("embed_init", "Opening background event ...");
11 // Need strings as CINT can't properly convert "raw-string" to const TString&.
12 TString name("Background Event");
13 TString path("Background");
14 AliEveEventManager* bkg = AliEveEventManager::AddDependentManager(name, path);
15 bkg->IncDenyDestroy();
16 bkg->AddNewEventCommand("background_event()");
17 gEve->AddToListTree(bkg, kTRUE);
18
19 // ------------------------------------------------------------------------
20
21 TEveUtil::LoadMacro("its_clusters.C+");
22 TEveUtil::LoadMacro("tpc_clusters.C+");
23
24 // ------------------------------------------------------------------------
25
26 TEveBrowser* browser = gEve->GetBrowser();
27
28 browser->StartEmbedding(TRootBrowser::kBottom);
29 new AliEveEventManagerWindow(AliEveEventManager::GetMaster());
30 browser->StopEmbedding("EventCtrl");
31
32 // ------------------------------------------------------------------------
33
34 AliEveEventManager::GetMaster()->GotoEvent(0);
35 gEve->Redraw3D(kTRUE);
36}
37
38void main_event()
39{
40 printf("Main Event - post load\n");
41
42 its_clusters();
43 tpc_clusters();
44}
45
46void background_event()
47{
48 printf("Background Event - post load\n");
49
50 TEvePointSet* c;
51
52 c = its_clusters();
53 c->SetMarkerColor(kOrange);
54
55 c = tpc_clusters();
56 c->SetMarkerColor(kCyan);
57}