EngineCreator.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_EngineCreator_h
2 #define art_Framework_Core_EngineCreator_h
3 
4 // ======================================================================
5 //
6 // EngineCreator - enable a derived class to access the
7 // RandomNumberGenerator::createEngine()
8 //
9 // MT-TODO:
10 //
11 // Once we adopt multiple module types (legacy, one, per-schedule,
12 // and global), then the steps that are necessary for creating
13 // engines will depend on the given module type. If a user
14 // specifies:
15 //
16 // createEngine(1237);
17 //
18 // then N instances of the specified engine should be created, one
19 // for each of N schedules, regardless of the module type.
20 //
21 // A decision must be made if each instance should receive the same
22 // seed, or different ones. I suspect they should be different so
23 // as to avoid undesirable over-sampling of fluctuations.
24 //
25 // ======================================================================
26 
29 #include "fhiclcpp/ParameterSet.h"
30 
31 // ----------------------------------------------------------------------
32 
33 namespace art {
34 
35  class EngineCreator {
40 
41  public:
44  std::string const& kind_of_engine_to_make);
46  std::string const& kind_of_engine_to_make,
47  label_t const& engine_label);
48 
49  // --- seed access
51  char const key[] = "seed",
52  seed_t const implicit_seed = -1);
53 
54  private:
56 
57  }; // EngineCreator
58 
59 } // art
60 
61 // ======================================================================
62 
63 #endif /* art_Framework_Core_EngineCreator_h */
64 
65 // Local Variables:
66 // mode: c++
67 // End:
RNGservice::label_t label_t
Definition: EngineCreator.h:37
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
base_engine_t & createEngine(seed_t seed)
seed_t get_seed_value(fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
RNGservice::seed_t seed_t
Definition: EngineCreator.h:38
unsigned int seed
Definition: runWimpSim.h:102
CLHEP::HepRandomEngine base_engine_t
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
enum BeamMode string