IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 2f94fb39 authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

deleted walk() example

parent 24bc10e4
No related branches found
No related tags found
1 merge request!84Resolve "generalize nuclear cross sections"
Pipeline #343 passed
...@@ -246,24 +246,6 @@ int main() { ...@@ -246,24 +246,6 @@ int main() {
universe.AddChild(std::move(theMedium)); universe.AddChild(std::move(theMedium));
auto const allElementsInUniverse = std::invoke([&]() {
std::set<particles::Code> allElementsInUniverse;
auto collectElements = [&](auto& vtn) {
if (auto const mp = vtn.GetModelPropertiesPtr();
mp != nullptr) { // do not query Universe it self, it has no ModelProperties
auto const& comp = mp->GetNuclearComposition().GetComponents();
for (auto const c : comp)
allElementsInUniverse.insert(c);
// std::for_each(comp.cbegin(), comp.cend(),
// [&](particles::Code c) { allElementsInUniverse.insert(c); });
}
};
universe.walk(collectElements);
return allElementsInUniverse;
});
for (auto elem : allElementsInUniverse) { std::cout << elem << std::endl; }
const CoordinateSystem& rootCS = env.GetCoordinateSystem(); const CoordinateSystem& rootCS = env.GetCoordinateSystem();
// setup processes, decays and interactions // setup processes, decays and interactions
......
...@@ -80,7 +80,7 @@ namespace corsika::environment { ...@@ -80,7 +80,7 @@ namespace corsika::environment {
} else { } else {
std::for_each(fChildNodes.begin(), fChildNodes.end(), std::for_each(fChildNodes.begin(), fChildNodes.end(),
[&](auto& v) { v->walk(func); }); [&](auto& v) { v->walk(func); });
t(*this); func(*this);
} }
} }
......
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