]>
Commit | Line | Data |
---|---|---|
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 | ||
2a6fc1f9 | 7 | class TEveProjectionManager; |
8 | class TEveGeoShape; | |
9 | class TEveUtil; | |
10 | ||
2a6fc1f9 | 11 | Bool_t gCenterProjectionsAtPrimaryVertex = kFALSE; |
12 | ||
3545fba9 | 13 | |
de33999e | 14 | void alieve_online_init() |
319f3084 | 15 | { |
3545fba9 | 16 | if (gROOT->LoadMacro("MultiView.C+") != 0) |
17 | { | |
18 | gEnv->SetValue("Root.Stacktrace", "no"); | |
19 | Fatal("alieve_online.C", "Failed loading MultiView.C in compiled mode."); | |
20 | } | |
de33999e | 21 | |
22 | gROOT->LoadMacro("primary_vertex.C"); | |
23 | gROOT->LoadMacro("esd_tracks.C"); | |
44c97b40 | 24 | // Disabled due to memory leaks |
25 | // gROOT->LoadMacro("trd_tracks.C++"); | |
9fb2a3ed | 26 | gROOT->LoadMacro("trd_detectors.C++"); |
de33999e | 27 | |
dc9dec4d | 28 | gROOT->LoadMacro("its_clusters.C++"); |
29 | gROOT->LoadMacro("tpc_clusters.C++"); | |
95a0b764 | 30 | gROOT->LoadMacro("tof_clusters.C++"); |
f1fa3b4b | 31 | gROOT->LoadMacro("hmpid_clusters.C++"); |
38aefcea | 32 | gROOT->LoadMacro("emcal_digits.C++"); |
de33999e | 33 | |
34 | gROOT->LoadMacro("acorde_raw.C"); | |
35 | gROOT->LoadMacro("its_raw.C"); | |
36 | gROOT->LoadMacro("tpc_raw.C"); | |
95a0b764 | 37 | gROOT->LoadMacro("tof_raw.C"); |
0cf37c7b | 38 | gROOT->LoadMacro("vzero_raw.C"); |
de33999e | 39 | |
a9e18d1c | 40 | TEveUtil::AssertMacro("VizDB_scan.C"); |
41 | ||
06f4984c | 42 | TEveBrowser *browser = gEve->GetBrowser(); |
2a6fc1f9 | 43 | browser->ShowCloseTab(kFALSE); |
44 | ||
3545fba9 | 45 | // Gentle-geom loading changes gGeoManager. |
46 | TEveGeoManagerHolder mgrRestore; | |
2a6fc1f9 | 47 | |
3545fba9 | 48 | gMultiView = new MultiView; |
49 | ||
50 | TEveUtil::LoadMacro("geom_gentle.C"); | |
51 | gMultiView->InitGeomGentle(geom_gentle(), | |
52 | geom_gentle_rphi(), | |
53 | geom_gentle_rhoz()); | |
54 | ||
55 | // See visscan_init.C for how to add TRD / MUON geometry. | |
2a6fc1f9 | 56 | |
14a4b686 | 57 | browser->GetTabRight()->SetTab(1); |
de33999e | 58 | |
47aab29b | 59 | browser->StartEmbedding(TRootBrowser::kBottom); |
4d62585e | 60 | new AliEveEventManagerWindow(AliEveEventManager::GetMaster()); |
47aab29b | 61 | browser->StopEmbedding("EventCtrl"); |
62 | ||
06f4984c | 63 | browser->MoveResize(0, 0, gClient->GetDisplayWidth(), |
64 | gClient->GetDisplayHeight() - 32); | |
65 | ||
66 | gEve->GetViewers()->SwitchColorSet(); | |
67 | ||
68 | TString autoRun(gSystem->Getenv("ONLINERECO_AUTORUN")); | |
69 | if (autoRun == "1" || autoRun.CompareTo("true", TString::kIgnoreCase) == 0) | |
70 | { | |
71 | AliEveEventManager::GetMaster()->SetAutoLoad(kTRUE); | |
72 | } | |
73 | ||
1110f3fe | 74 | { |
75 | TGTab *tab = gEve->GetBrowser()->GetTab(2); | |
76 | ||
77 | TGHorizontalFrame *hf = (TGHorizontalFrame*) tab->GetParent(); | |
78 | TGVerticalFrame *vf = (TGVerticalFrame*) hf ->GetParent(); | |
79 | ||
80 | hf->Resize(hf->GetWidth(), hf->GetHeight() + 80); | |
81 | vf->Layout(); | |
82 | } | |
83 | ||
de33999e | 84 | gEve->Redraw3D(kTRUE); |
85 | } | |
86 | ||
87 | void alieve_online_on_new_event() | |
88 | { | |
effa8d5d | 89 | if (AliEveEventManager::HasRawReader()) |
90 | its_raw(); | |
de33999e | 91 | its_clusters(); |
92 | ||
effa8d5d | 93 | if (AliEveEventManager::HasRawReader()) |
94 | tpc_raw(); | |
de33999e | 95 | tpc_clusters(); |
96 | ||
95a0b764 | 97 | if (AliEveEventManager::HasRawReader()) |
98 | tof_raw(); | |
99 | tof_clusters(); | |
100 | ||
f1fa3b4b | 101 | hmpid_clusters(); |
102 | ||
effa8d5d | 103 | if (AliEveEventManager::HasRawReader()) |
104 | acorde_raw(); | |
de33999e | 105 | |
0cf37c7b | 106 | if (AliEveEventManager::HasRawReader()) |
107 | vzero_raw(); | |
108 | ||
38aefcea | 109 | emcal_digits(); |
110 | ||
de33999e | 111 | primary_vertex(); |
112 | esd_tracks(); | |
113 | ||
44c97b40 | 114 | // Disabled due to memory leaks |
115 | // if (AliEveEventManager::HasESDfriend()) trd_tracks(); | |
116 | // AliSysInfo::AddStamp("EveTRDTr"); | |
9fb2a3ed | 117 | trd_detectors(); |
118 | ||
de33999e | 119 | AliESDEvent* esd = AliEveEventManager::AssertESD(); |
120 | Double_t x[3]; | |
121 | esd->GetPrimaryVertex()->GetXYZ(x); | |
122 | ||
123 | TEveElement* top = gEve->GetCurrentEvent(); | |
124 | ||
3545fba9 | 125 | gMultiView->DestroyEventRPhi(); |
126 | if (gCenterProjectionsAtPrimaryVertex) | |
127 | gMultiView->SetCenterRPhi(x[0], x[1], x[2]); | |
128 | gMultiView->ImportEventRPhi(top); | |
129 | ||
130 | gMultiView->DestroyEventRhoZ(); | |
131 | if (gCenterProjectionsAtPrimaryVertex) | |
132 | gMultiView->SetCenterRhoZ(x[0], x[1], x[2]); | |
133 | gMultiView->ImportEventRhoZ(top); | |
319f3084 | 134 | } |