fixed warnings in TPC code
[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++");
de33999e 19
20 gROOT->LoadMacro("acorde_raw.C");
21 gROOT->LoadMacro("its_raw.C");
22 gROOT->LoadMacro("tpc_raw.C");
23
a9e18d1c 24 TEveUtil::AssertMacro("VizDB_scan.C");
25
2a8440b7 26 // Temp fix !!!
27 TGeoManager *man = gGeoManager;
de33999e 28 gGeomGentle = geom_gentle();
2a8440b7 29 // Temp fix !!!
30 gGeoManager = man;
de33999e 31
dc9dec4d 32 gROOT->ProcessLine(".L SplitGLView.C++g"); // !!!! debug-mode
de33999e 33 TEveBrowser* browser = gEve->GetBrowser();
34 browser->ExecPlugin("SplitGLView", 0, "new SplitGLView(gClient->GetRoot(), 600, 450, kTRUE)");
35
36 if (gRPhiMgr) {
37 TEveProjectionAxes* a = new TEveProjectionAxes(gRPhiMgr);
38 a->SetNumTickMarks(3);
39 a->SetText("R-Phi");
40 a->SetFontFile("comicbd");
41 a->SetFontSize(10);
42 gEve->GetScenes()->FindChild("R-Phi Projection")->AddElement(a);
43 }
44 if (gRhoZMgr) {
45 TEveProjectionAxes* a = new TEveProjectionAxes(gRhoZMgr);
46 a->SetNumTickMarks(3);
47 a->SetText("Rho-Z");
48 a->SetFontFile("comicbd");
49 a->SetFontSize(10);
50 gEve->GetScenes()->FindChild("Rho-Z Projection")->AddElement(a);
51 }
52
47aab29b 53 TEveBrowser* browser = gEve->GetBrowser();
54
55 browser->StartEmbedding(TRootBrowser::kBottom);
4d62585e 56 new AliEveEventManagerWindow(AliEveEventManager::GetMaster());
47aab29b 57 browser->StopEmbedding("EventCtrl");
58
de33999e 59 gEve->Redraw3D(kTRUE);
60}
61
62void alieve_online_on_new_event()
63{
de33999e 64 its_raw();
65 its_clusters();
66
67 tpc_raw();
68 tpc_clusters();
69
70 acorde_raw();
71
72 primary_vertex();
73 esd_tracks();
74
75 AliESDEvent* esd = AliEveEventManager::AssertESD();
76 Double_t x[3];
77 esd->GetPrimaryVertex()->GetXYZ(x);
78
79 TEveElement* top = gEve->GetCurrentEvent();
80
81 if (gRPhiMgr && top) {
82 gRPhiMgr->DestroyElements();
83 gRPhiMgr->SetCenter(x[0], x[1], x[2]);
84 gRPhiMgr->ImportElements(gGeomGentle);
85 gRPhiMgr->ImportElements(top);
86 }
87 if (gRhoZMgr && top) {
88 gRhoZMgr->DestroyElements();
89 gRhoZMgr->SetCenter(x[0], x[1], x[2]);
90 gRhoZMgr->ImportElements(gGeomGentle);
91 gRhoZMgr->ImportElements(top);
92 }
93
94 gROOT->ProcessLine("SplitGLView::UpdateSummary()");
319f3084 95}