23 std::set<int> possibleNumberOfParameters;
24 std::string type = s->
getType();
25 std::string name = s->
getName();
34 int actualNumberOfParameters =
static_cast<int>(parameters.size());
37 if (type ==
"G4Box") possibleNumberOfParameters = {3};
38 else if (type ==
"G4Tubs") possibleNumberOfParameters = {5};
39 else if (type ==
"G4CutTubs") possibleNumberOfParameters = {11};
40 else if (type ==
"G4Cons") possibleNumberOfParameters = {7};
41 else if (type ==
"G4Para") possibleNumberOfParameters = {6};
42 else if (type ==
"G4Trd") possibleNumberOfParameters = {5};
43 else if (type ==
"G4Trap") possibleNumberOfParameters = {4, 11};
44 else if (type ==
"G4Sphere") possibleNumberOfParameters = {6};
45 else if (type ==
"G4Orb") possibleNumberOfParameters = {1};
46 else if (type ==
"G4Torus") possibleNumberOfParameters = {5};
49 else if (type ==
"G4Polycone" || type ==
"G4GenericPolycone") {
52 if (actualNumberOfParameters % 3 != 0 &&
53 (actualNumberOfParameters - 3) % 2 != 0) {
56 "Wrong number of parameters in the constructor of <%1> of solid type <%2>: %3", name, type,
63 else if (type ==
"G4Polyhedra") {
66 if ((actualNumberOfParameters - 4) % 3 != 0 &&
67 (actualNumberOfParameters - 4) % 2 != 0) {
70 "Wrong number of parameters in the constructor of <%1> of solid type <%2>: %3", name, type,
76 else if (type ==
"G4EllipticalTube") possibleNumberOfParameters = {3};
77 else if (type ==
"G4Ellipsoid") possibleNumberOfParameters = {5};
78 else if (type ==
"G4EllipticalCone") possibleNumberOfParameters = {4};
79 else if (type ==
"G4Paraboloid") possibleNumberOfParameters = {3};
80 else if (type ==
"G4Hype") possibleNumberOfParameters = {5};
81 else if (type ==
"G4Tet") possibleNumberOfParameters = {12, 13};
82 else if (type ==
"G4TwistedBox") possibleNumberOfParameters = {4};
83 else if (type ==
"G4TwistedTrap") possibleNumberOfParameters = {5, 11};
84 else if (type ==
"G4TwistedTrd") possibleNumberOfParameters = {6};
85 else if (type ==
"G4TwistedTubs") possibleNumberOfParameters = {5};
93 if (possibleNumberOfParameters.find(actualNumberOfParameters)
94 == possibleNumberOfParameters.end()) {
97 "Wrong number of parameters in the constructor of <%1> of solid type <%2>: %3", name, type,