Reducing the size of the step in material (M. Ivanov)
[u/mrichter/AliRoot.git] / EVE / macros / alieve_online.C
CommitLineData
319f3084 1/**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
3 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
4 * full copyright notice. *
5 **************************************************************************/
6
4d62585e 7TEveGeoShape *gGeomGentle = 0;
de33999e 8
9void alieve_online_init()
319f3084 10{
de33999e 11 gROOT->LoadMacro("geom_gentle.C");
12
13 gROOT->LoadMacro("primary_vertex.C");
14 gROOT->LoadMacro("esd_tracks.C");
15
dc9dec4d 16 gROOT->LoadMacro("its_clusters.C++");
17 gROOT->LoadMacro("tpc_clusters.C++");
18 gROOT->LoadMacro("trd_clusters.C++");
f1fa3b4b 19 gROOT->LoadMacro("hmpid_clusters.C++");
de33999e 20
21 gROOT->LoadMacro("acorde_raw.C");
22 gROOT->LoadMacro("its_raw.C");
23 gROOT->LoadMacro("tpc_raw.C");
24
a9e18d1c 25 TEveUtil::AssertMacro("VizDB_scan.C");
26
2a8440b7 27 // Temp fix !!!
28 TGeoManager *man = gGeoManager;
de33999e 29 gGeomGentle = geom_gentle();
2a8440b7 30 // Temp fix !!!
31 gGeoManager = man;
de33999e 32
dc9dec4d 33 gROOT->ProcessLine(".L SplitGLView.C++g"); // !!!! debug-mode
de33999e 34 TEveBrowser* browser = gEve->GetBrowser();
35 browser->ExecPlugin("SplitGLView", 0, "new SplitGLView(gClient->GetRoot(), 600, 450, kTRUE)");
36
37 if (gRPhiMgr) {
38 TEveProjectionAxes* a = new TEveProjectionAxes(gRPhiMgr);
39 a->SetNumTickMarks(3);
40 a->SetText("R-Phi");
41 a->SetFontFile("comicbd");
42 a->SetFontSize(10);
43 gEve->GetScenes()->FindChild("R-Phi Projection")->AddElement(a);
44 }
45 if (gRhoZMgr) {
46 TEveProjectionAxes* a = new TEveProjectionAxes(gRhoZMgr);
47 a->SetNumTickMarks(3);
48 a->SetText("Rho-Z");
49 a->SetFontFile("comicbd");
50 a->SetFontSize(10);
51 gEve->GetScenes()->FindChild("Rho-Z Projection")->AddElement(a);
52 }
53
47aab29b 54 TEveBrowser* browser = gEve->GetBrowser();
55
56 browser->StartEmbedding(TRootBrowser::kBottom);
4d62585e 57 new AliEveEventManagerWindow(AliEveEventManager::GetMaster());
47aab29b 58 browser->StopEmbedding("EventCtrl");
59
de33999e 60 gEve->Redraw3D(kTRUE);
61}
62
63void alieve_online_on_new_event()
64{
de33999e 65 its_raw();
66 its_clusters();
67
68 tpc_raw();
69 tpc_clusters();
70
f1fa3b4b 71 hmpid_clusters();
72
de33999e 73 acorde_raw();
74
75 primary_vertex();
76 esd_tracks();
77
78 AliESDEvent* esd = AliEveEventManager::AssertESD();
79 Double_t x[3];
80 esd->GetPrimaryVertex()->GetXYZ(x);
81
82 TEveElement* top = gEve->GetCurrentEvent();
83
84 if (gRPhiMgr && top) {
85 gRPhiMgr->DestroyElements();
86 gRPhiMgr->SetCenter(x[0], x[1], x[2]);
87 gRPhiMgr->ImportElements(gGeomGentle);
88 gRPhiMgr->ImportElements(top);
89 }
90 if (gRhoZMgr && top) {
91 gRhoZMgr->DestroyElements();
92 gRhoZMgr->SetCenter(x[0], x[1], x[2]);
93 gRhoZMgr->ImportElements(gGeomGentle);
94 gRhoZMgr->ImportElements(top);
95 }
96
97 gROOT->ProcessLine("SplitGLView::UpdateSummary()");
319f3084 98}