Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RandomNumbers.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file RandomNumbers.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 //
10 // RandomNumbers.hpp
11 // ActsExamples
12 //
13 // Created by Andreas Salzburger on 17/05/16.
14 //
15 //
16 
17 #pragma once
18 
20 
21 #include <cstdint>
22 #include <random>
23 
24 namespace ActsExamples {
25 struct AlgorithmContext;
26 
28 using RandomEngine = std::mt19937;
29 
42  public:
43  struct Config {
44  uint64_t seed = 1234567890u;
45  };
46 
47  RandomNumbers(const Config& cfg);
48 
56  RandomEngine spawnGenerator(const AlgorithmContext& context) const;
57 
62  uint64_t generateSeed(const AlgorithmContext& context) const;
63 
64  private:
66 };
67 
68 } // namespace ActsExamples