x->DropAllSectors();
x->LoadRaw(input, kTRUE, kTRUE);
+ TEveElementList* sec2d = new TEveElementList("TPC 2D");
+ gEve->AddElement(sec2d);
+
+ TEveElementList* sec3d = new TEveElementList("TPC 3D");
+ gEve->AddElement(sec3d);
+
for (Int_t i=0; i<=35; ++i) {
if (mode & 1) {
- s = new AliEveTPCSector2D();
+ s = new AliEveTPCSector2D(Form("2D sector %d",i));
s->SetSectorID(i);
s->SetAutoTrans(kTRUE); // place on proper 3D coordinates
s->SetDataSource(x);
s->SetFrameColor(36);
- gEve->AddElement(s);
+ sec2d->AddElement(s);
s->IncRTS();
}
if (mode & 2) {
- t = new AliEveTPCSector3D();
+ t = new AliEveTPCSector3D(Form("3D sector %d",i));
t->SetSectorID(i);
t->SetAutoTrans(kTRUE);
t->SetDataSource(x);
t->SetMinTime(40);
t->SetMaxTime(980);
t->SetDriftVel(2.273);
- gEve->AddElement(t);
+ sec3d->AddElement(t);
t->IncRTS();
}
}
* full copyright notice. *
**************************************************************************/
-void alieve_online()
+TEveGeoShape *gGeomGentle = 0;
+
+void alieve_online_init()
{
- // List of macros to be executed
- gROOT->Macro("its_raw.C");
- gROOT->Macro("its_clusters.C");
- gROOT->Macro("tpc_raw.C");
- gROOT->Macro("tpc_clusters.C");
- gROOT->Macro("acorde_raw.C");
- gROOT->Macro("esd_tracks.C");
+ gROOT->LoadMacro("geom_gentle.C");
+
+ gROOT->LoadMacro("primary_vertex.C");
+ gROOT->LoadMacro("esd_tracks.C");
+
+ gROOT->LoadMacro("its_clusters.C+");
+ gROOT->LoadMacro("tpc_clusters.C+");
+ gROOT->LoadMacro("trd_clusters.C+");
+
+ gROOT->LoadMacro("acorde_raw.C");
+ gROOT->LoadMacro("its_raw.C");
+ gROOT->LoadMacro("tpc_raw.C");
+
+ gGeomGentle = geom_gentle();
+
+ gROOT->ProcessLine(".L SplitGLView.C+g"); // !!!! debug-mode
+ TEveBrowser* browser = gEve->GetBrowser();
+ browser->ExecPlugin("SplitGLView", 0, "new SplitGLView(gClient->GetRoot(), 600, 450, kTRUE)");
+
+ if (gRPhiMgr) {
+ TEveProjectionAxes* a = new TEveProjectionAxes(gRPhiMgr);
+ a->SetNumTickMarks(3);
+ a->SetText("R-Phi");
+ a->SetFontFile("comicbd");
+ a->SetFontSize(10);
+ gEve->GetScenes()->FindChild("R-Phi Projection")->AddElement(a);
+ }
+ if (gRhoZMgr) {
+ TEveProjectionAxes* a = new TEveProjectionAxes(gRhoZMgr);
+ a->SetNumTickMarks(3);
+ a->SetText("Rho-Z");
+ a->SetFontFile("comicbd");
+ a->SetFontSize(10);
+ gEve->GetScenes()->FindChild("Rho-Z Projection")->AddElement(a);
+ }
+
+ gEve->Redraw3D(kTRUE);
+}
+
+void alieve_online_on_new_event()
+{
+
+ its_raw();
+ its_clusters();
+
+ tpc_raw();
+ tpc_clusters();
+
+ acorde_raw();
+
+ primary_vertex();
+ esd_tracks();
+
+ AliESDEvent* esd = AliEveEventManager::AssertESD();
+ Double_t x[3];
+ esd->GetPrimaryVertex()->GetXYZ(x);
+
+ TEveElement* top = gEve->GetCurrentEvent();
+
+ if (gRPhiMgr && top) {
+ gRPhiMgr->DestroyElements();
+ gRPhiMgr->SetCenter(x[0], x[1], x[2]);
+ gRPhiMgr->ImportElements(gGeomGentle);
+ gRPhiMgr->ImportElements(top);
+ }
+ if (gRhoZMgr && top) {
+ gRhoZMgr->DestroyElements();
+ gRhoZMgr->SetCenter(x[0], x[1], x[2]);
+ gRhoZMgr->ImportElements(gGeomGentle);
+ gRhoZMgr->ImportElements(top);
+ }
+
+ gROOT->ProcessLine("SplitGLView::UpdateSummary()");
}