IAP GITLAB

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

adapt QGSJet RNG

parent e1ae4afc
No related branches found
No related tags found
1 merge request!572Resolve "Random number generators in modules: linkage, missing symbols, etc."
......@@ -25,6 +25,7 @@ target_include_directories (
$<INSTALL_INTERFACE:include/corsika_modules/qgsjetII>
)
target_link_libraries (QGSJetII_static CorsikaData)
target_link_libraries (QGSJetII_static modules_common)
install (
FILES
......
#include <qgsjet-II-04.hpp>
#include <rng_impl.hpp>
#include <iostream>
......@@ -13,9 +14,11 @@ datadir::datadir(std::string const& dir) {
data[i + 1] = '\0';
}
IMPLEMENT_RNG(qgsjetII)
/**
@function qgran
link to random number generation
*/
double qgran_(int&) { return qgsjetII::rndm_interface(); }
double qgran_(int&) { return draw_std_rnd(); }
......@@ -10,22 +10,15 @@
#include <string>
#include <rng_decl.hpp>
/**
* @file qgsjet-II.04.hpp
*
* The interface to the fortran code.
*/
namespace qgsjetII {
/**
* This is the random number hook to external packages.
*
* CORSIKA8, for example, has to provide an implementation of this.
*/
extern double rndm_interface();
} // namespace qgsjetII
DECLARE_RNG(qgsjetII)
//----------------------------------------------
// C++ interface for the QGSJetII event generator
......@@ -36,7 +29,9 @@ extern "C" {
// data memory layout
extern struct { int nsp; } qgarr12_;
extern struct {
int nsp;
} qgarr12_;
const int nptmax = 95000;
const int iapmax = 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