23 std::set<int> possibleNumberOfParameters;
24 std::string type = s->
getType();
25 std::string name = s->
getName();
30 "Native solid <", s->
getG4Name(),
"> has no constructor parameters");
33 int actualNumberOfParameters =
static_cast<int>(parameters.size());
36 if (type ==
"G4Box") possibleNumberOfParameters = {3};
37 else if (type ==
"G4Tubs") possibleNumberOfParameters = {5};
38 else if (type ==
"G4CutTubs") possibleNumberOfParameters = {11};
39 else if (type ==
"G4Cons") possibleNumberOfParameters = {7};
40 else if (type ==
"G4Para") possibleNumberOfParameters = {6};
41 else if (type ==
"G4Trd") possibleNumberOfParameters = {5};
42 else if (type ==
"G4Trap") possibleNumberOfParameters = {4, 11};
43 else if (type ==
"G4Sphere") possibleNumberOfParameters = {6};
44 else if (type ==
"G4Orb") possibleNumberOfParameters = {1};
45 else if (type ==
"G4Torus") possibleNumberOfParameters = {5};
48 else if (type ==
"G4Polycone" || type ==
"G4GenericPolycone") {
51 if (actualNumberOfParameters % 3 != 0 &&
52 (actualNumberOfParameters - 3) % 2 != 0) {
54 "Wrong number of parameters in the constructor of <",
61 else if (type ==
"G4Polyhedra") {
64 if ((actualNumberOfParameters - 4) % 3 != 0 &&
65 (actualNumberOfParameters - 4) % 2 != 0) {
67 "Wrong number of parameters in the constructor of <",
73 else if (type ==
"G4EllipticalTube") possibleNumberOfParameters = {3};
74 else if (type ==
"G4Ellipsoid") possibleNumberOfParameters = {5};
75 else if (type ==
"G4EllipticalCone") possibleNumberOfParameters = {4};
76 else if (type ==
"G4Paraboloid") possibleNumberOfParameters = {3};
77 else if (type ==
"G4Hype") possibleNumberOfParameters = {5};
78 else if (type ==
"G4Tet") possibleNumberOfParameters = {12, 13};
79 else if (type ==
"G4TwistedBox") possibleNumberOfParameters = {4};
80 else if (type ==
"G4TwistedTrap") possibleNumberOfParameters = {5, 11};
81 else if (type ==
"G4TwistedTrd") possibleNumberOfParameters = {6};
82 else if (type ==
"G4TwistedTubs") possibleNumberOfParameters = {5};
85 "The constructor of <", name,
86 "> uses an unknown solid type <", type,
">");
90 if (possibleNumberOfParameters.find(actualNumberOfParameters)
91 == possibleNumberOfParameters.end()) {
93 "Wrong number of parameters in the constructor of <", name,