Skip to content

Commit 71b6d4f

Browse files
authored
Merge pull request cms-sw#49750 from Dr15Jones/fillDescriptionsToyModules
Add fillDescriptions to ToyModules.cc classes
2 parents 46041a5 + 778220f commit 71b6d4f

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

FWCore/Framework/test/stubs/ToyModules.cc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Toy EDProducers and EDProducts for testing purposes only.
1616
#include "FWCore/Framework/interface/Event.h"
1717
#include "FWCore/Framework/interface/MakerMacros.h"
1818
#include "FWCore/ParameterSet/interface/ParameterSet.h"
19+
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
20+
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
1921

2022
#include <cassert>
2123
#include <stdexcept>
@@ -49,6 +51,12 @@ namespace edmtest {
4951
virtual ~SCSimpleProducer() {}
5052
virtual void produce(edm::Event& e, edm::EventSetup const& c) override;
5153

54+
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
55+
edm::ParameterSetDescription desc;
56+
desc.add<int>("size")->setComment("Number of Simples to put in the collection");
57+
descriptions.addDefault(desc);
58+
}
59+
5260
private:
5361
int size_; // number of Simples to put in the collection
5462
};
@@ -92,6 +100,12 @@ namespace edmtest {
92100
virtual ~OVSimpleProducer() {}
93101
virtual void produce(edm::Event& e, edm::EventSetup const& c) override;
94102

103+
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
104+
edm::ParameterSetDescription desc;
105+
desc.add<int>("size")->setComment("Number of Simples to put in the collection");
106+
descriptions.addDefault(desc);
107+
}
108+
95109
private:
96110
int size_; // number of Simples to put in the collection
97111
};
@@ -144,6 +158,12 @@ namespace edmtest {
144158
virtual ~VSimpleProducer() {}
145159
virtual void produce(edm::Event& e, edm::EventSetup const& c) override;
146160

161+
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
162+
edm::ParameterSetDescription desc;
163+
desc.add<int>("size")->setComment("Number of Simples to put in the collection");
164+
descriptions.addDefault(desc);
165+
}
166+
147167
private:
148168
int size_; // number of Simples to put in the collection
149169
};
@@ -177,6 +197,12 @@ namespace edmtest {
177197

178198
virtual void produce(edm::Event& e, edm::EventSetup const& c) override;
179199

200+
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
201+
edm::ParameterSetDescription desc;
202+
desc.add<edm::InputTag>("src")->setComment("Source input tag for Simple vector");
203+
descriptions.addDefault(desc);
204+
}
205+
180206
private:
181207
edm::InputTag src_;
182208
};
@@ -222,6 +248,12 @@ namespace edmtest {
222248

223249
virtual void produce(edm::Event& e, edm::EventSetup const&) override;
224250

251+
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
252+
edm::ParameterSetDescription desc;
253+
desc.add<int>("size")->setComment("Number of items to put in the DetSetVector collections");
254+
descriptions.addDefault(desc);
255+
}
256+
225257
private:
226258
template <typename PROD>
227259
void make_a_product(edm::Event& e);
@@ -278,6 +310,12 @@ namespace edmtest {
278310
virtual ~ProdigalProducer() {}
279311
virtual void produce(edm::Event& e, edm::EventSetup const& c) override;
280312

313+
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
314+
edm::ParameterSetDescription desc;
315+
desc.add<std::string>("label")->setComment("Label of the IntProduct to consume");
316+
descriptions.addDefault(desc);
317+
}
318+
281319
private:
282320
std::string label_;
283321
};

0 commit comments

Comments
 (0)