Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (d98a2936)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
HepRndmEngine.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 //====================================================================
12 // CLHEP Random Engine definition file
13 //--------------------------------------------------------------------
14 //
15 // Package : HepRndm ( The LHCb Offline System)
16 // Author : M.Frank
17 // History :
18 // +---------+----------------------------------------------+---------
19 // | Date | Comment | Who
20 // +---------+----------------------------------------------+---------
21 // | 29/10/99| Initial version | MF
22 // +---------+----------------------------------------------+---------
23 //
24 //====================================================================
25 #pragma once
26 
27 // Framework include files
28 #include "HepRndmBaseEngine.h"
29 #include <vector>
30 
31 namespace HepRndm {
32 
33  template <class TYPE>
34  class Engine : public BaseEngine {
35  protected:
36  mutable Gaudi::Property<std::vector<long>> m_seeds{ this, "Seeds", {}, "seed table" };
37 
38  Gaudi::Property<int> m_col{ this, "Column", 0 };
39  Gaudi::Property<int> m_row{ this, "Row", 1 };
40  Gaudi::Property<int> m_lux{ this, "Luxury", 3 };
41  Gaudi::Property<bool> m_useTable{ this, "UseTable", false };
42  Gaudi::Property<bool> m_setSingleton{ this, "SetSingleton", false };
43 
44  public:
48  StatusCode initialize() override;
50  StatusCode finalize() override;
52  StatusCode setSeeds( const std::vector<long>& seed ) override;
54  StatusCode seeds( std::vector<long>& seed ) const override;
55 
56  private:
58  std::unique_ptr<CLHEP::HepRandomEngine> createEngine() override;
59  };
60 } // namespace HepRndm
HepRndm::Engine::seeds
StatusCode seeds(std::vector< long > &seed) const override
Retrieve seeds.
Definition: HepRndmEngines.cpp:126
HepRndm::Engine::m_useTable
Gaudi::Property< bool > m_useTable
Definition: HepRndmEngine.h:41
HepRndm::BaseEngine
Definition: HepRndmBaseEngine.h:38
HepRndm
Definition: HepRndmBaseEngine.h:36
HepRndm::Engine::m_col
Gaudi::Property< int > m_col
Definition: HepRndmEngine.h:38
HepRndm::Engine::m_row
Gaudi::Property< int > m_row
Definition: HepRndmEngine.h:39
StatusCode
Definition: StatusCode.h:64
HepRndm::Engine::createEngine
std::unique_ptr< CLHEP::HepRandomEngine > createEngine() override
Create new HepEngine....
HepRndm::Engine::m_lux
Gaudi::Property< int > m_lux
Definition: HepRndmEngine.h:40
HepRndm::Engine::initialize
StatusCode initialize() override
Initialize the Engine.
Definition: HepRndmEngines.cpp:67
HepRndm::Engine::m_setSingleton
Gaudi::Property< bool > m_setSingleton
Definition: HepRndmEngine.h:42
HepRndmBaseEngine.h
HepRndm::BaseEngine::BaseEngine
BaseEngine(const std::string &name, ISvcLocator *loc)
Definition: HepRndmBaseEngine.h:43
HepRndm::Engine::setSeeds
StatusCode setSeeds(const std::vector< long > &seed) override
Set seeds.
Definition: HepRndmEngines.cpp:112
HepRndm::Engine::m_seeds
Gaudi::Property< std::vector< long > > m_seeds
Definition: HepRndmEngine.h:36
HepRndm::Engine::finalize
StatusCode finalize() override
Finalize the Engine.
Definition: HepRndmEngines.cpp:105
OffloadAtlasMCRecoScenario.seed
seed
Definition: OffloadAtlasMCRecoScenario.py:52
HepRndm::Engine
Definition: HepRndmEngine.h:34
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:35