Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-08 02:27:17

0001 /**
0002    \file
0003    Test Module for testScheduler
0004 
0005    \author Stefano ARGIRO
0006    \date 19 May 2005
0007 */
0008 
0009 #include "FWCore/Framework/interface/global/EDProducer.h"
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/MakerMacros.h"
0012 
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "DataFormats/TestObjects/interface/ToyProducts.h"
0015 #include <memory>
0016 #include <string>
0017 
0018 namespace edm {
0019 
0020   class TestSchedulerModule2 : public global::EDProducer<> {
0021   public:
0022     explicit TestSchedulerModule2(ParameterSet const& p) : pset_(p) { produces<edmtest::StringProduct>(); }
0023 
0024     void produce(StreamID, Event& e, EventSetup const&) const final;
0025 
0026   private:
0027     ParameterSet pset_;
0028   };
0029 
0030   void TestSchedulerModule2::produce(StreamID, Event& e, EventSetup const&) const {
0031     std::string myname = pset_.getParameter<std::string>("module_name");
0032     e.put(std::make_unique<edmtest::StringProduct>(myname));
0033   }
0034 }  // namespace edm
0035 using edm::TestSchedulerModule2;
0036 DEFINE_FWK_MODULE(TestSchedulerModule2);
0037 
0038 // Configure (x)emacs for this file ...
0039 // Local Variables:
0040 // mode:c++
0041 // compile-command: "make -C .. -k"
0042 // End: