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///
6/// \author Alja Mrak-Tadel
7
10
11void setDetColors()
12{
14 // gGeoManager->GetVolume("TRAK")->InvisibleAll();
28}
29
30TGeoNode *getNodeFromPath(TGeoNode *top, std::string path)
31{
32 TGeoNode *node = top;
33 std::istringstream f(path);
34 std::string s;
35 while (getline(f, s, '/'))
36 node = node->GetVolume()->FindNode(s.c_str());
37
38 return node;
39}
40
41void geoTopNode()
42{
43 using namespace ROOT::Experimental;
44 auto eveMng = REveManager::Create();
45 eveMng->AllowMultipleRemoteConnections(false, false);
46
48
49 // tracker barrel
50 auto data = new REveGeoTopNodeData("https://root.cern/files/cms.root");
52 data->InitPath("/CMSE_1/TRAK_1/SVTX_1");
53 data->RefDescription().SetVisLevel(2);
54 eveMng->GetWorld()->AddElement(data);
55
56 // 3D GL representation
57 auto geoViz = new REveGeoTopNodeViz();
58 geoViz->SetGeoData(data);
59 data->AddNiece(geoViz);
60 eveMng->GetEventScene()->AddElement(geoViz);
61 geoViz->SetPickable(true);
62 eveMng->Show();
63}
#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
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:4338
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
Namespace for ROOT features in testing.
Definition TROOT.h:100