Changing the number of lines in the DAQ logbook_shuttle table
[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
2a6fc1f9 7class TEveProjectionManager;
8class TEveGeoShape;
9class TEveUtil;
10
2a6fc1f9 11Bool_t gCenterProjectionsAtPrimaryVertex = kFALSE;
12
3545fba9 13
de33999e 14void 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
de33999e 74 gEve->Redraw3D(kTRUE);
75}
76
77void alieve_online_on_new_event()
78{
effa8d5d 79 if (AliEveEventManager::HasRawReader())
80 its_raw();
de33999e 81 its_clusters();
82
effa8d5d 83 if (AliEveEventManager::HasRawReader())
84 tpc_raw();
de33999e 85 tpc_clusters();
86
95a0b764 87 if (AliEveEventManager::HasRawReader())
88 tof_raw();
89 tof_clusters();
90
f1fa3b4b 91 hmpid_clusters();
92
effa8d5d 93 if (AliEveEventManager::HasRawReader())
94 acorde_raw();
de33999e 95
0cf37c7b 96 if (AliEveEventManager::HasRawReader())
97 vzero_raw();
98
38aefcea 99 emcal_digits();
100
de33999e 101 primary_vertex();
102 esd_tracks();
103
44c97b40 104 // Disabled due to memory leaks
105 // if (AliEveEventManager::HasESDfriend()) trd_tracks();
106 // AliSysInfo::AddStamp("EveTRDTr");
9fb2a3ed 107 trd_detectors();
108
de33999e 109 AliESDEvent* esd = AliEveEventManager::AssertESD();
110 Double_t x[3];
111 esd->GetPrimaryVertex()->GetXYZ(x);
112
113 TEveElement* top = gEve->GetCurrentEvent();
114
3545fba9 115 gMultiView->DestroyEventRPhi();
116 if (gCenterProjectionsAtPrimaryVertex)
117 gMultiView->SetCenterRPhi(x[0], x[1], x[2]);
118 gMultiView->ImportEventRPhi(top);
119
120 gMultiView->DestroyEventRhoZ();
121 if (gCenterProjectionsAtPrimaryVertex)
122 gMultiView->SetCenterRhoZ(x[0], x[1], x[2]);
123 gMultiView->ImportEventRhoZ(top);
319f3084 124}