CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Fireworks/Geometry/interface/TGeoFromDddService.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Geometry_TGeoFromDddService_h
00002 #define Fireworks_Geometry_TGeoFromDddService_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Geometry
00006 // Class  :     TGeoFromDddService
00007 // 
00016 //
00017 // Original Author:  
00018 //         Created:  Fri Jul  2 16:11:33 CEST 2010
00019 // $Id: TGeoFromDddService.h,v 1.3 2010/08/24 07:11:59 yana Exp $
00020 //
00021 
00022 // system include files
00023 
00024 #include <string>
00025 #include <map>
00026 
00027 
00028 // user include files
00029 
00030 // forward declarations
00031 
00032 namespace edm
00033 {
00034    class ParameterSet;
00035    class ActivityRegistry;
00036    class Run;
00037    class EventSetup;
00038 }
00039 
00040 class DDSolid;
00041 class DDMaterial;
00042 
00043 class TGeoManager;
00044 class TGeoShape;
00045 class TGeoVolume;
00046 class TGeoMaterial;
00047 class TGeoMedium;
00048 
00049 class TGeoFromDddService
00050 {
00051 public:
00052    TGeoFromDddService(const edm::ParameterSet&, edm::ActivityRegistry&);
00053    virtual ~TGeoFromDddService();
00054 
00055    // ---------- const member functions ---------------------
00056 
00057    // ---------- static member functions --------------------
00058 
00059    // ---------- member functions ---------------------------
00060 
00061    void postBeginRun(const edm::Run&, const edm::EventSetup&);
00062    void postEndRun  (const edm::Run&, const edm::EventSetup&);
00063 
00064    TGeoManager* getGeoManager();
00065 
00066 private:
00067    TGeoFromDddService(const TGeoFromDddService&);                  // stop default
00068    const TGeoFromDddService& operator=(const TGeoFromDddService&); // stop default
00069 
00070 
00071    TGeoManager*  createManager(int level);
00072 
00073    TGeoShape*    createShape(const std::string& iName,
00074                              const DDSolid& iSolid);
00075    TGeoVolume*   createVolume(const std::string& iName,
00076                               const DDSolid& iSolid,
00077                               const DDMaterial& iMaterial);
00078    TGeoMaterial* createMaterial(const DDMaterial& iMaterial);
00079 
00080    // ---------- member data --------------------------------
00081 
00082    int                      m_level;
00083    bool                     m_verbose;
00084    const edm::EventSetup   *m_eventSetup;
00085    TGeoManager             *m_geoManager;
00086 
00087    std::map<std::string, TGeoShape*>    nameToShape_;
00088    std::map<std::string, TGeoVolume*>   nameToVolume_;
00089    std::map<std::string, TGeoMaterial*> nameToMaterial_;
00090    std::map<std::string, TGeoMedium*>   nameToMedium_;
00091 };
00092 
00093 #endif