The Gaudi Framework  master (37c0b60a)
HepRndmEngine.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 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 #ifndef HEPRNDM_HEPRNDMENGINE_H
26 #define HEPRNDM_HEPRNDMENGINE_H 1
27 
28 // Framework include files
29 #include "HepRndmBaseEngine.h"
30 #include <vector>
31 
32 namespace HepRndm {
33 
34  template <class TYPE>
35  class Engine : public BaseEngine {
36  protected:
37  mutable Gaudi::Property<std::vector<long>> m_seeds{ this, "Seeds", {}, "seed table" };
38 
39  Gaudi::Property<int> m_col{ this, "Column", 0 };
40  Gaudi::Property<int> m_row{ this, "Row", 1 };
41  Gaudi::Property<int> m_lux{ this, "Luxury", 3 };
42  Gaudi::Property<bool> m_useTable{ this, "UseTable", false };
43  Gaudi::Property<bool> m_setSingleton{ this, "SetSingleton", false };
44 
45  public:
49  StatusCode initialize() override;
51  StatusCode finalize() override;
53  StatusCode setSeeds( const std::vector<long>& seed ) override;
55  StatusCode seeds( std::vector<long>& seed ) const override;
56 
57  private:
60  };
61 } // namespace HepRndm
62 
63 #endif // HEPRNDM_HEPRNDMENGINE_H
HepRndm::Engine::seeds
StatusCode seeds(std::vector< long > &seed) const override
Retrieve seeds.
Definition: HepRndmEngines.cpp:126
std::vector< long >
HepRndm::Engine::m_useTable
Gaudi::Property< bool > m_useTable
Definition: HepRndmEngine.h:42
HepRndm::BaseEngine
Definition: HepRndmBaseEngine.h:39
HepRndm
Definition: HepRndmBaseEngine.h:37
HepRndm::Engine::m_col
Gaudi::Property< int > m_col
Definition: HepRndmEngine.h:39
HepRndm::Engine::m_row
Gaudi::Property< int > m_row
Definition: HepRndmEngine.h:40
StatusCode
Definition: StatusCode.h:65
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:41
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:43
HepRndmBaseEngine.h
HepRndm::BaseEngine::BaseEngine
BaseEngine(const std::string &name, ISvcLocator *loc)
Definition: HepRndmBaseEngine.h:44
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:37
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:35
std::unique_ptr< CLHEP::HepRandomEngine >
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:37