CORSIKA  @c8_version@
The framework to simulate particle cascades for astroparticle physics
Random.hpp
Go to the documentation of this file.
1 /*
2  * (c) Copyright 2018 CORSIKA Project, corsika-project@lists.kit.edu
3  *
4  * This software is distributed under the terms of the GNU General Public
5  * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
6  * the license.
7  */
8 
9 #pragma once
10 
11 #include <corsika/framework/random/RNGManager.hpp>
12 #include <random>
13 
35 namespace conex {
36 
37  // GCOV_EXCL_START : we don't want to unit-test the random interface
38  float rndm_interface() {
39  static corsika::default_prng_type& rng =
41  std::uniform_real_distribution<float> dist;
42  return dist(rng);
43  }
44 
45  double double_rndm_interface() {
46  static corsika::default_prng_type& rng =
48  std::uniform_real_distribution<double> dist;
49  return dist(rng);
50  }
51  // GCOV_EXCL_STOP
52 
53 } // namespace conex
prng_type & getRandomStream(string_type const &streamName)