CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDSolidShapes.h
Go to the documentation of this file.
1 #ifndef DDSolidShapes_h
2 #define DDSolidShapes_h
4 
16  };
17 
19 
20  static const char * name(DDSolidShape s)
21  {
22  static const char* c[] = {
23  "Solid not initialized",
24  "Box", "Tube(section)", "Trapezoid", "Cone(section)",
25  "Polycone_rz", "Polyhedra_rz",
26  "Polycone_rrz", "Polyhedra_rrz",
27  "Torus",
28  "UnionSolid", "SubtractionSolid", "IntersectionSolid",
29  "ReflectedSolid",
30  "ShapelessSolid",
31  "PseudoTrapezoid","TruncatedTube(section)",
32  "Sphere(section)", "Orb", "EllipticalTube", "Ellipsoid",
33  "Parallelepiped"
34  };
35  return c[s];
36  }
37 
38  static const DDSolidShape index( const int& ind ) {
39  switch (ind) {
40  case 0:
41  return dd_not_init;
42  break;
43  case 1:
44  return ddbox;
45  break;
46  case 2:
47  return ddtubs;
48  break;
49  case 3:
50  return ddtrap;
51  break;
52  case 4:
53  return ddcons;
54  break;
55  case 5:
56  return ddpolycone_rz;
57  break;
58  case 6:
59  return ddpolyhedra_rz;
60  break;
61  case 7:
62  return ddpolycone_rrz;
63  break;
64  case 8:
65  return ddpolyhedra_rrz;
66  break;
67  case 9:
68  return ddtorus;
69  break;
70  case 10:
71  return ddunion;
72  break;
73  case 11:
74  return ddsubtraction;
75  break;
76  case 12:
77  return ddintersection;
78  break;
79  case 13:
80  return ddreflected;
81  break;
82  case 14:
83  return ddshapeless;
84  break;
85  case 15:
86  return ddpseudotrap;
87  break;
88  case 16:
89  return ddtrunctubs;
90  break;
91  case 17:
92  return ddsphere;
93  break;
94  case 18:
95  return ddorb;
96  break;
97  case 19:
98  return ddellipticaltube;
99  break;
100  case 20:
101  return ddellipsoid;
102  break;
103  case 21:
104  return ddparallelepiped;
105  break;
106  default:
107  throw DDException("DDSolidShapes:index wrong shape");
108  break;
109  }
110  }
111 
112 };
113 
114 
115 
116 #endif
static const DDSolidShape index(const int &ind)
Definition: DDSolidShapes.h:38
An exception for DDD errors.
Definition: DDException.h:23
DDSolidShape
Definition: DDSolidShapes.h:5
static const char * name(DDSolidShape s)
Definition: DDSolidShapes.h:20
string s
Definition: asciidump.py:422