Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
show_geo_extract.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve7
3/// Helper script for showing of extracted / simplified geometries.
4/// The test macro how to create the shapes is in file write_geo_extract.C
5/// \macro_code
6///
7/// \author Matevz Tadel
8
9void show_geo_extract(const char *file = "testShapeExtract.root")
10{
12 // eveMng->AllowMultipleRemoteConnections(false, false);
13
14 TFile::Open(file);
15 TIter next(gDirectory->GetListOfKeys());
16 TKey *key;
17 TString seName("ROOT::Experimental::REveGeoShapeExtract");
18
19 while ((key = (TKey *)next())) {
20 std::cout << "calss name " << key->GetClassName() << "\n";
21 if (seName == key->GetClassName()) {
22 std::cout << "got the extract name " << key->GetClassName() << "\n";
25 eveMng->AddGlobalElement(gs);
26 }
27 }
28
29 eveMng->Show();
30}
#define gDirectory
Definition TDirectory.h:385
static REveGeoShape * ImportShapeExtract(REveGeoShapeExtract *gse, REveElement *parent=nullptr)
Import a shape extract 'gse' under element 'parent'.
static REveManager * Create()
If global REveManager* REX::gEve is not set initialize it.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:3787
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Definition TKey.h:28
virtual const char * GetClassName() const
Definition TKey.h:77
virtual TObject * ReadObj()
To read a TObject* from the file.
Definition TKey.cxx:792
Basic string class.
Definition TString.h:138
ROOT::Experimental::REveManager * eveMng