Logo ROOT  
Reference Guide
viewer.C File Reference

Detailed Description

Web-based geometry viewer for CMS geometry

#include "TGeoManager.h"
#include "TGeoVolume.h"
#include "TFile.h"
void viewer()
{
TGeoManager::Import("https://root.cern/files/cms.root");
using namespace ROOT::Experimental;
auto viewer = std::make_shared<REveGeomViewer>(gGeoManager);
// select volume to draw
viewer->SelectVolume("CMSE");
// specify JSROOT draw options - here clipping on X,Y,Z axes
viewer->SetDrawOptions("clipxyz");
// set default limits for number of visible nodes and faces
// when viewer created, initial values exported from TGeoManager
viewer->SetLimits();
// start browser
viewer->Show();
// add to global heap to avoid immediate destroy of RGeomViewer
RDirectory::Heap().Add("geom_viewer", viewer);
}
Author
Sergey Linev

Definition in file viewer.C.

TGeoManager::SetVisLevel
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
Definition: TGeoManager.cxx:2248
TFile::SetCacheFileDir
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Definition: TFile.h:324
gGeoManager
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:602
ROOT::Experimental::RDirectory::Add
void Add(std::string_view name, const std::shared_ptr< T > &ptr)
Add an existing object (rather a shared_ptr to it) to the RDirectory.
Definition: RDirectory.hxx:184
TGeoVolume.h
RDirectory.hxx
TFile.h
TGeoManager::GetVolume
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
Definition: TGeoManager.cxx:2710
TGeoVolume::SetTransparency
void SetTransparency(Char_t transparency=0)
Definition: TGeoVolume.h:217
TGeoManager.h
TGeoManager::Import
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
Definition: TGeoManager.cxx:3817
TGeoVolume::InvisibleAll
void InvisibleAll(Bool_t flag=kTRUE)
Make volume and each of it daughters (in)visible.
Definition: TGeoVolume.cxx:764
ROOT::Experimental::RDirectory::Heap
static RDirectory & Heap()
Dedicated, process-wide RDirectory.
Definition: RFile.cxx:23
ROOT::Experimental
Definition: RDirectory.hxx:36
TGeoVolume::SetLineColor
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Definition: TGeoVolume.cxx:2035
REveGeomViewer.hxx
TGeoManager::DefaultColors
void DefaultColors()
Set default volume colors according to A of material.
Definition: TGeoManager.cxx:2077