DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
DD4hepUI.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 #ifndef DD4HEP_DD4HEPUI_H
14 #define DD4HEP_DD4HEPUI_H
15 
16 // Framework includes
17 #include <DD4hep/Detector.h>
18 #include <DD4hep/Printout.h>
19 
21 namespace dd4hep {
22 
24  namespace detail {
25 
27 
33  class DD4hepUI {
34  protected:
40  int visLevel = 4;
41 
42  public:
46  virtual ~DD4hepUI();
48  Detector* instance() const;
52  PrintLevel setPrintLevel(PrintLevel level) const;
54  int setVisLevel(int level);
55 
59  long loadConditions(const std::string& fname) const;
60 
62  long saveROOT(const char* file_name) const;
63 
65  long importROOT(const char* file_name) const;
66 
69 
71  long createInterpreter(int argc, char** argv);
73  long runInterpreter() const;
74 
76  virtual long apply(const char* factory, int argc, char** argv) const;
78  virtual void fromXML(const std::string& fname, DetectorBuildType type = BUILD_DEFAULT) const;
79 
81  virtual void draw() const;
83  virtual void redraw() const;
84 
86  virtual void drawSubtree(const char* path) const;
88  virtual void redrawSubtree(const char* path) const;
89 
91  virtual long dumpVols(int argc = 0, char** argv = 0) const;
93  virtual long dumpDet(const char* path = 0) const;
95  virtual long dumpDetMaterials(const char* path = 0) const;
97  virtual long dumpStructure(const char* path = 0) const;
98  };
99 
100  }
101 } /* End namespace dd4hep */
102 #endif // DD4HEP_DD4HEPUI_H
dd4hep::detail::DD4hepUI::alignmentMgr
Handle< NamedObject > alignmentMgr() const
Install the dd4hep alignment manager object.
Definition: DD4hepUI.cpp:84
dd4hep::detail::DD4hepUI::importROOT
long importROOT(const char *file_name) const
Import the entire detector description object from a root file.
Definition: DD4hepUI.cpp:169
dd4hep::detail::DD4hepUI::fromXML
virtual void fromXML(const std::string &fname, DetectorBuildType type=BUILD_DEFAULT) const
Detector interface: Read any geometry description or alignment file.
Definition: DD4hepUI.cpp:103
dd4hep::detail::DD4hepUI::redrawSubtree
virtual void redrawSubtree(const char *path) const
Detector interface: Re-draw the entire sub-tree scene.
Definition: DD4hepUI.cpp:125
Detector.h
dd4hep::detail::DD4hepUI::apply
virtual long apply(const char *factory, int argc, char **argv) const
Detector interface: Manipulate geometry using factory converter.
Definition: DD4hepUI.cpp:98
dd4hep::Handle< NamedObject >
dd4hep::detail::DD4hepUI::dumpDet
virtual long dumpDet(const char *path=0) const
Dump the DetElement tree with placement volumes.
Definition: DD4hepUI.cpp:141
dd4hep::detail::DD4hepUI::instance
Detector * instance() const
Access to the Detector instance.
Definition: DD4hepUI.cpp:38
dd4hep::detail::DD4hepUI::setPrintLevel
PrintLevel setPrintLevel(PrintLevel level) const
Set the printout level from the interactive prompt.
Definition: DD4hepUI.cpp:48
dd4hep::detail::DD4hepUI::setVisLevel
int setVisLevel(int level)
Set the visualization level when invoking the display.
Definition: DD4hepUI.cpp:53
dd4hep::detail::DD4hepUI::runInterpreter
long runInterpreter() const
Execute ROOT interpreter instance.
Definition: DD4hepUI.cpp:192
dd4hep::detail::DD4hepUI::dumpVols
virtual long dumpVols(int argc=0, char **argv=0) const
Dump the volume tree.
Definition: DD4hepUI.cpp:132
dd4hep::detail::DD4hepUI::drawSubtree
virtual void drawSubtree(const char *path) const
Detector interface: Draw detector sub-tree the scene on a OpenGL pane.
Definition: DD4hepUI.cpp:118
dd4hep::detail::DD4hepUI::m_detDesc
Detector & m_detDesc
Reference to the Detector instance object.
Definition: DD4hepUI.h:36
dd4hep::detail::DD4hepUI::DD4hepUI
DD4hepUI(Detector &instance)
Default constructor.
Definition: DD4hepUI.cpp:30
dd4hep::detail::DD4hepUI::redraw
virtual void redraw() const
Detector interface: Re-draw the entire scene.
Definition: DD4hepUI.cpp:113
dd4hep::detail::DD4hepUI::detectorDescription
Detector * detectorDescription() const
Access to the Detector instance.
Definition: DD4hepUI.cpp:43
dd4hep::detail::DD4hepUI::dumpDetMaterials
virtual long dumpDetMaterials(const char *path=0) const
Dump the DetElement tree with volume materials.
Definition: DD4hepUI.cpp:147
dd4hep::detail::DD4hepUI::draw
virtual void draw() const
Detector interface: Draw the scene on a OpenGL pane.
Definition: DD4hepUI.cpp:108
dd4hep::detail::DD4hepUI::m_condMgr
Handle< NamedObject > m_condMgr
Definition: DD4hepUI.h:37
dd4hep::detail::DD4hepUI
ROOT interactive UI for dd4hep applications.
Definition: DD4hepUI.h:33
dd4hep::detail::DD4hepUI::visLevel
int visLevel
Default visualiztion level.
Definition: DD4hepUI.h:40
dd4hep::DetectorBuildType
DetectorBuildType
Detector description build types.
Definition: BuildType.h:34
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::detail::DD4hepUI::m_alignMgr
Handle< NamedObject > m_alignMgr
Definition: DD4hepUI.h:38
dd4hep::detail::DD4hepUI::~DD4hepUI
virtual ~DD4hepUI()
Default destructor.
Definition: DD4hepUI.cpp:34
dd4hep::Detector
The main interface to the dd4hep detector description package.
Definition: Detector.h:90
dd4hep::BUILD_DEFAULT
@ BUILD_DEFAULT
Definition: BuildType.h:36
dd4hep::detail::DD4hepUI::loadConditions
long loadConditions(const std::string &fname) const
Load conditions from file.
Definition: DD4hepUI.cpp:74
dd4hep::detail::DD4hepUI::saveROOT
long saveROOT(const char *file_name) const
Dump the entire detector description object to a root file.
Definition: DD4hepUI.cpp:159
Printout.h
dd4hep::detail::DD4hepUI::conditionsMgr
Handle< NamedObject > conditionsMgr() const
Install the dd4hep conditions manager object.
Definition: DD4hepUI.cpp:60
dd4hep::detail::DD4hepUI::createInterpreter
long createInterpreter(int argc, char **argv)
Create ROOT interpreter instance.
Definition: DD4hepUI.cpp:179
dd4hep::detail::DD4hepUI::dumpStructure
virtual long dumpStructure(const char *path=0) const
Dump the raw DetElement tree.
Definition: DD4hepUI.cpp:153