Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
geoTopNode.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve_7
3///
4/// \macro_code
5///
8
10{
12 // gGeoManager->GetVolume("TRAK")->InvisibleAll();
26}
27
28TGeoNode *getNodeFromPath(TGeoNode *top, std::string path)
29{
30 TGeoNode *node = top;
31 std::istringstream f(path);
32 std::string s;
33 while (getline(f, s, '/'))
34 node = node->GetVolume()->FindNode(s.c_str());
35
36 return node;
37}
38
40{
41 using namespace ROOT::Experimental;
42 auto eveMng = REveManager::Create();
44
46
47 // tracker barrel
48 auto data = new REveGeoTopNodeData("https://root.cern/files/cms.root");
50 data->InitPath("/CMSE_1/TRAK_1/SVTX_1");
51 data->RefDescription().SetVisLevel(2);
53
54 // 3D GL representation
55 auto geoViz = new REveGeoTopNodeViz();
56 geoViz->SetGeoData(data);
57 data->AddNiece(geoViz);
59 geoViz->SetPickable(true);
60 eveMng->Show();
61}
#define f(i)
Definition RSha256.hxx:104
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
R__EXTERN TGeoManager * gGeoManager
virtual void AddElement(REveElement *el)
Add el to the list of children.
REveScene * GetEventScene() const
void AllowMultipleRemoteConnections(bool loopBack=true, bool useAuthKey=true)
Utility function to allow remote RWebWindow connections.
void Show(const RWebDisplayArgs &args="")
Show eve manager in specified browser.
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Sets the directory where to locally stage/cache remote files.
Definition TFile.cxx:4332
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
void DefaultColors(const TGeoColorScheme *cs=nullptr)
Set default volume colors according to A of material.
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
TGeoVolume * GetVolume() const
Definition TGeoNode.h:100
void SetTransparency(Char_t transparency=0)
Definition TGeoVolume.h:378
void SetLineColor(Color_t lcolor) override
Set the line color.
TGeoNode * FindNode(const char *name) const
search a daughter inside the list of nodes
ROOT::Experimental::REveManager * eveMng
TGeoNode * getNodeFromPath(TGeoNode *top, std::string path)
Definition geoTopNode.C:28
void setDetColors()
Definition geoTopNode.C:9
void geoTopNode()
Definition geoTopNode.C:39
Namespace for ROOT features in testing.
Definition TROOT.h:100