![]() |
|
|||
File indexing completed on 2025-02-21 09:58:00
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef DD4HEP_DD4HEPUI_H 0014 #define DD4HEP_DD4HEPUI_H 0015 0016 // Framework includes 0017 #include <DD4hep/Detector.h> 0018 #include <DD4hep/Printout.h> 0019 0020 /// Namespace for the AIDA detector description toolkit 0021 namespace dd4hep { 0022 0023 /// Namespace for implementation details of the AIDA detector description toolkit 0024 namespace detail { 0025 0026 /// ROOT interactive UI for dd4hep applications 0027 /** 0028 * 0029 * \author M.Frank 0030 * \version 1.0 0031 * \ingroup DD4HEP 0032 */ 0033 class DD4hepUI { 0034 protected: 0035 /// Reference to the Detector instance object 0036 Detector& m_detDesc; 0037 Handle<NamedObject> m_condMgr; 0038 Handle<NamedObject> m_alignMgr; 0039 /// Default visualiztion level 0040 int visLevel = 4; 0041 0042 public: 0043 /// Default constructor 0044 DD4hepUI(Detector& instance); 0045 /// Default destructor 0046 virtual ~DD4hepUI(); 0047 /// Access to the Detector instance 0048 Detector* instance() const; 0049 /// Access to the Detector instance 0050 Detector* detectorDescription() const; 0051 /// Set the printout level from the interactive prompt 0052 PrintLevel setPrintLevel(PrintLevel level) const; 0053 /// Set the visualization level when invoking the display 0054 int setVisLevel(int level); 0055 0056 /// Install the dd4hep conditions manager object 0057 Handle<NamedObject> conditionsMgr() const; 0058 /// Load conditions from file 0059 long loadConditions(const std::string& fname) const; 0060 0061 /// Dump the entire detector description object to a root file 0062 long saveROOT(const char* file_name) const; 0063 0064 /// Import the entire detector description object from a root file 0065 long importROOT(const char* file_name) const; 0066 0067 /// Install the dd4hep alignment manager object 0068 Handle<NamedObject> alignmentMgr() const; 0069 0070 /// Create ROOT interpreter instance 0071 long createInterpreter(int argc, char** argv); 0072 /// Execute ROOT interpreter instance 0073 long runInterpreter() const; 0074 0075 /// Detector interface: Manipulate geometry using factory converter 0076 virtual long apply(const char* factory, int argc, char** argv) const; 0077 /// Detector interface: Read any geometry description or alignment file 0078 virtual void fromXML(const std::string& fname, DetectorBuildType type = BUILD_DEFAULT) const; 0079 0080 /// Detector interface: Draw the scene on a OpenGL pane 0081 virtual void draw() const; 0082 /// Detector interface: Re-draw the entire scene 0083 virtual void redraw() const; 0084 0085 /// Detector interface: Draw detector sub-tree the scene on a OpenGL pane 0086 virtual void drawSubtree(const char* path) const; 0087 /// Detector interface: Re-draw the entire sub-tree scene 0088 virtual void redrawSubtree(const char* path) const; 0089 0090 /// Dump the volume tree 0091 virtual long dumpVols(int argc = 0, char** argv = 0) const; 0092 /// Dump the DetElement tree with placement volumes 0093 virtual long dumpDet(const char* path = 0) const; 0094 /// Dump the DetElement tree with volume materials 0095 virtual long dumpDetMaterials(const char* path = 0) const; 0096 /// Dump the raw DetElement tree 0097 virtual long dumpStructure(const char* path = 0) const; 0098 }; 0099 0100 } 0101 } /* End namespace dd4hep */ 0102 #endif // DD4HEP_DD4HEPUI_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |