CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
DDSolidShapesName Struct Reference

#include <DDSolidShapes.h>

Static Public Member Functions

static const DDSolidShape index (const int &ind)
 
static const char * name (DDSolidShape s)
 

Detailed Description

Definition at line 18 of file DDSolidShapes.h.

Member Function Documentation

static const DDSolidShape DDSolidShapesName::index ( const int &  ind)
inlinestatic

Definition at line 38 of file DDSolidShapes.h.

References dd_not_init, ddbox, ddcons, ddellipsoid, ddellipticaltube, ddintersection, ddorb, ddparallelepiped, ddpolycone_rrz, ddpolycone_rz, ddpolyhedra_rrz, ddpolyhedra_rz, ddpseudotrap, ddreflected, ddshapeless, ddsphere, ddsubtraction, ddtorus, ddtrap, ddtrunctubs, ddtubs, and ddunion.

38  {
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  }
An exception for DDD errors.
Definition: DDException.h:23
static const char* DDSolidShapesName::name ( DDSolidShape  s)
inlinestatic

Definition at line 20 of file DDSolidShapes.h.

References trackerHits::c, and asciidump::s.

Referenced by BeautifulSoup.Tag::_invert(), SolidsForOnline::beginRun(), TGeoFromDddService::createManager(), DDLDivision::makeDivider(), operator<<(), TGeoMgrFromDdd::produce(), SteppingHelixPropagator::refToMagVolume(), DDStreamer::solids_write(), DDG4SolidConverter::trunctubs(), and python.Vispa.Views.PropertyView.Property::valueChanged().

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  }
string s
Definition: asciidump.py:422