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