Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:16:59

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 
0014 #ifndef DDCORE_SRC_GEOMETRYTREEDUMP_H
0015 #define DDCORE_SRC_GEOMETRYTREEDUMP_H
0016 
0017 // Framework include files
0018 #include <DD4hep/Detector.h>
0019 #include <DD4hep/GeoHandler.h>
0020 
0021 // C/C++ include files
0022 #include <set>
0023 #include <map>
0024 #include <vector>
0025 
0026 class TGeoVolume;
0027 class TGeoNode;
0028 
0029 /// Namespace for the AIDA detector description toolkit
0030 namespace dd4hep {
0031 
0032   /// Namespace for implementation details of the AIDA detector description toolkit
0033   namespace detail {
0034 
0035     /// Geometry to screen dump action
0036     /**
0037      *  \author  M.Frank
0038      *  \version 1.0
0039      *  \ingroup DD4HEP_CORE
0040      */
0041     class GeometryTreeDump: public GeoHandler {
0042     public:
0043       GeometryTreeDump() = default;
0044       /// Standard destructor
0045       virtual ~GeometryTreeDump() = default;
0046       /// Main entry point: create required object(s)
0047       void create(DetElement top);
0048 
0049       /// Dump logical volume in GDML format to output stream
0050       virtual void* handleVolume(const std::string& name, Volume volume) const;
0051       /// Dump single volume transformation in GDML format to output stream
0052       virtual void* handleTransformation(const std::string& name, const TGeoMatrix* matrix) const;
0053       /// Dump solid in GDML format to output stream
0054       virtual void* handleSolid(const std::string& name, const TGeoShape* volume) const;
0055 
0056       /// Dump all constants in GDML format to output stream
0057       virtual void handleDefines(const Detector::HandleMap& defs) const;
0058       /// Dump all visualisation specs in Detector format to output stream
0059       void handleVisualisation(const Detector::HandleMap& vis) const;
0060       /// Dump all solids in GDML format to output stream
0061       virtual void handleSolids(const std::set<TGeoShape*>& solids) const;
0062       /// Dump Transformations in GDML format to output stream
0063       virtual void handleTransformations(const std::vector<std::pair<std::string, TGeoMatrix*> >& trafos) const;
0064       /// Dump structure information in GDML format to output stream
0065       virtual void handleStructure(const std::set<Volume>& volset) const;
0066     };
0067   }    // End namespace detail
0068 }      // End namespace dd4hep
0069 #endif // DDCORE_SRC_GEOMETRYTREEDUMP_H