Fix enums as reported by coverity
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveMainWindow.cxx
CommitLineData
2e29a658 1#include <TG3DLine.h>
2#include <TGButton.h>
3#include <TGMenu.h>
4#include <TGPicture.h>
5#include <TGToolBar.h>
6#include <TGMsgBox.h>
7
8#include <TGrid.h>
9#include <TSystem.h>
10#include <TInterpreter.h>
11#include <TROOT.h>
12
13
14
15#include <TEveManager.h>
16#include <TEveSelection.h>
17
18#include <AliEveEventManager.h>
19#include <AliEveMultiView.h>
20#include <AliEveMacro.h>
21#include <AliEveMacroExecutor.h>
22#include <AliEveTrackFitter.h>
23#include <AliEveTrackCounter.h>
24
25#include "../alice-macros/geom_gentle.C"
26#include "../alice-macros/geom_gentle_trd.C"
27#include "../alice-macros/geom_gentle_muon.C"
28
29
30#include "AliEveMainWindow.h"
31#include "AliEveUtil.h"
32#include "AliEveFileDialog.h"
33
34#include <iostream>
35using namespace std;
36
37AliEveMainWindow::AliEveMainWindow(const char* title, UInt_t width, UInt_t height)
38 : TGMainFrame(gClient->GetRoot(), width, height),
39 fEve(0),
40 fFileDialog(0)
41{
42
43 AliEveUtil::Init();
44 fPicturePool = AliEveUtil::GetPicturePool();
45
46 static const TEveException kEH("AliEveMainWindow::AliEveMainWindow");
47
48 if(!fPicturePool) cout<< "Couldnt get a PicturePool"<<endl;
49
50
51 fEve = TEveManager::Create(kFALSE, "V");
52 gEve->GetDefaultViewer()->SetElementName("3D View");
53 gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound);
54 gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound);
55
56 TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
57 gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data()));
58
59 setupMenus();
60 setupToolbars();
61
62 TGFrame* viewFrame = gEve->GetDefaultViewer()->GetGUIFrame();
63 viewFrame->MapWindow();
64 viewFrame->ReparentWindow(this);
65
66 AddFrame(viewFrame, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY , 3, 3, 3, 3));
67
68 SetWindowName(title);
69 Resize(width,height);
70 MapSubwindows();
71 MapWindow();
72 Layout();
73
74 gEve->Redraw3D(kTRUE);
75 gSystem->ProcessEvents();
76}
77
78AliEveMainWindow::~AliEveMainWindow()
79{
80 if(fEve) delete fEve;
81}
82
83void AliEveMainWindow::onMenuFileItem(UInt_t id)
84{
85 switch(id){
86 case MENU_FILE_OPEN:
87 {
88 if(!fFileDialog) fFileDialog = new AliEveFileDialog( gClient->GetRoot(), this, kAliEveFDLocal);
89
90 fFileDialog->setMode(kAliEveFDLocal);
91 fFileDialog->MapWindow();
be736e6d 92
93 if(fFileDialog->accepted()) {
94 AliEveEventManager::SetESDFileName(fFileDialog->GetPathESD());
95 AliEveEventManager::SetESDfriendFileName(fFileDialog->GetPathESDfriend());
96 AliEveEventManager::SetAODFileName(fFileDialog->GetPathAOD());
97 AliEveEventManager::AddAODfriend(fFileDialog->GetPathAODfriend());
98 AliEveEventManager::SetRawFileName(fFileDialog->GetPathRaw());
99 AliEveEventManager::SetCdbUri(fFileDialog->GetCDBStoragePath());
100 loadFiles();
101 }
2e29a658 102 break;
103 }
104 case MENU_FILE_OPEN_URL:
105 {
106 if(!fFileDialog) fFileDialog = new AliEveFileDialog( gClient->GetRoot(), this, kAliEveFDRemote);
107
108 fFileDialog->setMode(kAliEveFDRemote);
109 fFileDialog->MapWindow();
be736e6d 110 if(fFileDialog->accepted()) {
111 AliEveEventManager::SetFilesPath(fFileDialog->GetUrl());
112 AliEveEventManager::SetCdbUri(fFileDialog->GetCDBStoragePath());
113
114
115
116 // Open event
117 if (fFileDialog->GetUrl().BeginsWith("alien:"))
118 {
119 if (gGrid != 0)
120 {
121 Info("AliEveMainWindow::openFile", "TGrid already initializied. Skiping checks and initialization.");
122 }
123 else
124 {
125 Info("AliEveMainWindow::openFile", "AliEn requested - connecting.");
126 if (gSystem->Getenv("GSHELL_ROOT") == 0)
127 {
128 Error("AliEveMainWindow::openFile", "AliEn environment not initialized. Aborting.");
129 new TGMsgBox(gClient->GetRoot(), this, "AliEve", "AliEn environment not initialized. Aborting.", kMBIconStop);
130 return;
131 }
132 if (TGrid::Connect("alien") == 0)
133 {
134 Error("AliEveMainWindow::openFile", "TGrid::Connect() failed. Aborting.");
135 new TGMsgBox(gClient->GetRoot(), this, "AliEve", "TGrid::Connect() failed. Aborting.", kMBIconStop);
136 return;
137 }
138 }
139 }
140
141 loadFiles();
142 }
2e29a658 143
144 break;
145 }
146 default:
147 {
148 break;
149 }
150 }
151}
152
153void AliEveMainWindow::onMenuEditItem(UInt_t id)
154{
155
156}
157
158void AliEveMainWindow::onMenuViewItem(UInt_t id)
159{
160
161}
162
163void AliEveMainWindow::onMenuGoItem(UInt_t id)
164{
165 switch(id){
166 case MENU_GO_NEXT_EVENT:
167 {
168 AliEveEventManager::GetMaster()->NextEvent();
169 break;
170 }
171 case MENU_GO_PREV_EVENT:
172 {
173 AliEveEventManager::GetMaster()->PrevEvent();
174 break;
175 }
176 default:
177 {
178 break;
179 }
180 }
181
182 TEveElement* top = gEve->GetCurrentEvent();
183
184 AliEveMultiView *mv = AliEveMultiView::Instance();
185
2e29a658 186 mv->ImportEventRPhi(top);
2e29a658 187 mv->ImportEventRhoZ(top);
188
189 gEve->Redraw3D(kTRUE);
190}
191
192void AliEveMainWindow::setupMenus()
193{
194 fMenuBar = new TGMenuBar(this);
195
196 // File Menu
197 fMenuFile = new TGPopupMenu(gClient->GetRoot());
198 fMenuFile->AddEntry("&Open...", MENU_FILE_OPEN, 0, fPicturePool->GetPicture("menu/document-open.png"));
199 fMenuFile->AddEntry("&Open URL...", MENU_FILE_OPEN_URL, 0, fPicturePool->GetPicture("menu/document-open-remote.png"));
200 fMenuFile->AddSeparator();
201 fMenuFile->AddEntry("&Connect To Server...", MENU_FILE_OPEN_CONNECTION, 0, fPicturePool->GetPicture("menu/network-connect.png"));
202 fMenuFile->AddSeparator();
203 fMenuFile->AddEntry("Export View(s)...", MENU_FILE_EXPORT_VIEWS, 0, fPicturePool->GetPicture("menu/document-export.png"));
204 fMenuFile->AddSeparator();
205 fMenuFile->AddEntry("E&xit", MENU_FILE_EXIT, 0, fPicturePool->GetPicture("menu/application-exit.png"));
206 // --
207
208 // Edit Menu
209 fMenuEdit = new TGPopupMenu(gClient->GetRoot());
210 fMenuEdit->AddEntry("&Undo", MENU_EDIT_UNDO, 0, fPicturePool->GetPicture("menu/edit-undo.png"));
211 fMenuEdit->AddEntry("&Redo", MENU_EDIT_REDO, 0, fPicturePool->GetPicture("menu/edit-redo.png"));
212 fMenuEdit->AddSeparator();
213 fMenuEdit->AddEntry("&Cut", MENU_EDIT_CUT, 0, fPicturePool->GetPicture("menu/edit-cut.png"));
214 fMenuEdit->AddEntry("C&opy", MENU_EDIT_COPY, 0, fPicturePool->GetPicture("menu/edit-copy.png"));
215 fMenuEdit->AddEntry("&Paste", MENU_EDIT_PASTE, 0, fPicturePool->GetPicture("menu/edit-paste.png"));
216 fMenuEdit->AddEntry("&Delete",MENU_EDIT_DELETE, 0, fPicturePool->GetPicture("menu/edit-delete.png"));
217 fMenuEdit->AddSeparator();
218 fMenuEdit->AddEntry("P&references", MENU_EDIT_PROP, 0, fPicturePool->GetPicture("menu/document-properties.png"));
219 // --
220
221 // View Menu
222 fMenuView = new TGPopupMenu(gClient->GetRoot());
223
224 fMenuViewToolbars = new TGPopupMenu(gClient->GetRoot());
225 fMenuViewToolbars->AddEntry("&Main Toolbar", MENU_VIEW_TOOLBAR_MAIN);
226 fMenuViewToolbars->AddEntry("&Navigation Toolbar", MENU_VIEW_TOOLBAR_NAV);
227 fMenuView->AddPopup("Toolbars", fMenuViewToolbars);
228
229 fMenuViewSidebars = new TGPopupMenu(gClient->GetRoot());
230 fMenuViewSidebars->AddEntry("Hi&story", MENU_VIEW_TOOLBAR_HIST);
231 fMenuViewSidebars->AddEntry("&Properties", MENU_VIEW_TOOLBAR_NAV);
232 fMenuView->AddPopup("Sidebars", fMenuViewSidebars);
233
234 fMenuView->AddSeparator();
235 fMenuView->AddEntry("&Reload", MENU_VIEW_RELOAD, 0, fPicturePool->GetPicture("menu/view-refresh.png"));
236 fMenuView->AddSeparator();
237 fMenuView->AddEntry("Zoom &In", MENU_VIEW_ZOOM_IN, 0, fPicturePool->GetPicture("menu/zoom-in.png"));
238 fMenuView->AddEntry("Zoom &Out",MENU_VIEW_ZOOM_OUT, 0, fPicturePool->GetPicture("menu/zoom-out.png"));
239 fMenuView->AddEntry("Zoom &Reset",MENU_VIEW_ZOOM_RESET, 0, fPicturePool->GetPicture("menu/zoom-original.png"));
240 // --
241
242 // Go Menu
243 fMenuGo = new TGPopupMenu(gClient->GetRoot());
244 fMenuGo->AddEntry("&Next Event", MENU_GO_NEXT_EVENT, 0, fPicturePool->GetPicture("navigation/media-seek-forward.png"));
245 fMenuGo->AddEntry("P&revious Event", MENU_GO_PREV_EVENT, 0, fPicturePool->GetPicture("navigation/media-seek-backward.png"));
246 fMenuGo->AddSeparator();
247 fMenuGo->AddEntry("&First Event", MENU_GO_FIRST_EVENT,0, fPicturePool->GetPicture("navigation/media-skip-backward.png"));
248 fMenuGo->AddEntry("&Last Event", MENU_GO_LAST_EVENT, 0, fPicturePool->GetPicture("navigation/media-skip-forward.png"));
249 fMenuGo->AddSeparator();
250 fMenuGo->AddEntry("&Play", MENU_GO_PLAY, 0, fPicturePool->GetPicture("navigation/media-playback-start.png"));
251 // --
252
253 // Tools Menu
254 fMenuTools = new TGPopupMenu(gClient->GetRoot());
255 fMenuTools->AddEntry("&QA Histograms", MENU_TOOLS_QA);
256 fMenuTools->AddEntry("&Macros", MENU_TOOLS_MACROS);
257 // --
258
259 // Help Menu
260 fMenuHelp = new TGPopupMenu(gClient->GetRoot());
261 fMenuHelp->AddEntry("&Contents", MENU_HELP_CONTENTS, 0, fPicturePool->GetPicture("menu/help-contents.png"));
262 fMenuHelp->AddEntry("&About", MENU_HELP_ABOUT, 0, fPicturePool->GetPicture("menu/help-about.png"));
263 // --
264
265 // Add popupmenus to MenuBar
266 fMenuBar->AddPopup("&File", fMenuFile, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
267 fMenuBar->AddPopup("&Edit", fMenuEdit, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
268 fMenuBar->AddPopup("&View", fMenuView, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
269 fMenuBar->AddPopup("&Go", fMenuGo, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
270 fMenuBar->AddPopup("&Tools", fMenuTools, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
271 fMenuBar->AddPopup("&Help", fMenuHelp, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
272
273 // MenuBar to the window
274 AddFrame(fMenuBar, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX));
275
276 // Menu signals
277 fMenuFile->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuFileItem(Int_t)");
278 fMenuEdit->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuEditItem(Int_t)");
279 fMenuView->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuViewItem(Int_t)");
280 fMenuGo->Connect("Activated(Int_t)", "AliEveMainWindow", this, "onMenuGoItem(Int_t)");
281}
282
283void AliEveMainWindow::setupToolbars()
284{
285 TGMenuEntry* tmpMenuEntry;
286
287 fToolBar = new TGToolBar(this);
288
289 tmpMenuEntry = fMenuFile->GetEntry("Open...");
290 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
291 tmpMenuEntry = fMenuFile->GetEntry("Open URL...");
292 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
293 tmpMenuEntry = fMenuFile->GetEntry("Connect To Server...");
294 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
295 tmpMenuEntry = fMenuFile->GetEntry("Export View(s)...");
296 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
297
298 fToolBar->AddFrame(new TGVertical3DLine(fToolBar), new TGLayoutHints(kLHintsExpandY));
299
300 tmpMenuEntry = fMenuView->GetEntry("Reload");
301 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
302 tmpMenuEntry = fMenuView->GetEntry("Zoom In");
303 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
304 tmpMenuEntry = fMenuView->GetEntry("Zoom Out");
305 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
306 tmpMenuEntry = fMenuView->GetEntry("Zoom Reset");
307 fToolBar->AddButton(this, new TGPictureButton(fToolBar, tmpMenuEntry->GetPic(), tmpMenuEntry->GetEntryId() ));
308
309
310
311
312 AddFrame(new TGHorizontal3DLine(this), new TGLayoutHints(kLHintsExpandX));
313 AddFrame(fToolBar, new TGLayoutHints(kLHintsNormal));
314 AddFrame(new TGHorizontal3DLine(this), new TGLayoutHints(kLHintsExpandX));
315
316
317
318 //fToolBar->Connect("Clicked(Int_t)", "RCMainWindow", this, "openFile()");
319}
320
be736e6d 321void AliEveMainWindow::loadFiles()
2e29a658 322{
2e29a658 323 TString name("Event"); // CINT has trouble with direct "Event".
be736e6d 324 new AliEveEventManager(name, 0);
2e29a658 325 gEve->AddEvent(AliEveEventManager::GetMaster());
326
327 TEveUtil::AssertMacro("VizDB_scan.C");
328
329 AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();
330 //==============================================================================
331 // Geometry, scenes, projections and viewers
332 //==============================================================================
333
334 AliEveMultiView *mv = new AliEveMultiView;
335
336 mv->SetDepth(-10);
337
338 TEveUtil::LoadMacro("geom_gentle.C");
339 mv->InitGeomGentle(geom_gentle(), geom_gentle_rphi(), geom_gentle_rhoz(), 0);
340
341
342 TEveUtil::LoadMacro("geom_gentle_trd.C");
343 mv->InitGeomGentleTrd(geom_gentle_trd());
344
345 TEveUtil::LoadMacro("geom_gentle_muon.C");
346 mv->InitGeomGentleMuon(geom_gentle_muon(kFALSE), kTRUE, kTRUE, kFALSE);
347
348 mv->SetDepth(0);
349
350 //==============================================================================
351 // Registration of per-event macros
352 //==============================================================================
353
354 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Track", "kine_tracks.C", "kine_tracks", "", kFALSE));
355
356 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits ITS", "its_hits.C", "its_hits", "", kFALSE));
357 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits TPC", "tpc_hits.C", "tpc_hits", "", kFALSE));
358 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits T0", "t0_hits.C", "t0_hits", "", kFALSE));
359 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits FMD", "fmd_hits.C", "fmd_hits", "", kFALSE));
360 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits ACORDE", "acorde_hits.C", "acorde_hits", "", kFALSE));
361 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits EMCAL", "emcal_hits.C", "emcal_hits", "", kFALSE));
362 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits TOF", "tof_hits.C", "tof_hits", "", kFALSE));
363 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits TRD", "trd_hits.C", "trd_hits", "", kFALSE));
364 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hits VZERO", "vzero_hits.C", "vzero_hits", "", kFALSE));
365
366 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG ITS", "its_digits.C", "its_digits", "", kFALSE));
367 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG TPC", "tpc_digits.C", "tpc_digits", "", kFALSE));
368 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG TOF", "tof_digits.C", "tof_digits", "", kFALSE));
369 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG HMPID", "hmpid_digits.C","hmpid_digits","", kFALSE));
370 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG FMD", "fmd_digits.C", "fmd_digits", "", kFALSE));
371
372 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ITS", "its_raw.C", "its_raw", "", kFALSE));
373 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TPC", "tpc_raw.C", "tpc_raw", "", kFALSE));
374 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TOF", "tof_raw.C", "tof_raw", "", kFALSE));
375 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW HMPID", "hmpid_raw.C", "hmpid_raw", "", kFALSE));
376 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW T0", "t0_raw.C", "t0_raw", "", kFALSE));
377 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW FMD", "fmd_raw.C", "fmd_raw", "", kFALSE));
378 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW VZERO", "vzero_raw.C", "vzero_raw", "", kFALSE));
379 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ACORDE", "acorde_raw.C", "acorde_raw", "", kFALSE));
380
381 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX", "primary_vertex.C", "primary_vertex", "", kTRUE));
382 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse", "", kTRUE));
383 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box", "primary_vertex.C", "primary_vertex_box", "kFALSE, 3, 3, 3", kFALSE));
384 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX SPD", "primary_vertex.C", "primary_vertex_spd", "", kTRUE));
385 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse SPD", "primary_vertex.C", "primary_vertex_ellipse_spd", "", kTRUE));
386 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box SPD", "primary_vertex.C", "primary_vertex_box_spd", "kFALSE, 3, 3, 3", kFALSE));
387 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX TPC", "primary_vertex.C", "primary_vertex_tpc", "", kFALSE));
388 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse TPC", "primary_vertex.C", "primary_vertex_ellipse_tpc", "", kFALSE));
389 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box TPC", "primary_vertex.C", "primary_vertex_box_tpc", "kFALSE, 3, 3, 3", kFALSE));
390
391 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0", "esd_V0_points.C", "esd_V0_points_onfly"));
392 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0", "esd_V0_points.C", "esd_V0_points_offline"));
393 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0", "esd_V0.C", "esd_V0"));
394 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC CSCD", "esd_cascade_points.C", "esd_cascade_points"));
395 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC CSCD", "esd_cascade.C", "esd_cascade"));
396 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC KINK", "esd_kink_points.C", "esd_kink_points"));
397 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC KINK", "esd_kink.C", "esd_kink"));
398
399 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks", "esd_tracks.C", "esd_tracks", "", kFALSE));
400 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks ITS standalone", "esd_tracks.C", "esd_tracks_ITS_standalone", "", kFALSE));
401 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks ITS", "esd_tracks.C", "esd_tracks_ITS", "", kFALSE));
402 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks TPC", "esd_tracks.C", "esd_tracks_TPC", "", kFALSE));
403 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks MI", "esd_tracks.C", "esd_tracks_MI", "", kFALSE));
404 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks by category", "esd_tracks.C", "esd_tracks_by_category", "", kTRUE));
405 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks by anal cuts", "esd_tracks.C", "esd_tracks_by_anal_cuts", "", kFALSE));
406 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks Lego", "lego.C", "lego", "", kFALSE));
407 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks Beams Info", "beams_info.C", "beams_info", "", kFALSE));
408
409 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracklets SPD", "esd_spd_tracklets.C", "esd_spd_tracklets", "", kTRUE));
410
411 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC ZDC", "esd_zdc.C", "esd_zdc", "", kFALSE));
412
413 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters", "clusters.C", "clusters", "", kFALSE));
414 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters ITS", "its_clusters.C", "its_clusters"));
415 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TPC", "tpc_clusters.C", "tpc_clusters"));
416 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TRD", "trd_clusters.C", "trd_clusters"));
417 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TOF", "tof_clusters.C", "tof_clusters"));
418 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters HMPID", "hmpid_clusters.C", "hmpid_clusters"));
419 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters PHOS", "phos_clusters.C", "phos_clusters"));
420
421 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters TPC", "vplot_tpc.C", "vplot_tpc", "", kFALSE));
422
423 exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA HF", "aod_HF.C", "aod_HF", "", kFALSE));
424 exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA Jets", "jetplane.C", "jetplane", "", kFALSE));
425
426 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "DUMP VZERO", "vzero_dump.C", "vzero_dump", "", kFALSE));
427
428
429 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM TrackRef MUON", "muon_trackRefs.C", "muon_trackRefs", "kTRUE", kFALSE));
430 exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW MUON", "muon_raw.C", "muon_raw", "", kFALSE));
431 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG MUON", "muon_digits.C", "muon_digits", "", kFALSE));
432 exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clusters MUON", "muon_clusters.C", "muon_clusters", "", kTRUE));
433 exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracks MUON", "esd_muon_tracks.C", "esd_muon_tracks", "kTRUE,kFALSE", kTRUE));
434
435
436 //==============================================================================
437 // AliEve objects - global tools
438 //==============================================================================
439
440 AliEveTrackFitter* fitter = new AliEveTrackFitter();
441 gEve->AddToListTree(fitter, 1);
442 gEve->AddElement(fitter, gEve->GetEventScene());
443
444 AliEveTrackCounter* g_trkcnt = new AliEveTrackCounter("Primary Counter");
445 gEve->AddToListTree(g_trkcnt, kFALSE);
446
447 // A refresh to show proper window.
448 //gEve->GetViewers()->SwitchColorSet();
449 gEve->Redraw3D(kTRUE);
450 gSystem->ProcessEvents();
451
452 // Register command to call on each event.
453 // AliEveEventManager::GetMaster()->AddNewEventCommand("on_new_event();");
454 AliEveEventManager::GetMaster()->GotoEvent(0);
455
456 gEve->Redraw3D(kTRUE);
457}
458