-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from legacy to global module type
TestPRegisterModule1 TestPRegisterModule2 RandomFilter
- Loading branch information
Showing
8 changed files
with
73 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,44 @@ | ||
/** | ||
\file | ||
Test Modules for testProductRegistry | ||
// -*- C++ -*- | ||
// | ||
// Package: FWCore/Framework | ||
// Class : TestPRegisterModule1 | ||
// | ||
/**\class TestPRegisterModule1 | ||
\author Stefano ARGIRO | ||
Description: | ||
Usage: | ||
\author Stefano ARGIRO, Chris Jones | ||
\date 19 May 2005 | ||
*/ | ||
|
||
#include "DataFormats/TestObjects/interface/ToyProducts.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/FrameworkfwdMostUsed.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/Framework/interface/global/EDProducer.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
#include "DataFormats/TestObjects/interface/ToyProducts.h" | ||
#include "FWCore/Framework/test/stubs/TestPRegisterModule1.h" | ||
#include <memory> | ||
#include <string> | ||
|
||
using namespace edm; | ||
class TestPRegisterModule1 : public edm::global::EDProducer<> { | ||
public: | ||
explicit TestPRegisterModule1(edm::ParameterSet const&); | ||
void produce(edm::StreamID, edm::Event&, edm::EventSetup const&) const override; | ||
|
||
private: | ||
edm::ParameterSet pset_; | ||
}; | ||
|
||
TestPRegisterModule1::TestPRegisterModule1(edm::ParameterSet const& p) : pset_(p) { | ||
TestPRegisterModule1::TestPRegisterModule1(edm::ParameterSet const& pset) : pset_(pset) { | ||
produces<edmtest::StringProduct>(); | ||
} | ||
|
||
void TestPRegisterModule1::produce(Event& e, EventSetup const&) { | ||
void TestPRegisterModule1::produce(edm::StreamID, edm::Event& event, edm::EventSetup const&) const { | ||
std::string myname = pset_.getParameter<std::string>("@module_label"); | ||
e.put(std::make_unique<edmtest::StringProduct>(myname)); | ||
event.put(std::make_unique<edmtest::StringProduct>(myname)); | ||
} | ||
|
||
DEFINE_FWK_MODULE(TestPRegisterModule1); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters