ReplicatedRNG_module.cc
Go to the documentation of this file.
3 
4 #include <cassert>
5 
6 namespace {
7  class ReplicatedRNG : public art::ReplicatedProducer {
8  public:
9  struct Config {};
10  using Parameters = Table<Config>;
11  explicit ReplicatedRNG(Parameters const& p,
12  art::ProcessingFrame const& frame)
13  : ReplicatedProducer{p, frame}
14  {
15  auto const id = frame.scheduleID().id();
16  assert(createEngine(id).getSeed() == id);
17  }
18 
19  private:
20  void
21  produce(art::Event&, art::ProcessingFrame const&) override
22  {}
23  };
24 }
25 
26 DEFINE_ART_MODULE(ReplicatedRNG)
auto scheduleID() const
typename config_impl< T >::type Config
Definition: ModuleMacros.h:52
#define DEFINE_ART_MODULE(klass)
Definition: ModuleMacros.h:67
p
Definition: test.py:223