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