Logo ROOT   6.19/01
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.