Logo ROOT   6.19/01
Reference Guide
show_extract.C File Reference

Detailed Description

Helper script for showing of extracted / simplified geometries.

By default shows a simplified ALICE geometry.

eve_show_extract.png
#include "TFile.h"
#include "TKey.h"
#include "TGeoShape.h"
namespace REX = ROOT::Experimental;
void show_extract(const char* file="csg.root")
{
// disable browser cache - all scripts and html files will be loaded every time, useful for development
// gEnv->SetValue("WebGui.HttpMaxAge", 0);
TIter next(gDirectory->GetListOfKeys());
const TString extract_class("ROOT::Experimental::REveGeoShapeExtract");
REX::REveGeoShape *eve_shape = nullptr;
while (auto key = (TKey *)next())
{
if (extract_class == key->GetClassName())
{
auto gse = (REX::REveGeoShapeExtract*) key->ReadObj();
eveMng->AddGlobalElement(eve_shape);
}
}
if (!eve_shape)
{
Error("show_extract.C", "No keys of class '%s'.", extract_class.Data());
return;
}
eve_shape->GetShape()->Draw("ogl");
}
Author
Matevz Tadel

Definition in file show_extract.C.