EIC 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 
27 using RandomEngine = std::mt19937;
28 
41  public:
42  struct Config {
43  uint64_t seed = 1234567890u;
44  };
45 
46  RandomNumbers(const Config& cfg);
47 
55  RandomEngine spawnGenerator(const AlgorithmContext& context) const;
56 
61  uint64_t generateSeed(const AlgorithmContext& context) const;
62 
63  private:
65 };
66 
67 } // namespace ActsExamples