Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:19

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 DDCAD_OUTPUTWRITER_H
0014 #define DDCAD_OUTPUTWRITER_H
0015 
0016 // Framework include files
0017 #include <DD4hep/config.h>
0018 #include <DD4hep/Volumes.h>
0019 
0020 /// C/C++ include files
0021 #include <string>
0022 #include <vector>
0023 #include <memory>
0024 
0025 /// Namespace for the AIDA detector description toolkit
0026 namespace dd4hep {
0027 
0028   /// Forward declarations
0029   class Detector;
0030   
0031   /// Namespace for implementation details of the AIDA detector description toolkit
0032   namespace cad  {
0033 
0034     /// Interface of the writer class to output geometry shapes from CAD files
0035     /**
0036      *
0037      *  \author  M.Frank
0038      *  \version 1.0
0039      *  \ingroup DD4HEP_DDCAD
0040      */
0041     class OutputWriter   {
0042     public:
0043       enum output_flags   {
0044                            EXPORT_POINT_CLOUDS = 1 << 1,
0045                            LAST = 0
0046       };
0047     public:
0048       /// Reference to the detector object
0049       Detector& detector;
0050 
0051     public:
0052       typedef std::vector<PlacedVolume> VolumePlacements;
0053       /// Default constructor
0054       OutputWriter(Detector& detector);
0055       /// Default destructor
0056       virtual ~OutputWriter();
0057       /// Write output file
0058       virtual int write(const std::string& output_file,
0059                         const std::string& output_type,
0060                         const VolumePlacements& places,
0061                         bool   recursive,
0062                         double unit_scale = 1.0)  const = 0;      
0063     };
0064     
0065   }        /* End namespace cad                      */
0066 }          /* End namespace dd4hep                   */
0067 
0068 #endif // DDCAD_OUTPUTWRITER_H