Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:03

0001 // -*- C++ -*-
0002 //
0003 // Package:    RandomEngine
0004 // Class:      RandomEngineStateProducer
0005 //
0006 /** \class RandomEngineStateProducer
0007 
0008  Description: Gets the state of the random number engines from
0009 the related service and stores it in the event and luminosity block.
0010 
0011  Implementation:  This simply copies from the cache in the
0012 service and puts the product in the Event and LuminosityBlock.
0013 The cache is filled at the beginning of processing for each
0014 event or lumi by a call from the InputSource or EventProcessor
0015 to the service. This module gets called later.
0016 
0017 \author W. David Dagenhart, created October 4, 2006
0018   (originally in FWCore/Services)
0019 */
0020 
0021 #include "FWCore/Framework/interface/global/EDProducer.h"
0022 #include "FWCore/Framework/interface/Frameworkfwd.h"
0023 
0024 namespace edm {
0025   class ConfigurationDescriptions;
0026 }
0027 
0028 class RandomEngineStateProducer : public edm::global::EDProducer<edm::BeginLuminosityBlockProducer> {
0029 public:
0030   explicit RandomEngineStateProducer(edm::ParameterSet const& pset);
0031   ~RandomEngineStateProducer() override;
0032   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0033 
0034 private:
0035   void globalBeginLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&) const override;
0036   void produce(edm::StreamID iID, edm::Event& ev, edm::EventSetup const& es) const override;
0037 };