Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against more than one track_scoring object in egsinp #751

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions HEN_HOUSE/egs++/egs_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,16 @@ void EGS_Application::addAusgabObject(EGS_AusgabObject *o) {
if (!o) {
return;
}
// only one track scoring object is allowed, otherwise there can be bugs
// if both objects try and write to the same file.
if (o->getObjectType() == "EGS_TrackScoring") {
for (int j=0; j<a_objects_list.size(); ++j) {
if (a_objects_list[j]->getObjectType() == "EGS_TrackScoring") {
egsFatal("error: only one ausgab object of type "
"'EGS_TrackScoring' is allowed\n");
}
}
}
o->setApplication(this);
a_objects_list.add(o);
//int ncall = 1 + (int)AugerEvent;
Expand Down