DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeometryTreeDump.h
Go to the documentation of this file.
1 // $Id$
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 
15 #ifndef DD4HEP_GEOMETRYTREEDUMP_H
16 #define DD4HEP_GEOMETRYTREEDUMP_H
17 
18 #include "DD4hep/LCDD.h"
19 #include "DD4hep/GeoHandler.h"
20 #include <set>
21 #include <map>
22 #include <vector>
23 class TGeoVolume;
24 class TGeoNode;
25 
27 namespace DD4hep {
28 
30  namespace Geometry {
31 
33 
38  class GeometryTreeDump: public GeoHandler {
39  public:
41  }
43  virtual ~GeometryTreeDump() {
44  }
46  void create(DetElement top);
47 
49  virtual void* handleVolume(const std::string& name, Volume volume) const;
51  virtual void* handleTransformation(const std::string& name, const TGeoMatrix* matrix) const;
53  virtual void* handleSolid(const std::string& name, const TGeoShape* volume) const;
54 
56  virtual void handleDefines(const LCDD::HandleMap& defs) const;
58  void handleVisualisation(const LCDD::HandleMap& vis) const;
60  virtual void handleSolids(const SolidSet& solids) const;
62  virtual void handleTransformations(const TransformSet& trafos) const;
64  virtual void handleStructure(const VolumeSet& volset) const;
65  };
66  } // End namespace Geometry
67 } // End namespace DD4hep
68 
69 #endif // DD4HEP_GEOMETRYTREEDUMP_H
Geometry to screen dump action.
std::set< Volume > VolumeSet
Definition: GeoHandler.h:52
virtual void handleSolids(const SolidSet &solids) const
Dump all solids in GDML format to output stream.
virtual void handleDefines(const LCDD::HandleMap &defs) const
Dump all constants in GDML format to output stream.
virtual void * handleTransformation(const std::string &name, const TGeoMatrix *matrix) const
Dump single volume transformation in GDML format to output stream.
std::set< TGeoShape * > SolidSet
Definition: GeoHandler.h:56
std::vector< std::pair< std::string, TGeoMatrix * > > TransformSet
Definition: GeoHandler.h:55
Handle class holding a placed volume (also called physical volume)
Definition: Volumes.h:237
virtual void * handleSolid(const std::string &name, const TGeoShape *volume) const
Dump solid in GDML format to output stream.
The base class for all DD4hep geometry crawlers.
Definition: GeoHandler.h:102
virtual void handleTransformations(const TransformSet &trafos) const
Dump Transformations in GDML format to output stream.
virtual void * handleVolume(const std::string &name, Volume volume) const
Dump logical volume in GDML format to output stream.
void create(DetElement top)
Main entry point: create required object(s)
virtual ~GeometryTreeDump()
Standard destructor.
Handle class describing a detector element.
Definition: Detector.h:172
void handleVisualisation(const LCDD::HandleMap &vis) const
Dump all visualisation specs in LCDD format to output stream.
virtual void handleStructure(const VolumeSet &volset) const
Dump structure information in GDML format to output stream.
std::map< std::string, NamedHandle > HandleMap
Definition: LCDD.h:87