TestSchedulerModule1

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/**
   \file
   Test Modules for ScheduleBuilder

   \author Stefano ARGIRO
   \date 19 May 2005
*/

#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/TestObjects/interface/ToyProducts.h"
#include <memory>
#include <string>

using namespace edm;

class TestSchedulerModule1 : public global::EDProducer<> {
public:
  explicit TestSchedulerModule1(ParameterSet const& p) : pset_(p) { produces<edmtest::StringProduct>(); }

  void produce(StreamID, Event& e, EventSetup const&) const final;

private:
  ParameterSet pset_;
};

void TestSchedulerModule1::produce(StreamID, Event& e, EventSetup const&) const {
  std::string myname = pset_.getParameter<std::string>("module_name");
  e.put(std::make_unique<edmtest::StringProduct>(myname));
}

DEFINE_FWK_MODULE(TestSchedulerModule1);

// Configure (x)emacs for this file ...
// Local Variables:
// mode:c++
// compile-command: "make -C .. -k"
// End: