Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
show_extract.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve
3 /// Helper script for showing of extracted / simplified geometries.
4 /// By default shows a simplified ALICE geometry.
5 ///
6 /// \image html eve_show_extract.png
7 /// \macro_code
8 ///
9 /// \author Matevz Tadel
10 
11 void show_extract(const char* file="http://root.cern.ch/files/alice_ESDgeometry.root")
12 {
13  TEveManager::Create();
14 
15  TFile::Open(file);
16 
17  TIter next(gDirectory->GetListOfKeys());
18  TKey* key;
19  TString xxx("TEveGeoShapeExtract");
20 
21  while ((key = (TKey*) next()))
22  {
23  if (xxx == key->GetClassName())
24  {
25  auto gse = (TEveGeoShapeExtract*) key->ReadObj();
26  auto gs = TEveGeoShape::ImportShapeExtract(gse, 0);
27  gEve->AddGlobalElement(gs);
28  }
29  }
30 
31  gEve->Redraw3D(kTRUE);
32 }