Fix that should go with the last commit in EVE
[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{
effa8d5d 65 if (AliEveEventManager::HasRawReader())
66 its_raw();
de33999e 67 its_clusters();
68
effa8d5d 69 if (AliEveEventManager::HasRawReader())
70 tpc_raw();
de33999e 71 tpc_clusters();
72
f1fa3b4b 73 hmpid_clusters();
74
effa8d5d 75 if (AliEveEventManager::HasRawReader())
76 acorde_raw();
de33999e 77
78 primary_vertex();
79 esd_tracks();
80
81 AliESDEvent* esd = AliEveEventManager::AssertESD();
82 Double_t x[3];
83 esd->GetPrimaryVertex()->GetXYZ(x);
84
85 TEveElement* top = gEve->GetCurrentEvent();
86
87 if (gRPhiMgr && top) {
88 gRPhiMgr->DestroyElements();
89 gRPhiMgr->SetCenter(x[0], x[1], x[2]);
90 gRPhiMgr->ImportElements(gGeomGentle);
91 gRPhiMgr->ImportElements(top);
92 }
93 if (gRhoZMgr && top) {
94 gRhoZMgr->DestroyElements();
95 gRhoZMgr->SetCenter(x[0], x[1], x[2]);
96 gRhoZMgr->ImportElements(gGeomGentle);
97 gRhoZMgr->ImportElements(top);
98 }
99
100 gROOT->ProcessLine("SplitGLView::UpdateSummary()");
319f3084 101}