Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:20

0001 /**
0002    \file
0003    Test Modules for ScheduleBuilder
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 using namespace edm;
0019 
0020 class TestSchedulerModule1 : public global::EDProducer<> {
0021 public:
0022   explicit TestSchedulerModule1(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 TestSchedulerModule1::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 
0035 DEFINE_FWK_MODULE(TestSchedulerModule1);
0036 
0037 // Configure (x)emacs for this file ...
0038 // Local Variables:
0039 // mode:c++
0040 // compile-command: "make -C .. -k"
0041 // End: