]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/macros/embed_init.C
Extra header added to the list
[u/mrichter/AliRoot.git] / EVE / macros / embed_init.C
CommitLineData
68ca2fe7 1TEveViewer *gSignalView = 0;
2TEveViewer *gBackgroundView = 0;
3
ba5d58f2 4void embed_init()
5{
6 TEveUtil::LoadMacro("alieve_init.C");
7 alieve_init("Signal", -1);
8
9 AliEveEventManager::GetMaster()->AddNewEventCommand("main_event()");
10
11 // ------------------------------------------------------------------------
12
13 Info("embed_init", "Opening background event ...");
68ca2fe7 14 AliEveEventManager* bkg =
15 AliEveEventManager::AddDependentManager("Background Event", "Background");
ba5d58f2 16 bkg->IncDenyDestroy();
17 bkg->AddNewEventCommand("background_event()");
18 gEve->AddToListTree(bkg, kTRUE);
19
588e6788 20 TEveScene* bs = gEve->SpawnNewScene("Background");
21 bs->AddElement(bkg);
22
68ca2fe7 23 gEve->GetDefaultViewer()->AddScene(bs);
24
25 // ------------------------------------------------------------------------
26
27 TEveBrowser* browser = gEve->GetBrowser();
28
29 TEveWindowSlot *slot = 0;
30 TEveWindowPack *pack = 0;
31
32 slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
33 pack = slot->MakePack();
34 pack->SetElementName("Parallel View");
35 pack->SetHorizontal();
36 pack->SetShowTitleBar(kFALSE);
37
38 pack->NewSlot()->MakeCurrent();
39 gSignalView = gEve->SpawnNewViewer("Signal View", "");
40 gSignalView->AddScene(gEve->GetEventScene());
41
42 pack->NewSlot()->MakeCurrent();
43 gBackgroundView = gEve->SpawnNewViewer("Background View", "");
44 gBackgroundView->AddScene(bs);
588e6788 45
ba5d58f2 46 // ------------------------------------------------------------------------
47
48 TEveUtil::LoadMacro("its_clusters.C+");
49 TEveUtil::LoadMacro("tpc_clusters.C+");
50
51 // ------------------------------------------------------------------------
52
ba5d58f2 53 browser->StartEmbedding(TRootBrowser::kBottom);
54 new AliEveEventManagerWindow(AliEveEventManager::GetMaster());
55 browser->StopEmbedding("EventCtrl");
56
57 // ------------------------------------------------------------------------
58
59 AliEveEventManager::GetMaster()->GotoEvent(0);
60 gEve->Redraw3D(kTRUE);
61}
62
63void main_event()
64{
65 printf("Main Event - post load\n");
66
67 its_clusters();
68 tpc_clusters();
69}
70
71void background_event()
72{
73 printf("Background Event - post load\n");
74
75 TEvePointSet* c;
76
77 c = its_clusters();
78 c->SetMarkerColor(kOrange);
79
80 c = tpc_clusters();
81 c->SetMarkerColor(kCyan);
82}