]>
Commit | Line | Data |
---|---|---|
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 | ||
7 | class TEveProjectionManager; | |
8 | class TEveGeoShape; | |
9 | class TEveUtil; | |
10 | ||
11 | Bool_t gCenterProjectionsAtPrimaryVertex = kFALSE; | |
12 | ||
13 | ||
14 | void alieve_online_init() | |
15 | { | |
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 | } | |
21 | ||
22 | gROOT->LoadMacro("primary_vertex.C"); | |
23 | gROOT->LoadMacro("esd_tracks.C"); | |
24 | // Disabled due to memory leaks | |
25 | // gROOT->LoadMacro("trd_tracks.C++"); | |
26 | gROOT->LoadMacro("trd_detectors.C++"); | |
27 | ||
28 | gROOT->LoadMacro("its_clusters.C++"); | |
29 | gROOT->LoadMacro("tpc_clusters.C++"); | |
30 | gROOT->LoadMacro("tof_clusters.C++"); | |
31 | gROOT->LoadMacro("hmpid_clusters.C++"); | |
32 | gROOT->LoadMacro("emcal_digits.C++"); | |
33 | ||
34 | gROOT->LoadMacro("acorde_raw.C"); | |
35 | gROOT->LoadMacro("its_raw.C"); | |
36 | gROOT->LoadMacro("tpc_raw.C"); | |
37 | gROOT->LoadMacro("tof_raw.C"); | |
38 | gROOT->LoadMacro("vzero_raw.C"); | |
39 | ||
40 | TEveUtil::AssertMacro("VizDB_scan.C"); | |
41 | ||
42 | TEveBrowser *browser = gEve->GetBrowser(); | |
43 | browser->ShowCloseTab(kFALSE); | |
44 | ||
45 | // Gentle-geom loading changes gGeoManager. | |
46 | TEveGeoManagerHolder mgrRestore; | |
47 | ||
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. | |
56 | ||
57 | browser->GetTabRight()->SetTab(1); | |
58 | ||
59 | browser->StartEmbedding(TRootBrowser::kBottom); | |
60 | new AliEveEventManagerWindow(AliEveEventManager::GetMaster()); | |
61 | browser->StopEmbedding("EventCtrl"); | |
62 | ||
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 | ||
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 | ||
84 | gEve->Redraw3D(kTRUE); | |
85 | } | |
86 | ||
87 | void alieve_online_on_new_event() | |
88 | { | |
89 | if (AliEveEventManager::HasRawReader()) | |
90 | its_raw(); | |
91 | its_clusters(); | |
92 | ||
93 | if (AliEveEventManager::HasRawReader()) | |
94 | tpc_raw(); | |
95 | tpc_clusters(); | |
96 | ||
97 | if (AliEveEventManager::HasRawReader()) | |
98 | tof_raw(); | |
99 | tof_clusters(); | |
100 | ||
101 | hmpid_clusters(); | |
102 | ||
103 | if (AliEveEventManager::HasRawReader()) | |
104 | acorde_raw(); | |
105 | ||
106 | if (AliEveEventManager::HasRawReader()) | |
107 | vzero_raw(); | |
108 | ||
109 | emcal_digits(); | |
110 | ||
111 | primary_vertex(); | |
112 | esd_tracks(); | |
113 | ||
114 | // Disabled due to memory leaks | |
115 | // if (AliEveEventManager::HasESDfriend()) trd_tracks(); | |
116 | // AliSysInfo::AddStamp("EveTRDTr"); | |
117 | trd_detectors(); | |
118 | ||
119 | AliESDEvent* esd = AliEveEventManager::AssertESD(); | |
120 | Double_t x[3]; | |
121 | esd->GetPrimaryVertex()->GetXYZ(x); | |
122 | ||
123 | TEveElement* top = gEve->GetCurrentEvent(); | |
124 | ||
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); | |
134 | } |