DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
GeometryTreeDump.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 
14 #ifndef DDCORE_SRC_GEOMETRYTREEDUMP_H
15 #define DDCORE_SRC_GEOMETRYTREEDUMP_H
16 
17 // Framework include files
18 #include <DD4hep/Detector.h>
19 #include <DD4hep/GeoHandler.h>
20 
21 // C/C++ include files
22 #include <set>
23 #include <map>
24 #include <vector>
25 
26 class TGeoVolume;
27 class TGeoNode;
28 
30 namespace dd4hep {
31 
33  namespace detail {
34 
36 
41  class GeometryTreeDump: public GeoHandler {
42  public:
43  GeometryTreeDump() = default;
45  virtual ~GeometryTreeDump() = default;
47  void create(DetElement top);
48 
50  virtual void* handleVolume(const std::string& name, Volume volume) const;
52  virtual void* handleTransformation(const std::string& name, const TGeoMatrix* matrix) const;
54  virtual void* handleSolid(const std::string& name, const TGeoShape* volume) const;
55 
57  virtual void handleDefines(const Detector::HandleMap& defs) const;
59  void handleVisualisation(const Detector::HandleMap& vis) const;
61  virtual void handleSolids(const std::set<TGeoShape*>& solids) const;
63  virtual void handleTransformations(const std::vector<std::pair<std::string, TGeoMatrix*> >& trafos) const;
65  virtual void handleStructure(const std::set<Volume>& volset) const;
66  };
67  } // End namespace detail
68 } // End namespace dd4hep
69 #endif // DDCORE_SRC_GEOMETRYTREEDUMP_H
dd4hep::detail::GeometryTreeDump::~GeometryTreeDump
virtual ~GeometryTreeDump()=default
Standard destructor.
dd4hep::detail::GeometryTreeDump::handleSolid
virtual void * handleSolid(const std::string &name, const TGeoShape *volume) const
Dump solid in GDML format to output stream.
Definition: GeometryTreeDump.cpp:107
dd4hep::detail::GeometryTreeDump::GeometryTreeDump
GeometryTreeDump()=default
Detector.h
dd4hep::detail::GeometryTreeDump::handleTransformation
virtual void * handleTransformation(const std::string &name, const TGeoMatrix *matrix) const
Dump single volume transformation in GDML format to output stream.
Definition: GeometryTreeDump.cpp:200
dd4hep::detail::GeometryTreeDump::handleSolids
virtual void handleSolids(const std::set< TGeoShape * > &solids) const
Dump all solids in GDML format to output stream.
Definition: GeometryTreeDump.cpp:231
dd4hep::detail::GeometryTreeDump::handleVolume
virtual void * handleVolume(const std::string &name, Volume volume) const
Dump logical volume in GDML format to output stream.
Definition: GeometryTreeDump.cpp:72
dd4hep::detail::GeometryTreeDump::handleDefines
virtual void handleDefines(const Detector::HandleMap &defs) const
Dump all constants in GDML format to output stream.
Definition: GeometryTreeDump.cpp:239
dd4hep::DetElement
Handle class describing a detector element.
Definition: DetElement.h:188
dd4hep::Volume
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:378
dd4hep::detail::GeoHandler
The base class for all dd4hep geometry crawlers.
Definition: GeoHandler.h:87
dd4hep::detail::GeometryTreeDump::handleTransformations
virtual void handleTransformations(const std::vector< std::pair< std::string, TGeoMatrix * > > &trafos) const
Dump Transformations in GDML format to output stream.
Definition: GeometryTreeDump.cpp:223
dd4hep::detail::GeometryTreeDump::create
void create(DetElement top)
Main entry point: create required object(s)
Definition: GeometryTreeDump.cpp:294
dd4hep::Detector::HandleMap
std::map< std::string, Handle< NamedObject > > HandleMap
Type definition of a map of named handles.
Definition: Detector.h:93
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::detail::GeometryTreeDump::handleVisualisation
void handleVisualisation(const Detector::HandleMap &vis) const
Dump all visualisation specs in Detector format to output stream.
Definition: GeometryTreeDump.cpp:248
dd4hep::detail::GeometryTreeDump::handleStructure
virtual void handleStructure(const std::set< Volume > &volset) const
Dump structure information in GDML format to output stream.
Definition: GeometryTreeDump.cpp:192
dd4hep::detail::GeometryTreeDump
Geometry to screen dump action.
Definition: GeometryTreeDump.h:41
GeoHandler.h