CMS 3D CMS Logo

RandomNumberGenerator.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_RandomNumberGenerator_h
2 #define FWCore_Utilities_RandomNumberGenerator_h
3 
128 #include <cstdint>
129 #include <iosfwd>
130 #include <vector>
131 
132 class RandomEngineState;
133 
134 namespace CLHEP {
135  class HepRandomEngine;
136 }
137 
138 namespace edm {
139 
140  class ConsumesCollector;
141  class Event;
142  class LuminosityBlock;
143  class LuminosityBlockIndex;
144  class StreamID;
145 
147  {
148  public:
149 
151  virtual ~RandomNumberGenerator();
152 
155 
157  virtual CLHEP::HepRandomEngine& getEngine(StreamID const&) = 0;
158 
160  virtual CLHEP::HepRandomEngine& getEngine(LuminosityBlockIndex const&) = 0;
161 
173  virtual std::uint32_t mySeed() const = 0;
174 
175  // The following functions should not be used by general users. They
176  // should only be called by Framework code designed to work with the
177  // service while it is saving the engine states or restoring them.
178  // The first two are called by the EventProcessor at special times.
179  // The next two are called by a dedicated producer module (RandomEngineStateProducer).
180 
181  virtual void preBeginLumi(LuminosityBlock const& lumi) = 0;
182  virtual void postEventRead(Event const& event) = 0;
183 
184  virtual std::vector<RandomEngineState> const& getEventCache(StreamID const&) const = 0;
185  virtual std::vector<RandomEngineState> const& getLumiCache(LuminosityBlockIndex const&) const = 0;
186 
187  virtual void consumes(ConsumesCollector&& iC) const = 0;
188 
190  virtual void print(std::ostream& os) const = 0;
191 
192  private:
193 
195  RandomNumberGenerator const& operator=(RandomNumberGenerator const&) = delete;
196  };
197 }
198 #endif
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
HLT enums.
Definition: event.py:1