IAP GITLAB

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

more std boost filesystem use

parent 93f844fb
No related branches found
No related tags found
1 merge request!373Less verbose testing
Pipeline #4837 failed
......@@ -25,8 +25,7 @@ namespace corsika {
template <class Axes, class Storage>
inline void save_hist(boost::histogram::histogram<Axes, Storage> const& h,
std::string const& filename, bool overwrite) {
if (boost::filesystem::status(filename).type() !=
boost::filesystem::file_type::file_not_found) {
if (boost::filesystem::exists(filename)) {
if (overwrite) {
boost::filesystem::remove(filename);
} else {
......
......@@ -80,7 +80,7 @@ int main() {
UniformMagneticField<HomogeneousMedium<setup::EnvironmentInterface>>>;
world->setModelProperties<MyHomogeneousModel>(
Medium::AirDry1Atm, MagneticFieldVector(rootCS, 0_T, 0_T, 1_T),
Medium::AirDry1Atm, MagneticFieldVector(rootCS, 0_T, 0_T, 1_mT),
1_kg / (1_m * 1_m * 1_m),
NuclearComposition(std::vector<Code>{Code::Hydrogen},
std::vector<float>{(float)1.}));
......@@ -92,7 +92,7 @@ int main() {
stack.clear();
const Code beamCode = Code::Proton;
const HEPMassType mass = Proton::mass;
const HEPEnergyType E0 = 1000_GeV;
const HEPEnergyType E0 = 200_GeV;
double theta = 0.;
double phi = 0.;
......
......@@ -88,13 +88,11 @@ void registerRandomStreams(int seed) {
RNGManager<>::getInstance().registerRandomStream("pythia");
RNGManager<>::getInstance().registerRandomStream("urqmd");
RNGManager<>::getInstance().registerRandomStream("proposal");
if (seed == 0) {
std::random_device rd;
seed = rd();
cout << "new random seed (auto) " << seed << endl;
}
RNGManager<>::getInstance().setSeed(seed);
}
......
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