More / better geometries and VizDBs.
Add saving pictures in high resolution (people had problems with it),
saving/loading DataSelection macros and VizDB macros.
#include <AliEveMultiView.h>
#include <TEveManager.h>
#include <TEveBrowser.h>
+#include <TEveWindow.h>
#include <TGFileDialog.h>
#include <TGMenu.h>
+#include "AliEveEventManager.h"
+#include "AliEveMacroExecutor.h"
+#include "AliEveMacroExecutorWindow.h"
+#include "AliEveMacro.h"
+
class AliEveMacroExecutor;
class TEveProjectionManager;
class TEveGeoShape;
{
enum EAliEveMenu_e
{
- kAEMSave, kAEMLoad, kAEMDefault, kAEMScreen, kAEMProjector, kAEMTransparentDark, kAEMTransparentLight, kAEMTransparentMonoDark, kAEMTransparentMonoLight, kAEMTpc
+ kAEMDefault, kAEMScreen, kAEMProjector, kAEMNotransparency, kAEMTransparentDark, kAEMTransparentLight, kAEMTransparentMonoDark, kAEMTransparentMonoLight, kAEMGreen, kAEMBright, kAEMYellow, kAEMTpc, kAEMAll, kAEM3d, kAEMRphi, kAEMRhoz, kAEMAllhr, kAEM3dhr, kAEMRphihr, kAEMRhozhr, kAEMSavemacros, kAEMLoadmacros, kAEMSave, kAEMOpen
};
}
// Expected TEveManager is already initialized.
fAliEvePopup = new TGPopupMenu(gClient->GetRoot());
- fAliEvePopup->AddEntry("&Save", kAEMSave);
- fAliEvePopup->AddEntry("&Load", kAEMLoad);
-
- fAliEvePopup->AddSeparator();
fAliEvePopup->AddEntry("&Default", kAEMDefault);
fAliEvePopup->AddEntry("&Screen", kAEMScreen);
fAliEvePopup->AddSeparator();
+ fAliEvePopup->AddEntry("&Low transparency", kAEMNotransparency);
+
+ fAliEvePopup->AddSeparator();
+
fAliEvePopup->AddEntry("&Transparent screen", kAEMTransparentDark);
fAliEvePopup->AddEntry("&Transparent projector", kAEMTransparentLight);
fAliEvePopup->AddEntry("&Transparent mono dark", kAEMTransparentMonoDark);
fAliEvePopup->AddSeparator();
- fAliEvePopup->AddEntry("&TPC", kAEMTpc);
+ fAliEvePopup->AddEntry("&First collision setup", kAEMGreen);
+ fAliEvePopup->AddEntry("&Bright", kAEMBright);
+
+ fAliEvePopup->AddSeparator();
+
+ fAliEvePopup->AddEntry("&TPC Yellow", kAEMYellow);
+ fAliEvePopup->AddEntry("&TPC Blue", kAEMTpc);
+
+ fAliEvePopup->AddSeparator();
+ fAliEvePopup->AddSeparator();
+ fAliEvePopup->AddSeparator();
+
+ fAliEvePopup->AddEntry("&Save all views", kAEMAll);
+ fAliEvePopup->AddEntry("&Save 3D View", kAEM3d);
+ fAliEvePopup->AddEntry("&Save RPhi View", kAEMRphi);
+ fAliEvePopup->AddEntry("&Save RhoZ View", kAEMRhoz);
+
+ fAliEvePopup->AddSeparator();
+
+ fAliEvePopup->AddEntry("&Save all views HR", kAEMAllhr);
+ fAliEvePopup->AddEntry("&Save 3D View HR", kAEM3dhr);
+ fAliEvePopup->AddEntry("&Save RPhi View HR", kAEMRphihr);
+ fAliEvePopup->AddEntry("&Save RhoZ View HR", kAEMRhozhr);
+
+ fAliEvePopup->AddSeparator();
+ fAliEvePopup->AddSeparator();
+ fAliEvePopup->AddSeparator();
+
+ fAliEvePopup->AddEntry("&Save Data Selection macros", kAEMSavemacros);
+ fAliEvePopup->AddEntry("&Load Data Selection macros", kAEMLoadmacros);
+
+ fAliEvePopup->AddSeparator();
+ fAliEvePopup->AddSeparator();
+ fAliEvePopup->AddSeparator();
+
+ fAliEvePopup->AddEntry("&Save VizDB", kAEMSave);
+ fAliEvePopup->AddEntry("&Load VizDB", kAEMOpen);
fAliEvePopup->AddSeparator();
fAliEvePopup->Connect("Activated(Int_t)", "AliEveConfigManager",
this, "AliEvePopupHandler(Int_t)");
+ fLoadCheck = kFALSE;
#if ROOT_VERSION_CODE >= ROOT_VERSION(5,25,4)
TGMenuBar *mBar = gEve->GetBrowser()->GetMenuBar();
//==============================================================================
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <sstream>
+
+using namespace std;
+
namespace
{
const char *gMacroSaveAsTypes[] = {"CINT Macro", "*.C",
- 0, 0};
+ 0, 0}; //for saving/loading macros
+
+const char *gPictureSaveAsTypes[] = {"PNG Image", "*.png",
+ 0, 0}; //for saving pictures
+
}
void AliEveConfigManager::AliEvePopupHandler(Int_t id)
switch (id)
{
- case kAEMSave:
- {
- TGFileInfo fi;
- fi.fFileTypes = gMacroSaveAsTypes;
- fi.fIniDir = StrDup(""); // current directory
- fi.fFileTypeIdx = 0;
- fi.fOverwrite = kTRUE;
- new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDSave, &fi);
- if (!fi.fFilename) return;
- TPMERegexp filere(".*/([^/]+$");
- if (filere.Match(fi.fFilename) != 2)
- {
- Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
- return;
- }
- printf("Saving...\n");
-
- TString file(filere[1]);
- if (!file.EndsWith(".C"))
- file += ".C";
- gSystem->ChangeDirectory(fi.fIniDir);
- gEve->SaveVizDB(file);
-
- printf("Saved\n");
- break;
+ case kAEMDefault: //default geometry and VizDB
+ {
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- }
+ mv->DestroyAllGeometries(); //destroy RPhi and Rhoz geometries before putting new
- case kAEMLoad:
- {
+ gEve->LoadVizDB("geom_gentle_default.C", kTRUE, kTRUE); //loading geometry
- printf("Loading...\n");
+ gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE); //loading VizDB
- gEve->LoadVizDB("VizDB_custom.C", kTRUE, kTRUE);
+ if(!gEve->GetViewers()->UseLightColorSet())
+ gEve->GetViewers()->SwitchColorSet(); //white background
- printf("Loaded\n");
+ gEve->FullRedraw3D();
+
break;
-
}
- case kAEMDefault:
+ case kAEMScreen: //default geometry with black background
{
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FirstChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
gEve->LoadVizDB("geom_gentle_default.C", kTRUE, kTRUE);
- gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
+ gEve->LoadVizDB("VizDB_scan_screen.C", kTRUE, kTRUE);
if(gEve->GetViewers()->UseLightColorSet())
gEve->GetViewers()->SwitchColorSet();
- gEve->FullRedraw3D();
-
+ gEve->FullRedraw3D();
+
break;
}
- case kAEMScreen:
+ case kAEMProjector: //default geometry with white background
{
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FirstChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
- gEve->LoadVizDB("geom_gentle.C", kTRUE, kTRUE);
+ gEve->LoadVizDB("geom_gentle_default.C", kTRUE, kTRUE);
- gEve->LoadVizDB("VizDB_scan_screen.C", kTRUE, kTRUE);
+ gEve->LoadVizDB("VizDB_scan_projector.C", kTRUE, kTRUE);
- if(gEve->GetViewers()->UseLightColorSet())
+ if(!gEve->GetViewers()->UseLightColorSet())
gEve->GetViewers()->SwitchColorSet();
gEve->FullRedraw3D();
break;
}
- case kAEMProjector:
+ case kAEMNotransparency: //default geometry with low transparency (5%)
{
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FirstChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ gEve->LoadVizDB("geom_gentle_notransparency.C", kTRUE, kTRUE);
- gEve->LoadVizDB("geom_gentle.C", kTRUE, kTRUE);
-
- gEve->LoadVizDB("VizDB_scan_projector.C", kTRUE, kTRUE);
+ gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
if(!gEve->GetViewers()->UseLightColorSet())
gEve->GetViewers()->SwitchColorSet();
break;
}
- case kAEMTransparentDark:
- {
-
- gEve->GetScenes()->FirstChild()->DestroyElements();
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
+ case kAEMTransparentDark: //default geometry with black background, high transparency (80%)
+ {
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
gEve->LoadVizDB("geom_gentle_transparent.C", kTRUE, kTRUE);
break;
}
- case kAEMTransparentLight:
+ case kAEMTransparentLight: //default geometry with white background, high transparency (80%)
{
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FirstChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
gEve->LoadVizDB("geom_gentle_transparent.C", kTRUE, kTRUE);
case kAEMTransparentMonoDark:
{
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FirstChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
gEve->LoadVizDB("geom_gentle_transparentdark.C", kTRUE, kTRUE);
case kAEMTransparentMonoLight:
{
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FirstChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
-
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
gEve->LoadVizDB("geom_gentle_transparentlight.C", kTRUE, kTRUE);
break;
}
- case kAEMTpc:
+ case kAEMGreen:
+ {
+ AliEveMultiView *mv = AliEveMultiView::Instance();
+
+ mv->DestroyAllGeometries();
+
+ gEve->LoadVizDB("geom_gentle_green.C", kTRUE, kTRUE);
+
+ gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
+
+ if(!gEve->GetViewers()->UseLightColorSet())
+ gEve->GetViewers()->SwitchColorSet();
+
+ gEve->FullRedraw3D();
+
+ break;
+ }
+
+ case kAEMBright:
{
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FirstChild()->DestroyElements();
+ mv->DestroyAllGeometries();
- gEve->GetScenes()->FindChild("RPhi Geometry")->LastChild()->DestroyElements();
+ gEve->LoadVizDB("geom_gentle_bright.C", kTRUE, kTRUE);
+
+ gEve->LoadVizDB("VizDB_scan.C", kTRUE, kTRUE);
+
+ if(gEve->GetViewers()->UseLightColorSet())
+ gEve->GetViewers()->SwitchColorSet();
+
+ gEve->FullRedraw3D();
+
+ break;
+ }
+
+ case kAEMYellow:
+ {
+ AliEveMultiView *mv = AliEveMultiView::Instance();
- gEve->GetScenes()->FindChild("RhoZ Geometry")->LastChild()->DestroyElements();
+ mv->DestroyAllGeometries();
+
+ gEve->LoadVizDB("geom_gentle_yellow.C", kTRUE, kTRUE);
+
+ gEve->LoadVizDB("VizDB_scan_yellow.C", kTRUE, kTRUE);
+
+ if(!gEve->GetViewers()->UseLightColorSet())
+ gEve->GetViewers()->SwitchColorSet();
+
+ gEve->FullRedraw3D();
+
+ break;
+ }
+
+ case kAEMTpc:
+ {
+ AliEveMultiView *mv = AliEveMultiView::Instance();
+
+ mv->DestroyAllGeometries();
gEve->LoadVizDB("geom_gentle_tpc.C", kTRUE, kTRUE);
break;
}
+ case kAEMAll: //saving pictures from all three viewers
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gPictureSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi); // dialog
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+ TString file2(filere[1]);
+ TString file3(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += "_3D.png"; // adding extensions
+
+ if (!file2.EndsWith(".png"))
+ file2 += "_RPhi.png"; // adding extensions
+
+ if (!file3.EndsWith(".png"))
+ file3 += "_RhoZ.png"; // adding extensions
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ TEveViewer* view3d = ((TEveViewer*)*i);
+ view3d->GetGLViewer()->SavePicture(file1); // saving pictures
+ i++;
+ TEveViewer* viewrphi = ((TEveViewer*)*i);
+ viewrphi->GetGLViewer()->SavePicture(file2); // saving pictures
+ i++;
+ TEveViewer* viewrhoz = ((TEveViewer*)*i);
+ viewrhoz->GetGLViewer()->SavePicture(file3); // saving pictures
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEM3d: // saving only 3d view
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gPictureSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += ".png";
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ TEveViewer* view3d = ((TEveViewer*)*i);
+ view3d->GetGLViewer()->SavePicture(file1);
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEMRphi: // saving only RPhi view
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gPictureSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += ".png";
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ i++;
+ TEveViewer* viewrphi = ((TEveViewer*)*i);
+ viewrphi->GetGLViewer()->SavePicture(file1);
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEMRhoz: // saving only RhoZ view
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gMacroSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += ".png";
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ i++;
+ i++;
+ TEveViewer* viewrhoz = ((TEveViewer*)*i);
+ viewrhoz->GetGLViewer()->SavePicture(file1);
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEMAllhr: // saving all three views in high resolution
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gPictureSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+ TString file2(filere[1]);
+ TString file3(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += "_3D.png";
+
+ if (!file2.EndsWith(".png"))
+ file2 += "_RPhi.png";
+
+ if (!file3.EndsWith(".png"))
+ file3 += "_RhoZ.png";
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ TEveViewer* view3d = ((TEveViewer*)*i);
+ view3d->GetGLViewer()->SavePictureScale(file1,4.0); // getting high resolution
+ i++;
+ TEveViewer* viewrphi = ((TEveViewer*)*i);
+ viewrphi->GetGLViewer()->SavePictureScale(file2,4.0);
+ i++;
+ TEveViewer* viewrhoz = ((TEveViewer*)*i);
+ viewrhoz->GetGLViewer()->SavePictureScale(file3,4.0);
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEM3dhr: // saving only 3d view in high resolution
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gPictureSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += ".png";
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ TEveViewer* view3d = ((TEveViewer*)*i);
+ view3d->GetGLViewer()->SavePictureScale(file1,4.0);
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEMRphihr: // saving only RPhi view in high resolution
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gPictureSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += ".png";
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ i++;
+ TEveViewer* viewrphi = ((TEveViewer*)*i);
+ viewrphi->GetGLViewer()->SavePictureScale(file1,4.0);
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEMRhozhr: // saving only RhoZ view in high resolution
+ {
+
+ TGFileInfo fi;
+ fi.fFileTypes = gMacroSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(),
+ gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+
+ TString file1(filere[1]);
+
+ if (!file1.EndsWith(".png"))
+ file1 += ".png";
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ printf("Saving...\n");
+
+ TEveViewerList *viewers = gEve->GetViewers();
+ TEveElement::List_i i = viewers->BeginChildren();
+ i++;
+ i++;
+ i++;
+ TEveViewer* viewrhoz = ((TEveViewer*)*i);
+ viewrhoz->GetGLViewer()->SavePictureScale(file1,4.0);
+
+ printf("Done.\n");
+
+ break;
+ }
+
+ case kAEMSavemacros:// Saving Data Selection macros
+ {
+
+ AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();
+
+ exec->SaveAddedMacros();
+
+ break;
+ }
+
+ case kAEMLoadmacros://Loading Data Selection macros
+ {
+
+ TEveBrowser *browser = gEve->GetBrowser();
+ browser->ShowCloseTab(kFALSE);
+
+ if(fLoadCheck)
+ browser->RemoveTab(TRootBrowser::kRight, 5);//remove the tab with previous DataSelection window
+ else
+ browser->RemoveTab(TRootBrowser::kRight, 2);
+
+
+ TGFileInfo fi;
+ fi.fFileTypes = gMacroSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDOpen, &fi);//dialog
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+ printf("Loading...\n");
+
+ TString file(filere[1]);
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ TEveUtil::Macro(file);//run macro
+
+ AliEveEventManager *eman = AliEveEventManager::GetMaster();//reload event (gEve->Refresh() crashes)
+ Int_t ev = eman->GetEventId();
+ eman->Close();
+ eman->Open();
+ eman->GotoEvent(ev);
+
+ printf("Done.\n");
+
+ fLoadCheck = kTRUE;
+
+ break;
+
+ }
+
+ case kAEMSave://saving VizDB
+ {
+ TGFileInfo fi;
+ fi.fFileTypes = gMacroSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+ printf("Saving...\n");
+
+ TString file(filere[1]);
+ if (!file.EndsWith(".C"))
+ file += ".C";
+ gSystem->ChangeDirectory(fi.fIniDir);
+ gEve->SaveVizDB(file);
+
+//Last line "gEve->SaveVizDB(file);" gives macro with many unnecessary
+//lines like "x038->SetMinPt(0);" tahat are not interpreted properly later
+
+ string text;
+ string all;
+
+ ifstream myfile1(file);
+ if(myfile1.is_open())
+ {
+ while(!myfile1.eof())
+ {
+ getline(myfile1,text);
+ TString check(text);
+ if(!(check.EndsWith("MinPt(0);")||check.EndsWith("MaxPt(0);")
+ ||check.EndsWith("LimPt(0);")||check.EndsWith("MinP(0);")
+ ||check.EndsWith("MaxP(0);")||check.EndsWith("LimP(0);")))
+ {
+ all += text; //Cut off unnecessary lines and bring everything together
+ all += "\n";
+ }
+ }
+ myfile1.close();
+ }
+
+ ofstream myfile2(file); //Replacing old file with the one without "bad" lines
+ myfile2 << all;
+ myfile2.close();
+
+ printf("Done.\n");
+ break;
+
+ }
+
+ case kAEMOpen://Opening VizDB
+ {
+ TGFileInfo fi;
+ fi.fFileTypes = gMacroSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDOpen, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+ printf("Opening...\n");
+
+ TString file(filere[1]);
+
+ gSystem->ChangeDirectory(fi.fIniDir);
+
+ gEve->LoadVizDB(file, kTRUE, kTRUE);
+
+ gEve->Redraw3D(kTRUE);
+
+ printf("Done.\n");
+ break;
+
+ }
+
default:
{
Warning(kEH, "Unknown menu entry.");
TGPopupMenu *fAliEvePopup; // AliEve menu.
+ Bool_t fLoadCheck; //for Data Selection Save/Load
+
private:
AliEveConfigManager();
#include <TList.h>
#include <TROOT.h>
+#include <TEveManager.h>
+#include <TGFileDialog.h>
+#include <TGMenu.h>
+
+#include <TSystem.h>
+#include <TPRegexp.h>
+#include <RVersion.h>
+
+
//______________________________________________________________________________
//
// Contains a list of AliEveMacros.
const TString mname = mac->GetMacro();
if ( ! mname.IsNull() && TEveUtil::CheckMacro(mname) == kFALSE)
{
- TEveUtil::LoadMacro(mname);
+ TEveUtil::LoadMacro(mname);
}
fMacros->Add(mac);
}
/******************************************************************************/
+void AliEveMacroExecutor::RemoveMacros()
+{
+ fMacros->Clear();
+}
+
+/******************************************************************************/
+
#include "Api.h"
#include "TInterpreter.h"
}
}
}
+
+/******************************************************************************/
+
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+namespace
+{
+const char *gMacroSaveAsTypes[] = {"CINT Macro", "*.C",
+ 0, 0};
+}
+
+void AliEveMacroExecutor::SaveAddedMacros()
+{
+
+ TGFileInfo fi;
+ fi.fFileTypes = gMacroSaveAsTypes;
+ fi.fIniDir = StrDup(""); // current directory
+ fi.fFileTypeIdx = 0;
+ fi.fOverwrite = kTRUE;
+ new TGFileDialog(gClient->GetDefaultRoot(), gEve->GetMainWindow(), kFDSave, &fi);
+ if (!fi.fFilename) return;
+
+ TPMERegexp filere(".*/([^/]+$)");
+ if (filere.Match(fi.fFilename) != 2)
+ {
+ Warning("AliEvePopupHandler", "file '%s' bad.", fi.fFilename);
+ return;
+ }
+ printf("Saving...\n");
+
+ TString file(filere[1]);
+ TString file1;
+ if (!file.EndsWith(".C"))
+ file1 = file + ".C";
+ gSystem->ChangeDirectory(fi.fIniDir);
+ ofstream myfile;
+ myfile.open (file1);
+
+ TIter next(fMacros);
+ AliEveMacro* mac;
+
+
+ myfile <<"//Macro generated automatically by AliEveMacroExecutor\n\n";
+
+ myfile <<"void "<<file<<"(){\n\n";
+ myfile <<" AliEveMacroExecutor *exec = AliEveEventManager::GetMaster()->GetExecutor();\n";
+ myfile <<" exec->RemoveMacros();\n";
+ myfile <<" TEveBrowser *browser = gEve->GetBrowser();\n";
+ myfile <<" browser->ShowCloseTab(kFALSE);\n";
+
+ while ((mac = (AliEveMacro*) next()))
+ {
+ myfile <<" exec->AddMacro(new AliEveMacro("<<mac->GetSources()<<", "<<char(34)<<mac->GetTags()<<char(34)<<", "
+ <<char(34)<<mac->GetMacro()<<char(34)<<", "<<char(34)<<mac->GetFunc()<<char(34)<<", "<<char(34)<<mac->GetArgs()
+ <<char(34)<<", "<<mac->GetActive()<<"));\n\n";
+ }
+
+ myfile <<" TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());\n";
+ myfile <<" slot->StartEmbedding();\n";
+ myfile <<" AliEveMacroExecutorWindow* exewin = new AliEveMacroExecutorWindow(exec);\n";
+ myfile <<" slot->StopEmbedding("<<char(34)<<"DataSelection"<<char(34)<<");\n";
+ myfile <<" exewin->PopulateMacros();\n\n";
+
+ myfile <<"\n}";
+ myfile.close();
+ printf("Saved...\n");
+
+}
void ExecMacros();
+ void SaveAddedMacros();
+
+ void RemoveMacros();
+
protected:
TList* fMacros;
fRhoZMgr->SetCenter(x, y, z);
}
+void AliEveMultiView::DestroyAllGeometries()
+{
+ // Destroy 3d, r-phi and rho-z geometries.
+
+ fGeomGentle->DestroyElements();
+ fGeomGentleRPhi->DestroyElements();
+ fGeomGentleRhoZ->DestroyElements();
+
+}
+
void SetCenterRPhi(Double_t x, Double_t y, Double_t z);
void SetCenterRhoZ(Double_t x, Double_t y, Double_t z);
+ void DestroyAllGeometries();
+
//-------------------------------------------------------------------------
TEveViewer* Get3DView() { return f3DView; }
--- /dev/null
+void geom_gentle_bright(Bool_t register_as_global=kTRUE)
+{
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ if (register_as_global)
+ {
+ gEve->AddGlobalElement(gsre1);
+ }
+
+ // Fix visibility, color and transparency
+
+ gsre1->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(kOrange+10);
+// its1->SetMainTransparency(60);
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(kOrange-3);
+// its2->SetMainTransparency(60);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(kYellow);
+// its3->SetMainTransparency(60);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+ lvl3->SetRnrSelf(kTRUE);
+ lvl3->SetMainColor(kCyan);
+// lvl3->SetMainTransparency(70);
+ TEveElement::List_i l = lvl3->BeginChildren();
+
+ TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+ lvl4->SetRnrSelf(kFALSE);
+ TEveElement::List_i m = lvl4->BeginChildren();
+
+ TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+ tpc1->SetRnrSelf(kTRUE);
+// tpc1->SetMainColor(1);
+// tpc1->SetMainTransparency(70);
+ m++;
+
+ TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+ tpc2->SetRnrSelf(kTRUE);
+// tpc2->SetMainColor(1);
+// tpc2->SetMainTransparency(70);
+ m++;
+
+ TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+ tpc3->SetRnrSelf(kTRUE);
+// tpc3->SetMainColor(1);
+// tpc3->SetMainTransparency(70);
+ m++;
+
+//TRD+TOF
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* trd1 = (TEveGeoShape*) *j;
+ trd1->SetRnrSelf(kTRUE);
+ trd1->SetMainColor(kAzure-7);
+// trd1->SetMainTransparency(80);
+ j++;
+
+ TEveGeoShape* tof1 = (TEveGeoShape*) *j;
+ tof1->SetRnrSelf(kTRUE);
+ tof1->SetMainColor(kMagenta+3);
+// tof1->SetMainTransparency(80);
+
+//PHOS
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(kRed);
+// lvl2->SetMainTransparency(20);
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(kBlue);
+// lvl2->SetMainTransparency(20);
+ }
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ // Fix visibility, color and transparency
+
+ gsre2->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre2->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(1);
+ its1->SetMainTransparency(80);
+
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(1);
+ its2->SetMainTransparency(80);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(1);
+ its3->SetMainTransparency(80);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+//PHOS
+
+ i++;
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ // Fix visibility, color and transparency
+
+ gsre3->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre3->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(1);
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(1);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(1);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+
+ }
+
+//PHOS
+
+ i++;
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+
+//fix all the viewers
+
+ TEveElement* top = gEve->GetCurrentEvent();
+
+ AliEveMultiView *mv = AliEveMultiView::Instance();
+
+ mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+ gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
--- /dev/null
+void geom_gentle_green(Bool_t register_as_global=kTRUE)
+{
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ if (register_as_global)
+ {
+ gEve->AddGlobalElement(gsre1);
+ }
+
+ // Fix visibility, color and transparency
+
+ gsre1->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(kMagenta-5);
+ its1->SetMainTransparency(60);
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(kCyan-5);
+ its2->SetMainTransparency(60);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(kGreen-5);
+ its3->SetMainTransparency(60);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+ lvl3->SetRnrSelf(kFALSE);
+ lvl3->SetMainColor(1);
+ lvl3->SetMainTransparency(70);
+ TEveElement::List_i l = lvl3->BeginChildren();
+
+ TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+ lvl4->SetRnrSelf(kFALSE);
+ TEveElement::List_i m = lvl4->BeginChildren();
+
+ TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+ tpc1->SetRnrSelf(kTRUE);
+ tpc1->SetMainColor(1);
+ tpc1->SetMainTransparency(70);
+ m++;
+
+ TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+ tpc2->SetRnrSelf(kTRUE);
+ tpc2->SetMainColor(1);
+ tpc2->SetMainTransparency(70);
+ m++;
+
+ TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+ tpc3->SetRnrSelf(kTRUE);
+ tpc3->SetMainColor(1);
+ tpc3->SetMainTransparency(70);
+ m++;
+
+//TRD+TOF
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* trd1 = (TEveGeoShape*) *j;
+ trd1->SetRnrSelf(kTRUE);
+ trd1->SetMainColor(kMagenta-8);
+ trd1->SetMainTransparency(80);
+ j++;
+
+ TEveGeoShape* tof1 = (TEveGeoShape*) *j;
+ tof1->SetRnrSelf(kTRUE);
+ tof1->SetMainColor(kMagenta-1);
+ tof1->SetMainTransparency(80);
+
+//PHOS
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(kGreen-8);
+ lvl2->SetMainTransparency(20);
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(kBlue-5);
+ lvl2->SetMainTransparency(20);
+ }
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ // Fix visibility, color and transparency
+
+ gsre2->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre2->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(1);
+ its1->SetMainTransparency(80);
+
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(1);
+ its2->SetMainTransparency(80);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(1);
+ its3->SetMainTransparency(80);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+//PHOS
+
+ i++;
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ // Fix visibility, color and transparency
+
+ gsre3->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre3->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(1);
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(1);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(1);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+
+ }
+
+//PHOS
+
+ i++;
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(1);
+ lvl2->SetMainTransparency(80);
+ }
+
+
+//fix all the viewers
+
+ TEveElement* top = gEve->GetCurrentEvent();
+
+ AliEveMultiView *mv = AliEveMultiView::Instance();
+
+ mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+ gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
--- /dev/null
+void geom_gentle_notransparency(Bool_t register_as_global=kTRUE)
+{
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ if (register_as_global)
+ {
+ gEve->AddGlobalElement(gsre1);
+ }
+
+ // Fix visibility, color and transparency
+
+ gsre1->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainTransparency(5);
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainTransparency(5);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainTransparency(5);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+ lvl3->SetRnrSelf(kTRUE);
+ lvl3->SetMainTransparency(5);
+ TEveElement::List_i l = lvl3->BeginChildren();
+
+ TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+ lvl4->SetRnrSelf(kFALSE);
+ TEveElement::List_i m = lvl4->BeginChildren();
+
+ TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+ tpc1->SetRnrSelf(kTRUE);
+ tpc1->SetMainTransparency(5);
+ m++;
+
+ TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+ tpc2->SetMainColor(kGray);
+ tpc2->SetMainTransparency(5);
+ m++;
+
+ TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+ tpc3->SetRnrSelf(kTRUE);
+ tpc3->SetMainTransparency(5);
+ m++;
+
+//TRD+TOF
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(5);
+ j++;
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(5);
+ j++;
+
+//PHOS
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(5);
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(5);
+ }
+
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ TEveElement* top = gEve->GetCurrentEvent();
+
+ AliEveMultiView *mv = AliEveMultiView::Instance();
+
+ mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+ gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
+
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
- for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
- {
- TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
- lvl2->SetRnrSelf(kTRUE);
- lvl2->SetMainTransparency(80);
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(80);
+ j++;
- }
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(80);
+ j++;
//PHOS
TEveElement::List_i k = lvl2->BeginChildren();
TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
- lvl3->SetRnrSelf(kFALSE);
+ lvl3->SetRnrSelf(kTRUE);
lvl3->SetMainColor(0);
lvl3->SetMainTransparency(80);
TEveElement::List_i l = lvl3->BeginChildren();
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
-// TEveElement::List_i j = lvl1->BeginChildren();
+ TEveElement::List_i j = lvl1->BeginChildren();
- for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
- {
- TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
- lvl2->SetRnrSelf(kTRUE);
- lvl2->SetMainColor(0);
- lvl2->SetMainTransparency(80);
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(0);
+ lvl2->SetMainTransparency(80);
+ j++;
- }
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(0);
+ lvl2->SetMainTransparency(80);
//PHOS
//TPC
i++;
- i++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
//PHOS
i++;
+ i++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
//TPC
i++;
- i++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
//PHOS
i++;
+ i++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
lvl2->SetMainTransparency(80);
}
-//======================================
-
-
TEveElement* top = gEve->GetCurrentEvent();
AliEveMultiView *mv = AliEveMultiView::Instance();
m++;
TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
- tpc2->SetMainColor(kGray);
+ tpc2->SetRnrSelf(kTRUE);
tpc2->SetMainColor(1);
tpc2->SetMainTransparency(80);
m++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
- for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
- {
- TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
- lvl2->SetRnrSelf(kTRUE);
- lvl2->SetMainColor(1);
- lvl2->SetMainTransparency(80);
+ TEveGeoShape* trd1 = (TEveGeoShape*) *j;
+ trd1->SetRnrSelf(kTRUE);
+ trd1->SetMainColor(1);
+ trd1->SetMainTransparency(80);
+ j++;
- }
+ TEveGeoShape* tof1 = (TEveGeoShape*) *j;
+ tof1->SetRnrSelf(kTRUE);
+ tof1->SetMainColor(1);
+ tof1->SetMainTransparency(80);
//PHOS
//TPC
i++;
- i++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
//PHOS
i++;
+ i++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
//TPC
i++;
- i++;
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
//PHOS
i++;
-
+ i++;
+
TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
lvl1->SetRnrSelf(kFALSE);
--- /dev/null
+// $Id$
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
+ * full copyright notice. *
+ **************************************************************************/
+
+void geom_gentle_yellow(Bool_t register_as_global=kTRUE)
+{
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre1 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ if (register_as_global)
+ {
+ gEve->AddGlobalElement(gsre1);
+ }
+
+ // Fix visibility, color and transparency
+
+ gsre1->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre1->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(kYellow-4);
+ its1->SetMainTransparency(50);
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(kYellow-7);
+ its2->SetMainTransparency(50);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(kYellow-9);
+ its3->SetMainTransparency(50);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* lvl3 = (TEveGeoShape*) *k;
+ lvl3->SetRnrSelf(kTRUE);
+ lvl3->SetMainColor(kGray);
+ lvl3->SetMainTransparency(80);
+ TEveElement::List_i l = lvl3->BeginChildren();
+
+ TEveGeoShape* lvl4 = (TEveGeoShape*) *l;
+ lvl4->SetRnrSelf(kFALSE);
+ TEveElement::List_i m = lvl4->BeginChildren();
+
+ TEveGeoShape* tpc1 = (TEveGeoShape*) *m;
+ tpc1->SetRnrSelf(kTRUE);
+ tpc1->SetMainColor(kGray+2);
+ tpc1->SetMainTransparency(80);
+ m++;
+
+ TEveGeoShape* tpc2 = (TEveGeoShape*) *m;
+ tpc2->SetMainColor(kGray);
+ tpc2->SetMainColor(kGray+2);
+ tpc2->SetMainTransparency(80);
+ m++;
+
+ TEveGeoShape* tpc3 = (TEveGeoShape*) *m;
+ tpc3->SetRnrSelf(kTRUE);
+ tpc3->SetMainColor(kGray+2);
+ tpc3->SetMainTransparency(80);
+ m++;
+
+//TRD+TOF
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ lvl2->SetMainColor(0);
+ lvl2->SetMainTransparency(80);
+
+ }
+
+//PHOS
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(30);
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(30);
+ }
+
+ // The resulting geometry is NOT added into the global scene!
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre2 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ // Fix visibility, color and transparency
+
+ gsre2->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre2->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(kYellow-4);
+ its1->SetMainTransparency(50);
+
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(kYellow-7);
+ its2->SetMainTransparency(50);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(kYellow-9);
+ its3->SetMainTransparency(50);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(kGray);
+ lvl2->SetMainTransparency(80);
+ }
+
+//PHOS
+
+ i++;
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(30);
+
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(30);
+ }
+
+ // The resulting geometry is NOT added into the global scene!
+
+ TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+ TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+ TEveGeoShape* gsre3 = TEveGeoShape::ImportShapeExtract(gse);
+ f.Close();
+
+ // Fix visibility, color and transparency
+
+ gsre3->SetRnrSelf(kFALSE);
+ TEveElement::List_i i = gsre3->BeginChildren();
+
+//ITS
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+ TEveElement::List_i j = lvl1->BeginChildren();
+
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kFALSE);
+ TEveElement::List_i k = lvl2->BeginChildren();
+
+ TEveGeoShape* its1 = (TEveGeoShape*) *k;
+ its1->SetRnrSelf(kTRUE);
+ its1->SetMainColor(kYellow-4);
+ k++;
+
+ TEveGeoShape* its2 = (TEveGeoShape*) *k;
+ its2->SetRnrSelf(kTRUE);
+ its2->SetMainColor(kYellow-7);
+ k++;
+
+ TEveGeoShape* its3 = (TEveGeoShape*) *k;
+ its3->SetRnrSelf(kTRUE);
+ its3->SetMainColor(kYellow-9);
+
+//TPC
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainColor(kGray);
+ lvl2->SetMainTransparency(80);
+
+ }
+
+//PHOS
+
+ i++;
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(30);
+ }
+
+//HMPID
+
+ i++;
+
+ TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+ lvl1->SetRnrSelf(kFALSE);
+
+ for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); j++)
+ {
+ TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+ lvl2->SetRnrSelf(kTRUE);
+ lvl2->SetMainTransparency(30);
+ }
+
+ TEveElement* top = gEve->GetCurrentEvent();
+
+ AliEveMultiView *mv = AliEveMultiView::Instance();
+
+ mv->InitGeomGentle(gsre1, gsre2, gsre3);
+
+ gEve->FullRedraw3D(kTRUE, kTRUE);
+
+}
ps = new TEvePointSet();
ps->SetMarkerColor(2);
- ps->SetMarkerSize(0.5);
+ ps->SetMarkerSize(0.4);
ps->SetMarkerStyle(2);
gEve->InsertVizDBEntry("Clusters", ps);
ps = new TEvePointSet();
- ps->SetMarkerColor(5);
- ps->SetMarkerSize(0.2);
- ps->SetMarkerStyle(2);
+ ps->SetMarkerColor(kRed);
+ ps->SetMarkerSize(0.4);
+ ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters ITS", ps);
ps = new TEvePointSet();
- ps->SetMarkerColor(4);
- ps->SetMarkerSize(0.2);
- ps->SetMarkerStyle(2);
+ ps->SetMarkerColor(kOrange-3);
+ ps->SetMarkerSize(0.3);
+ ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters TPC", ps);
ps = new TEvePointSet();
- ps->SetMarkerColor(7);
+ ps->SetMarkerColor(kYellow);
ps->SetMarkerSize(0.5);
- ps->SetMarkerStyle(4);
+ ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters TRD", ps);
ps = new TEvePointSet();
- ps->SetMarkerColor(kOrange);
- ps->SetMarkerSize(0.5);
- ps->SetMarkerStyle(4);
+ ps->SetMarkerColor(0);
+ ps->SetMarkerSize(0.9);
+ ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters TOF", ps);
ps = new TEvePointSet();
ps->SetMarkerColor(4);
- ps->SetMarkerSize(0.2);
- ps->SetMarkerStyle(2);
+ ps->SetMarkerSize(0.9);
+ ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters HMPID", ps);
ps = new TEvePointSet();
ps->SetMarkerColor(4);
ps->SetMarkerSize(0.5);
- ps->SetMarkerStyle(2);
+ ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters PHOS", ps);
//============================================================================
ps = new TEvePointSet();
ps->SetMarkerColor(5);
- ps->SetMarkerSize(1);
+ ps->SetMarkerSize(0.3);
ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters ITS", ps);
ps = new TEvePointSet();
- ps->SetMarkerColor(4);
- ps->SetMarkerSize(1);
+ ps->SetMarkerColor(kBlue+4);
+ ps->SetMarkerSize(0.3);
ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters TPC", ps);
- ps = new TEvePointSet();
+ ps = new TEvePointSet(kBlue);
ps->SetMarkerColor(2);
- ps->SetMarkerSize(1);
+ ps->SetMarkerSize(0.5);
ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters TRD", ps);
- ps = new TEvePointSet();
+ ps = new TEvePointSet(kMagenta+4);
ps->SetMarkerColor(kOrange);
- ps->SetMarkerSize(1);
+ ps->SetMarkerSize(0.9);
ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters TOF", ps);
- ps = new TEvePointSet();
+ ps = new TEvePointSet(kRed);
ps->SetMarkerColor(5);
- ps->SetMarkerSize(1);
+ ps->SetMarkerSize(0.9);
ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters HMPID", ps);
- ps = new TEvePointSet();
+ ps = new TEvePointSet(kBlack);
ps->SetMarkerColor(5);
- ps->SetMarkerSize(1);
+ ps->SetMarkerSize(0.9);
ps->SetMarkerStyle(8);
gEve->InsertVizDBEntry("REC Clusters PHOS", ps);
--- /dev/null
+void VizDB_scan_yellow()
+{
+
+ TEvePointSet *ps = 0;
+ TEveStraightLineSet *ls = 0;
+
+ //============================================================================
+ // Hits
+ //============================================================================
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(2);
+ gEve->InsertVizDBEntry("Hits", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(2);
+ gEve->InsertVizDBEntry("SIM Hits ITS", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(3);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(2);
+ gEve->InsertVizDBEntry("SIM Hits TPC", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(3);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits T0", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits FMD", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits ACORDE", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits EMCAL", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits PMD", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits TOF", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(7);
+ ps->SetMarkerSize(.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits TRD", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(.5);
+ ps->SetMarkerStyle(4);
+ gEve->InsertVizDBEntry("SIM Hits VZERO", ps);
+
+ //============================================================================
+ // Clusters
+ //============================================================================
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(2);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(2);
+ gEve->InsertVizDBEntry("Clusters", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(kRed+4);
+ ps->SetMarkerSize(0.4);
+ ps->SetMarkerStyle(8);
+ gEve->InsertVizDBEntry("REC Clusters ITS", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(1);
+ ps->SetMarkerSize(0.3);
+ ps->SetMarkerStyle(8);
+ gEve->InsertVizDBEntry("REC Clusters TPC", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(kBlue);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(8);
+ gEve->InsertVizDBEntry("REC Clusters TRD", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(kCyan);
+ ps->SetMarkerSize(0.9);
+ ps->SetMarkerStyle(8);
+ gEve->InsertVizDBEntry("REC Clusters TOF", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(4);
+ ps->SetMarkerSize(0.2);
+ ps->SetMarkerStyle(2);
+ gEve->InsertVizDBEntry("REC Clusters HMPID", ps);
+
+ ps = new TEvePointSet();
+ ps->SetMarkerColor(4);
+ ps->SetMarkerSize(0.5);
+ ps->SetMarkerStyle(2);
+ gEve->InsertVizDBEntry("REC Clusters PHOS", ps);
+
+ //============================================================================
+ // Primary vertex
+ //============================================================================
+
+ // Combined vertex
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(7);
+ ls->SetLineColor(7);
+ ls->SetLineWidth(3);
+ gEve->InsertVizDBEntry("REC PVTX", ls);
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(7);
+ ls->SetLineColor(7);
+ ls->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC PVTX Ellipse", ls);
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(7);
+ ls->SetLineColor(7);
+ ls->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC PVTX Box", ls);
+
+ // SPD vertex
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(6);
+ ls->SetLineColor(6);
+ ls->SetLineWidth(3);
+ gEve->InsertVizDBEntry("REC PVTX SPD", ls);
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(6);
+ ls->SetLineColor(6);
+ ls->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC PVTX Ellipse SPD", ls);
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(6);
+ ls->SetLineColor(6);
+ ls->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC PVTX Box SPD", ls);
+
+ // TPC vertex
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(5);
+ ls->SetLineColor(5);
+ ls->SetLineWidth(3);
+ gEve->InsertVizDBEntry("REC PVTX TPC", ls);
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(5);
+ ls->SetLineColor(5);
+ ls->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC PVTX Ellipse TPC", ls);
+
+ ls = new TEveStraightLineSet;
+ ls->SetMarkerStyle(2);
+ ls->SetMarkerColor(5);
+ ls->SetLineColor(5);
+ ls->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC PVTX Box TPC", ls);
+
+ //Tracks
+
+ tl = new TEveTrackList("ESD Tracks");
+ tl->SetLineStyle(6);
+ tl->SetMainColor(1);
+ tl->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC Tracks",tl);
+
+ tl = new TEveTrackList("ESD Tracks MI");
+ tl->SetLineStyle(6);
+ tl->SetMainColor(1);
+ tl->SetLineWidth(1);
+ gEve->InsertVizDBEntry("REC Tracks MI",tl);
+
+ TEveElementList* el = new TEveElementList("ESD Tracks by category");
+ TEveTrackList *tltemp[7];
+ tltemp[0] = new TEveTrackList("Sigma < 3");
+ tltemp[0]->SetLineStyle(6);
+ tltemp[0]->SetLineColor(1);
+ tltemp[0]->SetLineWidth(1);
+ el->AddElement(tltemp[0]);
+
+ tltemp[1] = new TEveTrackList("3 < Sigma < 5");
+ tltemp[1]->SetLineStyle(6);
+ tltemp[1]->SetLineColor(1);
+ tltemp[1]->SetLineWidth(1);
+ el->AddElement(tltemp[1]);
+
+ tltemp[2] = new TEveTrackList("5 < Sigma");
+ tltemp[2]->SetLineStyle(6);
+ tltemp[2]->SetLineColor(1);
+ tltemp[2]->SetLineWidth(1);
+ el->AddElement(tltemp[2]);
+
+ tltemp[3] = new TEveTrackList("no ITS refit; Sigma < 5");
+ tltemp[3]->SetLineStyle(6);
+ tltemp[3]->SetLineColor(1);
+ tltemp[3]->SetLineWidth(1);
+ el->AddElement(tltemp[3]);
+
+ tltemp[4] = new TEveTrackList("no ITS refit; Sigma > 5");
+ tltemp[4]->SetLineStyle(6);
+ tltemp[4]->SetLineColor(1);
+ tltemp[4]->SetLineWidth(1);
+ el->AddElement(tltemp[4]);
+
+ tltemp[5] = new TEveTrackList("no TPC refit");
+ tltemp[5]->SetLineStyle(6);
+ tltemp[5]->SetLineColor(1);
+ tltemp[5]->SetLineWidth(1);
+ el->AddElement(tltemp[5]);
+
+ tltemp[6] = new TEveTrackList("ITS stand-alone");
+ tltemp[6]->SetLineStyle(6);
+ tltemp[6]->SetLineColor(1);
+ tltemp[6]->SetLineWidth(1);
+ el->AddElement(tltemp[6]);
+
+ el->SetVizTag("ESD Tracks by category");
+ gEve->AddElement(el);
+
+ TEveElementList* el = new TEveElementList("ESD Tracks by anal cuts");
+ TEveTrackList *tlac[2];
+ tlac[0] = new TEveTrackList("Passed");
+ tlac[0]->SetLineStyle(6);
+ tlac[0]->SetMainColor(1);
+ tlac[0]->SetLineWidth(1);
+ el->AddElement(tlac[0]);
+
+ tlac[1] = new TEveTrackList("Rejected");
+ tlac[1]->SetLineStyle(6);
+ tlac[1]->SetMainColor(1);
+ tlac[1]->SetLineWidth(1);
+ el->AddElement(tlac[1]);
+
+ el->SetVizTag("ESD Tracks by anal cut");
+ gEve->AddElement(el);
+
+ TEveElementList* el = new TEveElementList("ESD Tracklets SPD");
+ TEveTrackList *tlac[2];
+ tlac[0] = new TEveTrackList("Good");
+ tlac[0]->SetLineStyle(6);
+ tlac[0]->SetMainColor(1);
+ tlac[0]->SetLineWidth(1);
+ el->AddElement(tlac[0]);
+
+ tlac[1] = new TEveTrackList("Bad");
+ tlac[1]->SetLineStyle(6);
+ tlac[1]->SetMainColor(1);
+ tlac[1]->SetLineWidth(1);
+ el->AddElement(tlac[1]);
+
+ el->SetVizTag("ESD Tracklets SPD");
+ gEve->AddElement(el);
+
+}