23 std::set<int> possibleNumberOfParameters;
24 std::string type = s->
getType();
25 std::string name = s->
getName();
29 int actualNumberOfParameters =
static_cast<int>(parameters.size());
32 if (type ==
"G4Box") possibleNumberOfParameters = {3};
33 else if (type ==
"G4Tubs") possibleNumberOfParameters = {5};
34 else if (type ==
"G4CutTubs") possibleNumberOfParameters = {11};
35 else if (type ==
"G4Cons") possibleNumberOfParameters = {7};
36 else if (type ==
"G4Para") possibleNumberOfParameters = {6};
37 else if (type ==
"G4Trd") possibleNumberOfParameters = {5};
38 else if (type ==
"G4Trap") possibleNumberOfParameters = {4, 11};
39 else if (type ==
"G4Sphere") possibleNumberOfParameters = {6};
40 else if (type ==
"G4Orb") possibleNumberOfParameters = {1};
41 else if (type ==
"G4Torus") possibleNumberOfParameters = {5};
44 else if (type ==
"G4Polycone" || type ==
"G4GenericPolycone") {
47 if (actualNumberOfParameters % 3 != 0 &&
48 (actualNumberOfParameters - 3) % 2 != 0) {
50 "Wrong number of parameters in the constructor of <",
57 else if (type ==
"G4Polyhedra") {
60 if ((actualNumberOfParameters - 4) % 3 != 0 &&
61 (actualNumberOfParameters - 4) % 2 != 0) {
63 "Wrong number of parameters in the constructor of <",
69 else if (type ==
"G4EllipticalTube") possibleNumberOfParameters = {3};
70 else if (type ==
"G4Ellipsoid") possibleNumberOfParameters = {5};
71 else if (type ==
"G4EllipticalCone") possibleNumberOfParameters = {4};
72 else if (type ==
"G4Paraboloid") possibleNumberOfParameters = {3};
73 else if (type ==
"G4Hype") possibleNumberOfParameters = {5};
74 else if (type ==
"G4Tet") possibleNumberOfParameters = {12, 13};
75 else if (type ==
"G4TwistedBox") possibleNumberOfParameters = {4};
76 else if (type ==
"G4TwistedTrap") possibleNumberOfParameters = {5, 11};
77 else if (type ==
"G4TwistedTrd") possibleNumberOfParameters = {6};
78 else if (type ==
"G4TwistedTubs") possibleNumberOfParameters = {5};
81 "The constructor of <", name,
82 "> uses an unknown solid type <", type,
">");
86 if (possibleNumberOfParameters.find(actualNumberOfParameters)
87 == possibleNumberOfParameters.end()) {
89 "Wrong number of parameters in the constructor of <", name,