Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 5ae130c2 authored by ext-calvo_p's avatar ext-calvo_p
Browse files

verifying parmatint type

parent 5061c042
No related branches found
No related tags found
1 merge request!466Resolve "Verifying particle matter interaction type"
......@@ -123,20 +123,21 @@ void ParticleMatterInteraction::initParticleMatterInteractionHandler(ElementBase
bool enableRutherford = Attributes::getBool(itsAttr[ENABLERUTHERFORD]);
const std::string type = Attributes::getString(itsAttr[TYPE]);
if (type == "CCOLLIMATOR" ||
type == "COLLIMATOR" ||
type == "DEGRADER") {
handler_m = new CollimatorPhysics(getOpalName(), &element, material, enableRutherford);
*gmsg << *this << endl;
}
else if (type == "BEAMSTRIPPING") {
handler_m = new BeamStrippingPhysics(getOpalName(), &element);
*gmsg << *this << endl;
}
else {
handler_m = 0;
INFOMSG(getOpalName() + ": no particle mater interaction handler attached, TYPE == " << Attributes::getString(itsAttr[TYPE]) << endl);
if (type.empty()) {
throw OpalException("ParticleMatterInteraction::initParticleMatterInteractionHandler",
"TYPE is not defined for PARTICLEMATTERINTERACTION");
} else if (type == "CCOLLIMATOR" ||
type == "COLLIMATOR" ||
type == "DEGRADER") {
handler_m = new CollimatorPhysics(getOpalName(), &element, material, enableRutherford);
*gmsg << *this << endl;
} else if (type == "BEAMSTRIPPING") {
handler_m = new BeamStrippingPhysics(getOpalName(), &element);
*gmsg << *this << endl;
} else {
throw OpalException("ParticleMatterInteraction::initParticleMatterInteractionHandler",
getOpalName() + ": TYPE == " + Attributes::getString(itsAttr[TYPE])
+ " is not defined!");
}
}
......@@ -153,4 +154,4 @@ void ParticleMatterInteraction::print(std::ostream &os) const {
os << "* MATERIAL " << Attributes::getString(itsAttr[MATERIAL]) << '\n';
os << "* ********************************************************************************** " << std::endl;
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment