CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TGeoFromDddService.h
Go to the documentation of this file.
1 #ifndef Fireworks_Geometry_TGeoFromDddService_h
2 #define Fireworks_Geometry_TGeoFromDddService_h
3 // -*- C++ -*-
4 //
5 // Package: Geometry
6 // Class : TGeoFromDddService
7 //
16 //
17 // Original Author:
18 // Created: Fri Jul 2 16:11:33 CEST 2010
19 // $Id: TGeoFromDddService.h,v 1.3 2010/08/24 07:11:59 yana Exp $
20 //
21 
22 // system include files
23 
24 #include <string>
25 #include <map>
26 
27 
28 // user include files
29 
30 // forward declarations
31 
32 namespace edm
33 {
34  class ParameterSet;
35  class ActivityRegistry;
36  class Run;
37  class EventSetup;
38 }
39 
40 class DDSolid;
41 class DDMaterial;
42 
43 class TGeoManager;
44 class TGeoShape;
45 class TGeoVolume;
46 class TGeoMaterial;
47 class TGeoMedium;
48 
50 {
51 public:
53  virtual ~TGeoFromDddService();
54 
55  // ---------- const member functions ---------------------
56 
57  // ---------- static member functions --------------------
58 
59  // ---------- member functions ---------------------------
60 
61  void postBeginRun(const edm::Run&, const edm::EventSetup&);
62  void postEndRun (const edm::Run&, const edm::EventSetup&);
63 
64  TGeoManager* getGeoManager();
65 
66 private:
67  TGeoFromDddService(const TGeoFromDddService&); // stop default
68  const TGeoFromDddService& operator=(const TGeoFromDddService&); // stop default
69 
70 
71  TGeoManager* createManager(int level);
72 
73  TGeoShape* createShape(const std::string& iName,
74  const DDSolid& iSolid);
75  TGeoVolume* createVolume(const std::string& iName,
76  const DDSolid& iSolid,
77  const DDMaterial& iMaterial);
78  TGeoMaterial* createMaterial(const DDMaterial& iMaterial);
79 
80  // ---------- member data --------------------------------
81 
82  int m_level;
83  bool m_verbose;
85  TGeoManager *m_geoManager;
86 
87  std::map<std::string, TGeoShape*> nameToShape_;
88  std::map<std::string, TGeoVolume*> nameToVolume_;
89  std::map<std::string, TGeoMaterial*> nameToMaterial_;
90  std::map<std::string, TGeoMedium*> nameToMedium_;
91 };
92 
93 #endif
std::map< std::string, TGeoMaterial * > nameToMaterial_
TGeoManager * m_geoManager
const edm::EventSetup * m_eventSetup
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
TGeoVolume * createVolume(const std::string &iName, const DDSolid &iSolid, const DDMaterial &iMaterial)
const TGeoFromDddService & operator=(const TGeoFromDddService &)
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
std::map< std::string, TGeoVolume * > nameToVolume_
std::map< std::string, TGeoMedium * > nameToMedium_
void postBeginRun(const edm::Run &, const edm::EventSetup &)
TGeoFromDddService(const edm::ParameterSet &, edm::ActivityRegistry &)
TGeoMaterial * createMaterial(const DDMaterial &iMaterial)
TGeoManager * createManager(int level)
std::map< std::string, TGeoShape * > nameToShape_
tuple level
Definition: testEve_cfg.py:34
TGeoManager * getGeoManager()
void postEndRun(const edm::Run &, const edm::EventSetup &)
TGeoShape * createShape(const std::string &iName, const DDSolid &iSolid)
Definition: Run.h:33