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  public:
149  virtual ~RandomNumberGenerator();
150 
153 
155  virtual CLHEP::HepRandomEngine& getEngine(StreamID const&) = 0;
156 
158  virtual CLHEP::HepRandomEngine& getEngine(LuminosityBlockIndex const&) = 0;
159 
171  virtual std::uint32_t mySeed() const = 0;
172 
173  // The following functions should not be used by general users. They
174  // should only be called by Framework code designed to work with the
175  // service while it is saving the engine states or restoring them.
176  // The first two are called by the EventProcessor at special times.
177  // The next two are called by a dedicated producer module (RandomEngineStateProducer).
178 
179  virtual void preBeginLumi(LuminosityBlock const& lumi) = 0;
180  virtual void postEventRead(Event const& event) = 0;
181 
182  virtual std::vector<RandomEngineState> const& getEventCache(StreamID const&) const = 0;
183  virtual std::vector<RandomEngineState> const& getLumiCache(LuminosityBlockIndex const&) const = 0;
184 
185  virtual void consumes(ConsumesCollector&& iC) const = 0;
186 
188  virtual void print(std::ostream& os) const = 0;
189 
190  private:
192  RandomNumberGenerator const& operator=(RandomNumberGenerator const&) = delete;
193  };
194 } // namespace edm
195 #endif
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
HLT enums.
Definition: event.py:1