IAP GITLAB

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

better ctest output, qgsjet better filename handling

parent dc6ffc26
No related branches found
No related tags found
1 merge request!271Resolve "Assumption of no continuous between two stochastic losses"
......@@ -16,6 +16,7 @@ variables:
# _alternatively_ corsika-data can be downloaded as submodule:
GIT_SUBMODULE_STRATEGY: normal # none: we get the submodules in before_script,
# normal: get submodules automatically
CTEST_OUTPUT_ON_FAILURE: 1
#
......
......@@ -27,20 +27,14 @@
namespace corsika::qgsjetII {
inline Interaction::Interaction(const std::string& dataPath)
: data_path_(dataPath) {
if (dataPath == "") {
if (std::getenv("CORSIKA_DATA")) {
data_path_ = std::string(std::getenv("CORSIKA_DATA")) + "/QGSJetII/";
CORSIKA_LOG_DEBUG("Searching for QGSJetII data tables in {}", data_path_);
}
}
inline Interaction::Interaction(boost::filesystem::path dataPath) {
CORSIKA_LOG_DEBUG("Reading QGSJetII data tables from {}", dataPath);
// initialize QgsjetII
static bool initialized = false;
if (!initialized) {
qgset_();
datadir DIR(data_path_);
datadir DIR(dataPath.string() + "/");
qgaini_(DIR.data);
initialized = true;
}
......
......@@ -13,6 +13,10 @@
#include <corsika/framework/random/RNGManager.hpp>
#include <corsika/framework/process/InteractionProcess.hpp>
#include <corsika/modules/qgsjetII/ParticleConversion.hpp>
#include <corsika/framework/utility/CorsikaData.hpp>
#include <boost/filesystem/path.hpp>
#include <qgsjet-II-04.hpp>
#include <string>
......@@ -21,14 +25,8 @@ namespace corsika::qgsjetII {
class Interaction : public corsika::InteractionProcess<Interaction> {
std::string data_path_;
int count_ = 0;
bool initialized_ = false;
QgsjetIIHadronType alternate_ =
QgsjetIIHadronType::PiPlusType; // for pi0, rho0 projectiles
public:
Interaction(const std::string& dataPath = "");
Interaction(boost::filesystem::path dataPath = corsika_data("QGSJetII"));
~Interaction();
bool wasInitialized() { return initialized_; }
......@@ -53,6 +51,11 @@ namespace corsika::qgsjetII {
void doInteraction(TSecondaryView&);
private:
int count_ = 0;
bool initialized_ = false;
QgsjetIIHadronType alternate_ =
QgsjetIIHadronType::PiPlusType; // for pi0, rho0 projectiles
corsika::default_prng_type& rng_ =
corsika::RNGManager::getInstance().getRandomStream("qgsjet");
const int maxMassNumber_ = 208;
......
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