File indexing completed on 2025-01-30 09:17:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <DD4hep/Detector.h>
0012
0013
0014 #include <TGeoManager.h>
0015 #include <TEveGeoNode.h>
0016 #include <TGLViewer.h>
0017 #include <TGLUtil.h>
0018 #include <TGLClip.h>
0019 #include <TMap.h>
0020 #include <TEveElement.h>
0021 #include <TSysEvtHandler.h>
0022 #include <TTimer.h>
0023 #include <TVirtualPad.h>
0024
0025 #define private public
0026 #include <TEveManager.h>
0027
0028 using namespace dd4hep::detail;
0029
0030 void TEve() {
0031 Detector& description = Detector::getInstance();
0032 TGeoManager* mgr = description.manager();
0033 const char* fname = "file:../DD4hep/examples/CLICSiD/compact/compact.xml";
0034 description.apply("DD4hep_CompactLoader",1,(char**)&fname);
0035
0036 TEveManager::Create();
0037 gEve->fGeometries->Add(new TObjString(fname),&description.manager());
0038 TEveGeoTopNode* tn = new TEveGeoTopNode(mgr, mgr->GetTopNode());
0039 tn->SetVisLevel(4);
0040 gEve->AddGlobalElement(tn);
0041
0042 gEve->FullRedraw3D(kTRUE);
0043
0044
0045
0046 TGLViewer *v = gEve->GetDefaultGLViewer();
0047 v->GetClipSet()->SetClipType(TGLClip::kClipPlane);
0048 v->ColorSet().Background().SetColor(kMagenta+4);
0049 v->SetGuideState(TGLUtil::kAxesEdge, kTRUE, kFALSE, 0);
0050 v->RefreshPadEditor(v);
0051 v->CurrentCamera().RotateRad(-1.2, 0.5);
0052 v->DoDraw();
0053 }