IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 44dcfb0d authored by ralfulrich's avatar ralfulrich
Browse files

urqmd better filename handling

parent e1cfad0f
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
namespace corsika::urqmd {
inline UrQMD::UrQMD(boost::filesystem::path const& xs_file) {
inline UrQMD::UrQMD(boost::filesystem::path xs_file) {
readXSFile(xs_file);
::urqmd::iniurqmdc8_();
}
......@@ -394,7 +394,7 @@ namespace corsika::urqmd {
return mapPDGToUrQMD.at(static_cast<int>(get_PDG(code)));
}
inline void UrQMD::readXSFile(boost::filesystem::path const& filename) {
inline void UrQMD::readXSFile(boost::filesystem::path const filename) {
boost::filesystem::ifstream file(filename, std::ios::in);
if (!file.is_open()) {
......@@ -429,6 +429,7 @@ namespace corsika::urqmd {
std::getline(file, line);
}
}
file.close();
}
} // namespace corsika::urqmd
......@@ -27,7 +27,7 @@ namespace corsika::urqmd {
class UrQMD : public InteractionProcess<UrQMD> {
public:
UrQMD(boost::filesystem::path const& path = corsika_data("UrQMD/UrQMD-1.3.1-xs.dat"));
UrQMD(boost::filesystem::path const path = corsika_data("UrQMD/UrQMD-1.3.1-xs.dat"));
template <typename TParticle>
GrammageType getInteractionLength(TParticle const&) const;
......@@ -46,7 +46,7 @@ namespace corsika::urqmd {
private:
static CrossSectionType getCrossSection(Code, Code, HEPEnergyType, int);
void readXSFile(boost::filesystem::path const&);
void readXSFile(boost::filesystem::path);
// data members
default_prng_type& RNG_ = RNGManager::getInstance().getRandomStream("urqmd");
......
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