Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-11-02 03:11:07

0001 #include "ProducerWithPSetDesc.h"
0002 #include "DataFormats/TestObjects/interface/ThingCollection.h"
0003 #include "FWCore/Framework/interface/Event.h"
0004 #include "FWCore/Framework/interface/MakerMacros.h"
0005 
0006 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0008 #include "FWCore/ParameterSet/interface/ParameterDescriptionBase.h"
0009 #include "FWCore/ParameterSet/interface/ParameterDescription.h"
0010 #include "FWCore/ParameterSet/interface/ParameterDescriptionNode.h"
0011 #include "FWCore/ParameterSet/interface/ParameterWildcard.h"
0012 #include "FWCore/ParameterSet/interface/EmptyGroupDescription.h"
0013 #include "DataFormats/Provenance/interface/EventRange.h"
0014 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
0015 #include "DataFormats/Provenance/interface/EventID.h"
0016 #include "FWCore/Utilities/interface/InputTag.h"
0017 #include "FWCore/Utilities/interface/FileInPath.h"
0018 #include "FWCore/ParameterSet/interface/PluginDescription.h"
0019 #include "FWCore/ParameterSet/interface/ValidatedPluginMacros.h"
0020 #include "FWCore/ParameterSet/interface/ValidatedPluginFactoryMacros.h"
0021 
0022 #include <vector>
0023 #include <limits>
0024 #include <memory>
0025 #include <string>
0026 #include <iostream>
0027 
0028 namespace edmtest {
0029 
0030   struct AnotherIntMakerBase {
0031     virtual ~AnotherIntMakerBase() = default;
0032     virtual int value() const = 0;
0033   };
0034 
0035   using AnotherIntFactory = edmplugin::PluginFactory<AnotherIntMakerBase*(edm::ParameterSet const&)>;
0036 
0037 }  // namespace edmtest
0038 
0039 EDM_REGISTER_VALIDATED_PLUGINFACTORY(edmtest::AnotherIntFactory, "edmtestAnotherIntFactory");
0040 
0041 namespace edmtest {
0042 
0043   struct AnotherOneMaker : public AnotherIntMakerBase {
0044     explicit AnotherOneMaker(edm::ParameterSet const&) {}
0045     int value() const final { return 1; };
0046 
0047     static void fillPSetDescription(edm::ParameterSetDescription&) {}
0048   };
0049 
0050   struct AnotherValueMaker : public AnotherIntMakerBase {
0051     explicit AnotherValueMaker(edm::ParameterSet const& iPSet) : value_{iPSet.getParameter<int>("value")} {}
0052     int value() const final { return value_; };
0053 
0054     static void fillPSetDescription(edm::ParameterSetDescription& iDesc) { iDesc.add<int>("value", 5); }
0055     int value_;
0056   };
0057 
0058   struct AnotherMakerWithRecursivePlugin : public AnotherIntMakerBase {
0059     explicit AnotherMakerWithRecursivePlugin(edm::ParameterSet const& iPSet)
0060         : value_{iPSet.getParameter<int>("value")} {
0061       auto recursivePluginPSet = iPSet.getParameter<edm::ParameterSet>("pluginRecursive");
0062       recursivePluginHelper_ =
0063           AnotherIntFactory::get()->create(recursivePluginPSet.getParameter<std::string>("type"), recursivePluginPSet);
0064     }
0065     int value() const final { return value_; };
0066 
0067     static void fillPSetDescription(edm::ParameterSetDescription& iDesc) {
0068       iDesc.add<int>("value", 5);
0069 
0070       edm::ParameterSetDescription pluginDesc;
0071       pluginDesc.addNode(edm::PluginDescription<AnotherIntFactory>("type", true));
0072       iDesc.add<edm::ParameterSetDescription>("pluginRecursive", pluginDesc);
0073     }
0074 
0075     std::unique_ptr<AnotherIntMakerBase> recursivePluginHelper_;
0076     int value_;
0077   };
0078 
0079 }  // namespace edmtest
0080 DEFINE_EDM_VALIDATED_PLUGIN(edmtest::AnotherIntFactory, edmtest::AnotherOneMaker, "edmtestAnotherOneMaker");
0081 DEFINE_EDM_VALIDATED_PLUGIN(edmtest::AnotherIntFactory, edmtest::AnotherValueMaker, "edmtestAnotherValueMaker");
0082 DEFINE_EDM_VALIDATED_PLUGIN(edmtest::AnotherIntFactory,
0083                             edmtest::AnotherMakerWithRecursivePlugin,
0084                             "edmtestAnotherMakerWithRecursivePlugin");
0085 
0086 namespace edmtest {
0087 
0088   ProducerWithPSetDesc::ProducerWithPSetDesc(edm::ParameterSet const& ps) {
0089     testingAutoGeneratedCfi = ps.getUntrackedParameter<bool>("testingAutoGeneratedCfi", true);
0090 
0091     assert(ps.getParameter<int>("p_int") == 2147483647);
0092     assert(ps.getUntrackedParameter<int>("p_int_untracked") == -2147483647);
0093     if (testingAutoGeneratedCfi)
0094       assert(ps.getParameter<int>("p_int_opt") == 0);
0095     if (testingAutoGeneratedCfi) {
0096       assert(ps.getUntrackedParameter<int>("p_int_optuntracked") == 7);
0097       assert(!ps.exists("p_int_opt_nd"));
0098       assert(!ps.exists("p_int_optuntracked_nd"));
0099     } else {
0100       assert(!ps.exists("p_int_optuntracked"));
0101       assert(ps.getParameter<int>("p_int_opt_nd") == 11);
0102       assert(ps.getUntrackedParameter<int>("p_int_optuntracked_nd") == 12);
0103     }
0104 
0105     std::vector<int> vint;
0106     vint = ps.getParameter<std::vector<int>>("vint1");
0107     assert(vint.empty());
0108     vint = ps.getParameter<std::vector<int>>("vint2");
0109     assert(vint[0] == 2147483647);
0110     vint = ps.getParameter<std::vector<int>>("vint3");
0111     assert(vint[0] == 2147483647);
0112     assert(vint[1] == -2147483647);
0113     std::array<int, 2> testArray = ps.getParameter<std::array<int, 2>>(std::string("vint3"));
0114     assert(testArray[0] == 2147483647);
0115     assert(testArray[1] == -2147483647);
0116     std::array<int, 2> testArray1 = ps.getParameter<std::array<int, 2>>("vint3");
0117     assert(testArray1[0] == 2147483647);
0118     assert(testArray1[1] == -2147483647);
0119     vint = ps.getParameter<std::vector<int>>("vint4");
0120     assert(vint[0] == 2147483647);
0121     assert(vint[1] == -2147483647);
0122     assert(vint[2] == 0);
0123 
0124     assert(ps.getParameter<unsigned>("uint1") == 4294967295U);
0125     assert(ps.getUntrackedParameter<unsigned>("uint2") == 0);
0126 
0127     std::vector<unsigned> vuint;
0128     vuint = ps.getParameter<std::vector<unsigned>>("vuint1");
0129     assert(vuint.empty());
0130     vuint = ps.getParameter<std::vector<unsigned>>("vuint2");
0131     assert(vuint[0] == 4294967295U);
0132     vuint = ps.getParameter<std::vector<unsigned>>("vuint3");
0133     assert(vuint[0] == 4294967295U);
0134     assert(vuint[1] == 0);
0135     vuint = ps.getParameter<std::vector<unsigned>>("vuint4");
0136     assert(vuint[0] == 4294967295U);
0137     assert(vuint[1] == 0);
0138     assert(vuint[2] == 11);
0139 
0140     assert(ps.getParameter<long long>("int64v1") == 9000000000000000000LL);
0141     assert(ps.getParameter<long long>("int64v2") == -9000000000000000000LL);
0142     assert(ps.getParameter<long long>("int64v3") == 0);
0143 
0144     std::vector<long long> vint64;
0145     vint64 = ps.getParameter<std::vector<long long>>("vint64v1");
0146     assert(vint64.empty());
0147     vint64 = ps.getParameter<std::vector<long long>>("vint64v2");
0148     assert(vint64[0] == 9000000000000000000LL);
0149     vint64 = ps.getParameter<std::vector<long long>>("vint64v3");
0150     assert(vint64[0] == 9000000000000000000LL);
0151     assert(vint64[1] == -9000000000000000000LL);
0152     vint64 = ps.getParameter<std::vector<long long>>("vint64v4");
0153     assert(vint64[0] == 9000000000000000000LL);
0154     assert(vint64[1] == -9000000000000000000LL);
0155     assert(vint64[2] == 0);
0156 
0157     assert(ps.getParameter<unsigned long long>("uint64v1") == 18000000000000000000ULL);
0158     assert(ps.getUntrackedParameter<unsigned long long>("uint64v2") == 0);
0159 
0160     std::vector<unsigned long long> vuint64;
0161     vuint64 = ps.getParameter<std::vector<unsigned long long>>("vuint64v1");
0162     assert(vuint64.empty());
0163     vuint64 = ps.getParameter<std::vector<unsigned long long>>("vuint64v2");
0164     assert(vuint64[0] == 18000000000000000000ULL);
0165     vuint64 = ps.getParameter<std::vector<unsigned long long>>("vuint64v3");
0166     assert(vuint64[0] == 18000000000000000000ULL);
0167     assert(vuint64[1] == 0);
0168     vuint64 = ps.getParameter<std::vector<unsigned long long>>("vuint64v4");
0169     assert(vuint64[0] == 18000000000000000000ULL);
0170     assert(vuint64[1] == 0);
0171     assert(vuint64[2] == 11);
0172 
0173     // This one does not work because the precision in the ParameterSet stringified
0174     // format is 16 instead of 17.
0175     // assert(ps.getParameter<double>("doublev1") == std::numeric_limits<double>::min());
0176     assert(ps.getUntrackedParameter<double>("doublev2") == 0.0);
0177     assert(fabs(ps.getUntrackedParameter<double>("doublev3") - 0.3) < 0.0000001);
0178 
0179     std::vector<double> vdouble;
0180     vdouble = ps.getParameter<std::vector<double>>("vdoublev1");
0181     assert(vdouble.empty());
0182     // cmsRun will fail with a value this big
0183     // vdouble.push_back(std::numeric_limits<double>::max());
0184     // This works though
0185     vdouble = ps.getParameter<std::vector<double>>("vdoublev2");
0186     assert(vdouble[0] == 1e+300);
0187     vdouble = ps.getParameter<std::vector<double>>("vdoublev3");
0188     assert(vdouble[0] == 1e+300);
0189     assert(vdouble[1] == 0.0);
0190     vdouble = ps.getParameter<std::vector<double>>("vdoublev4");
0191     assert(vdouble[0] == 1e+300);
0192     assert(vdouble[1] == 0.0);
0193     assert(vdouble[2] == 11.0);
0194     vdouble = ps.getParameter<std::vector<double>>("vdoublev5");
0195     assert(vdouble[0] == 1e+300);
0196     assert(vdouble[1] == 0.0);
0197     assert(vdouble[2] == 11.0);
0198     assert(fabs(vdouble[3] - 0.3) < 0.0000001);
0199 
0200     assert(ps.getParameter<bool>("boolv1") == true);
0201     assert(ps.getParameter<bool>("boolv2") == false);
0202 
0203     std::string test("Hello");
0204     assert(ps.getParameter<std::string>("stringv1") == test);
0205     test.clear();
0206     assert(ps.getParameter<std::string>("stringv2") == test);
0207 
0208     std::vector<std::string> vstring;
0209     vstring = ps.getParameter<std::vector<std::string>>("vstringv1");
0210     assert(vstring.empty());
0211     vstring = ps.getParameter<std::vector<std::string>>("vstringv2");
0212     assert(vstring[0] == std::string("Hello"));
0213     vstring = ps.getParameter<std::vector<std::string>>("vstringv3");
0214     assert(vstring[0] == std::string("Hello"));
0215     assert(vstring[1] == std::string("World"));
0216     vstring = ps.getParameter<std::vector<std::string>>("vstringv4");
0217     assert(vstring[0] == std::string("Hello"));
0218     assert(vstring[1] == std::string("World"));
0219     assert(vstring[2] == std::string(""));
0220 
0221     edm::EventID eventID1(11, 0, 12);
0222     assert(ps.getParameter<edm::EventID>("eventIDv1") == eventID1);
0223     edm::EventID eventID2(101, 0, 102);
0224     assert(ps.getParameter<edm::EventID>("eventIDv2") == eventID2);
0225 
0226     std::vector<edm::EventID> vEventID;
0227     vEventID = ps.getParameter<std::vector<edm::EventID>>("vEventIDv1");
0228     assert(vEventID.empty());
0229     vEventID = ps.getParameter<std::vector<edm::EventID>>("vEventIDv2");
0230     assert(vEventID[0] == edm::EventID(1000, 0, 1100));
0231     vEventID = ps.getParameter<std::vector<edm::EventID>>("vEventIDv3");
0232     assert(vEventID[0] == edm::EventID(1000, 0, 1100));
0233     assert(vEventID[1] == edm::EventID(10000, 0, 11000));
0234     vEventID = ps.getParameter<std::vector<edm::EventID>>("vEventIDv4");
0235     assert(vEventID[0] == edm::EventID(1000, 0, 1100));
0236     assert(vEventID[1] == edm::EventID(10000, 0, 11000));
0237     assert(vEventID[2] == edm::EventID(100000, 0, 110000));
0238 
0239     edm::LuminosityBlockID luminosityID1(11, 12);
0240     assert(ps.getParameter<edm::LuminosityBlockID>("luminosityIDv1") == luminosityID1);
0241     edm::LuminosityBlockID luminosityID2(101, 102);
0242     assert(ps.getParameter<edm::LuminosityBlockID>("luminosityIDv2") == luminosityID2);
0243 
0244     std::vector<edm::LuminosityBlockID> vLuminosityBlockID;
0245     vLuminosityBlockID = ps.getParameter<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv1");
0246     assert(vLuminosityBlockID.empty());
0247     vLuminosityBlockID = ps.getParameter<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv2");
0248     assert(vLuminosityBlockID[0] == edm::LuminosityBlockID(1000, 1100));
0249     vLuminosityBlockID = ps.getParameter<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv3");
0250     assert(vLuminosityBlockID[0] == edm::LuminosityBlockID(1000, 1100));
0251     assert(vLuminosityBlockID[1] == edm::LuminosityBlockID(10000, 11000));
0252     vLuminosityBlockID = ps.getParameter<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv4");
0253     assert(vLuminosityBlockID[0] == edm::LuminosityBlockID(1000, 1100));
0254     assert(vLuminosityBlockID[1] == edm::LuminosityBlockID(10000, 11000));
0255     assert(vLuminosityBlockID[2] == edm::LuminosityBlockID(100000, 110000));
0256 
0257     edm::LuminosityBlockRange lumiRange1(1, 1, 9, 9);
0258     assert(ps.getParameter<edm::LuminosityBlockRange>("lumiRangev1").startLumiID() == lumiRange1.startLumiID());
0259     assert(ps.getParameter<edm::LuminosityBlockRange>("lumiRangev1").endLumiID() == lumiRange1.endLumiID());
0260     edm::LuminosityBlockRange lumiRange2(3, 4, 1000, 1000);
0261     assert(ps.getParameter<edm::LuminosityBlockRange>("lumiRangev2").startLumiID() == lumiRange2.startLumiID());
0262     assert(ps.getParameter<edm::LuminosityBlockRange>("lumiRangev2").endLumiID() == lumiRange2.endLumiID());
0263 
0264     std::vector<edm::LuminosityBlockRange> vLumiRange;
0265     vLumiRange = ps.getParameter<std::vector<edm::LuminosityBlockRange>>("vLumiRangev1");
0266     assert(vLumiRange.empty());
0267     vLumiRange = ps.getParameter<std::vector<edm::LuminosityBlockRange>>("vLumiRangev2");
0268     assert(vLumiRange[0].startLumiID() == lumiRange1.startLumiID());
0269     vLumiRange = ps.getParameter<std::vector<edm::LuminosityBlockRange>>("vLumiRangev3");
0270     assert(vLumiRange[0].startLumiID() == lumiRange1.startLumiID());
0271     assert(vLumiRange[1].startLumiID() == lumiRange2.startLumiID());
0272     assert(vLumiRange[1].endLumiID() == lumiRange2.endLumiID());
0273 
0274     edm::EventRange eventRange1(1, 0, 1, 8, 0, 8);
0275     assert(ps.getParameter<edm::EventRange>("eventRangev1").startEventID() == eventRange1.startEventID());
0276     assert(ps.getParameter<edm::EventRange>("eventRangev1").endEventID() == eventRange1.endEventID());
0277     edm::EventRange eventRange2(3, 0, 4, 1001, 0, 1002);
0278     assert(ps.getParameter<edm::EventRange>("eventRangev2").startEventID() == eventRange2.startEventID());
0279     assert(ps.getParameter<edm::EventRange>("eventRangev2").endEventID() == eventRange2.endEventID());
0280 
0281     std::vector<edm::EventRange> vEventRange;
0282     vEventRange = ps.getParameter<std::vector<edm::EventRange>>("vEventRangev1");
0283     assert(vEventRange.empty());
0284     vEventRange = ps.getParameter<std::vector<edm::EventRange>>("vEventRangev2");
0285     assert(vEventRange[0].startEventID() == eventRange1.startEventID());
0286     vEventRange = ps.getParameter<std::vector<edm::EventRange>>("vEventRangev3");
0287     assert(vEventRange[0].startEventID() == eventRange1.startEventID());
0288     assert(vEventRange[1].startEventID() == eventRange2.startEventID());
0289 
0290     edm::InputTag inputTag1("One", "Two", "Three");
0291     assert(ps.getParameter<edm::InputTag>("inputTagv1") == inputTag1);
0292     edm::InputTag inputTag2("One", "Two");
0293     assert(ps.getParameter<edm::InputTag>("inputTagv2") == inputTag2);
0294     edm::InputTag inputTag3("One");
0295     assert(ps.getParameter<edm::InputTag>("inputTagv3") == inputTag3);
0296     edm::InputTag inputTag4("One", "", "Three");
0297     assert(ps.getParameter<edm::InputTag>("inputTagv4") == inputTag4);
0298 
0299     std::vector<edm::InputTag> vInputTag;
0300     vInputTag = ps.getParameter<std::vector<edm::InputTag>>("vInputTagv1");
0301     assert(vInputTag.empty());
0302     vInputTag = ps.getParameter<std::vector<edm::InputTag>>("vInputTagv2");
0303     assert(vInputTag[0] == inputTag1);
0304     vInputTag = ps.getParameter<std::vector<edm::InputTag>>("vInputTagv3");
0305     assert(vInputTag[0] == inputTag1);
0306     assert(vInputTag[1] == inputTag2);
0307     vInputTag = ps.getParameter<std::vector<edm::InputTag>>("vInputTagv4");
0308     assert(vInputTag[0] == inputTag1);
0309     assert(vInputTag[1] == inputTag2);
0310     assert(vInputTag[2] == inputTag3);
0311     vInputTag = ps.getParameter<std::vector<edm::InputTag>>("vInputTagv5");
0312     assert(vInputTag[0] == inputTag1);
0313     assert(vInputTag[1] == inputTag2);
0314     assert(vInputTag[2] == inputTag3);
0315     assert(vInputTag[3] == inputTag4);
0316 
0317     edm::ESInputTag esinputTag1("One", "Two");
0318     assert(ps.getParameter<edm::ESInputTag>("esinputTagv1") == esinputTag1);
0319     edm::ESInputTag esinputTag2("One", "");
0320     assert(ps.getParameter<edm::ESInputTag>("esinputTagv2") == esinputTag2);
0321     edm::ESInputTag esinputTag3("", "Two");
0322     assert(ps.getParameter<edm::ESInputTag>("esinputTagv3") == esinputTag3);
0323 
0324     std::vector<edm::ESInputTag> vESInputTag;
0325     vESInputTag = ps.getParameter<std::vector<edm::ESInputTag>>("vESInputTagv1");
0326     assert(vESInputTag.empty());
0327     vESInputTag = ps.getParameter<std::vector<edm::ESInputTag>>("vESInputTagv2");
0328     assert(vESInputTag[0] == esinputTag1);
0329     vESInputTag = ps.getParameter<std::vector<edm::ESInputTag>>("vESInputTagv3");
0330     assert(vESInputTag[0] == esinputTag1);
0331     assert(vESInputTag[1] == esinputTag2);
0332     vESInputTag = ps.getParameter<std::vector<edm::ESInputTag>>("vESInputTagv4");
0333     assert(vESInputTag[0] == esinputTag1);
0334     assert(vESInputTag[1] == esinputTag2);
0335     assert(vESInputTag[2] == esinputTag3);
0336 
0337     // For purposes of the test, this just needs to point to any file
0338     // that exists.
0339     edm::FileInPath fileInPath("FWCore/Integration/plugins/ProducerWithPSetDesc.cc");
0340     assert(fileInPath == ps.getParameter<edm::FileInPath>("fileInPath"));
0341 
0342     edm::ParameterSet const& pset = ps.getParameterSet("bar");
0343     assert(pset.getParameter<unsigned>("Drinks") == 5U);
0344     assert(pset.getUntrackedParameter<unsigned>("uDrinks") == 5U);
0345     if (testingAutoGeneratedCfi)
0346       assert(pset.getParameter<unsigned>("oDrinks") == 5U);
0347     if (testingAutoGeneratedCfi)
0348       assert(pset.getUntrackedParameter<unsigned>("ouDrinks") == 5U);
0349 
0350     //std::vector<edm::ParameterSet> const& vpsetUntracked =
0351     //  ps.getUntrackedParameterSetVector("test104");
0352 
0353     std::vector<edm::ParameterSet> const& vpset = ps.getParameterSetVector("bars");
0354 
0355     assert(vpset.size() == 2U);
0356 
0357     const edm::ParameterSet& pset0 = vpset[0];
0358     assert(pset0.getParameter<unsigned>("Drinks") == 5U);
0359     assert(pset0.getUntrackedParameter<unsigned>("uDrinks") == 5U);
0360     assert(pset0.getParameter<unsigned>("oDrinks") == 11U);
0361     assert(pset0.exists("ouDrinks") == false);
0362     assert(pset0.exists("ndoDrinks") == false);
0363     assert(pset0.exists("ndouDrinks") == false);
0364     // assert(pset0.getUntrackedParameter<unsigned>("ndouDrinks") == 5);
0365 
0366     const edm::ParameterSet& pset1 = vpset[1];
0367     assert(pset1.getParameter<unsigned>("Drinks") == 5U);
0368     assert(pset1.getUntrackedParameter<unsigned>("uDrinks") == 5U);
0369     assert(pset1.getParameter<unsigned>("oDrinks") == 11U);
0370     assert(pset1.getUntrackedParameter<unsigned>("ouDrinks") == 11U);
0371     assert(pset1.exists("ndoDrinks") == false);
0372     assert(pset1.getUntrackedParameter<unsigned>("ndouDrinks") == 11U);
0373 
0374     assert(ps.getParameter<double>("test1") == 0.1);
0375     if (testingAutoGeneratedCfi) {
0376       assert(ps.getParameter<double>("test2") == 0.2);
0377       assert(ps.exists("test3") == false);
0378 
0379       assert(ps.getParameter<std::string>("testA") == std::string("fooA"));
0380       assert(ps.getParameter<int>("testB") == 100);
0381       assert(ps.getParameter<int>("testC") == 101);
0382 
0383       assert(ps.getParameter<int>("oiswitch") == 1);
0384       assert(ps.getParameter<double>("oivalue1") == 101.0);
0385       assert(ps.getParameter<double>("oivalue2") == 101.0);
0386     } else {
0387       assert(!ps.exists("test2"));
0388       assert(!ps.exists("test3"));
0389 
0390       assert(!ps.exists("testA"));
0391       assert(!ps.exists("testB"));
0392       assert(!ps.exists("testC"));
0393 
0394       assert(!ps.exists("oiswitch"));
0395       assert(!ps.exists("oivalue1"));
0396       assert(!ps.exists("oivalue2"));
0397     }
0398 
0399     edm::ParameterSet const& deeplyNestedPSet = pset1.getParameterSet("testDeeplyNested");
0400     if (testingAutoGeneratedCfi) {
0401       assert(!deeplyNestedPSet.exists("ndiswitch"));
0402       assert(!deeplyNestedPSet.exists("ndivalue1"));
0403       assert(!deeplyNestedPSet.exists("ndivalue2"));
0404     } else {
0405       assert(!deeplyNestedPSet.exists("ndiswitch"));
0406       assert(!deeplyNestedPSet.exists("ndivalue1"));
0407       assert(!deeplyNestedPSet.exists("ndivalue2"));
0408     }
0409 
0410     assert(deeplyNestedPSet.getParameter<bool>("bswitch") == false);
0411     assert(deeplyNestedPSet.getParameter<double>("bvalue1") == 101.0);
0412     assert(deeplyNestedPSet.getParameter<double>("bvalue2") == 101.0);
0413     assert(!deeplyNestedPSet.exists("bvalue"));
0414 
0415     assert(deeplyNestedPSet.getParameter<int>("iswitch") == 1);
0416     assert(deeplyNestedPSet.getParameter<double>("ivalue1") == 101.0);
0417     assert(deeplyNestedPSet.getUntrackedParameter<double>("ivalue2") == 101.0);
0418     assert(!deeplyNestedPSet.exists("ivalue"));
0419 
0420     assert(deeplyNestedPSet.getParameter<std::string>("sswitch") == std::string("1"));
0421     assert(deeplyNestedPSet.getParameter<double>("svalue1") == 101.0);
0422     assert(deeplyNestedPSet.getParameter<double>("svalue2") == 101.0);
0423     assert(!deeplyNestedPSet.exists("svalue"));
0424 
0425     if (testingAutoGeneratedCfi) {
0426       edm::ParameterSet const& pset11 = ps.getParameterSet("subpset");
0427       assert(pset11.getParameter<int>("xvalue") == 11);
0428       edm::ParameterSet const& pset111 = pset11.getUntrackedParameterSet("bar");
0429       assert(pset111.getParameter<unsigned>("Drinks") == 5U);
0430       assert(pset111.getUntrackedParameter<unsigned>("uDrinks") == 5U);
0431       assert(pset111.getParameter<unsigned>("oDrinks") == 5U);
0432       assert(pset111.getUntrackedParameter<unsigned>("ouDrinks") == 5U);
0433     }
0434 
0435     edm::ParameterSet const& psetXor = ps.getParameterSet("xorPset");
0436     assert(psetXor.getParameter<std::string>("name1") == std::string("11"));
0437     assert(!psetXor.exists("name2"));
0438     if (testingAutoGeneratedCfi) {
0439       assert(psetXor.getParameter<std::string>("name") == std::string("11"));
0440     } else {
0441       assert(psetXor.getParameter<unsigned>("name") == 11U);
0442     }
0443 
0444     edm::ParameterSet const& psetOr = ps.getParameterSet("orPset");
0445     assert(!psetOr.exists("z1"));
0446     assert(!psetOr.exists("z2"));
0447     if (testingAutoGeneratedCfi) {
0448       assert(psetOr.getParameter<std::string>("x1") == std::string("11"));
0449       assert(!psetOr.exists("x2"));
0450       assert(psetOr.getParameter<std::string>("y1") == std::string("11"));
0451       assert(!psetOr.exists("y2"));
0452     } else {
0453       assert(!psetOr.exists("x1"));
0454       assert(psetOr.getParameter<unsigned>("x2") == 11U);
0455       assert(psetOr.getParameter<std::string>("y1") == std::string("11"));
0456       assert(psetOr.getParameter<unsigned>("y2") == 11U);
0457     }
0458 
0459     edm::ParameterSet const& psetAnd = ps.getParameterSet("andPset");
0460     assert(psetAnd.getParameter<std::string>("x1") == std::string("11"));
0461     assert(psetAnd.getParameter<unsigned>("x2") == 11U);
0462     assert(psetAnd.getParameter<std::string>("y1") == std::string("11"));
0463     assert(psetAnd.getParameter<unsigned>("y2") == 11U);
0464     assert(psetAnd.getParameter<std::string>("z1") == std::string("11"));
0465     assert(psetAnd.getParameter<unsigned>("z2") == 11U);
0466     assert(psetAnd.getParameter<std::string>("b1") == std::string("11"));
0467     assert(psetAnd.getParameter<unsigned>("b2") == 11U);
0468     assert(psetAnd.getParameter<unsigned>("b3") == 11U);
0469     assert(psetAnd.getParameter<unsigned>("b4") == 11U);
0470     assert(psetAnd.getParameter<unsigned>("b5") == 11U);
0471     assert(psetAnd.getParameter<unsigned>("b6") == 11U);
0472     if (testingAutoGeneratedCfi) {
0473       assert(!psetAnd.exists("a1"));
0474       assert(!psetAnd.exists("a2"));
0475     } else {
0476       assert(psetAnd.getParameter<std::string>("a1") == std::string("11"));
0477       assert(psetAnd.getParameter<unsigned>("a2") == 11U);
0478     }
0479 
0480     edm::ParameterSet const& psetIfExists = ps.getParameterSet("ifExistsPset");
0481     assert(psetIfExists.getParameter<unsigned>("x1") == 11U);
0482     assert(psetIfExists.getParameter<std::string>("x2") == std::string("11"));
0483     assert(psetIfExists.getParameter<unsigned>("z1") == 11U);
0484     assert(psetIfExists.getParameter<std::string>("z2") == std::string("11"));
0485     if (testingAutoGeneratedCfi) {
0486       assert(!psetIfExists.exists("y1"));
0487       assert(!psetIfExists.exists("y2"));
0488     } else {
0489       assert(psetIfExists.getParameter<unsigned>("y1") == 11U);
0490       assert(!psetIfExists.exists("y2"));
0491     }
0492 
0493     edm::ParameterSet const& psetAllowed = ps.getParameterSet("allowedLabelsPset");
0494     if (testingAutoGeneratedCfi) {
0495       assert(psetAllowed.getParameter<std::vector<std::string>>("testAllowedLabels").empty());
0496       assert(psetAllowed.getUntrackedParameter<std::vector<std::string>>("testAllowedLabelsUntracked").empty());
0497       assert(!psetAllowed.exists("testOptAllowedLabels"));
0498       assert(!psetAllowed.exists("testOptAllowedLabelsUntracked"));
0499     }
0500 
0501     auto pluginPSet = ps.getParameter<edm::ParameterSet>("plugin");
0502     pluginHelper_ = AnotherIntFactory::get()->create(pluginPSet.getParameter<std::string>("type"), pluginPSet);
0503 
0504     auto plugin1PSet = ps.getParameter<edm::ParameterSet>("plugin1");
0505     pluginHelper1_ = AnotherIntFactory::get()->create(plugin1PSet.getParameter<std::string>("type"), plugin1PSet);
0506 
0507     std::vector<edm::ParameterSet> vpset2 = ps.getParameter<std::vector<edm::ParameterSet>>("plugin2");
0508     for (auto const& pset2 : vpset2) {
0509       pluginHelpers2_.emplace_back(AnotherIntFactory::get()->create(pset2.getParameter<std::string>("type"), pset2));
0510     }
0511 
0512     std::vector<edm::ParameterSet> vpset3 = ps.getParameter<std::vector<edm::ParameterSet>>("plugin3");
0513     for (auto const& pset3 : vpset3) {
0514       pluginHelpers3_.emplace_back(AnotherIntFactory::get()->create(pset3.getParameter<std::string>("type"), pset3));
0515     }
0516 
0517     auto plugin4PSet = ps.getParameter<edm::ParameterSet>("plugin4");
0518     pluginHelper4_ = AnotherIntFactory::get()->create(plugin4PSet.getParameter<std::string>("type"), plugin4PSet);
0519 
0520     std::vector<edm::ParameterSet> vpset5 = ps.getParameter<std::vector<edm::ParameterSet>>("plugin5");
0521     for (auto const& pset5 : vpset5) {
0522       pluginHelpers5_.emplace_back(AnotherIntFactory::get()->create(pset5.getParameter<std::string>("type"), pset5));
0523     }
0524 
0525     produces<ThingCollection>();
0526   }
0527 
0528   void ProducerWithPSetDesc::produce(edm::StreamID, edm::Event& e, edm::EventSetup const&) const {
0529     // This serves no purpose, I just put it here so the module does something
0530     // Probably could just make this method do nothing and it would not
0531     // affect the test.
0532     auto result = std::make_unique<ThingCollection>();  //Empty
0533     e.put(std::move(result));
0534   }
0535 
0536   void ProducerWithPSetDesc::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0537     edm::ParameterSetDescription iDesc;
0538 
0539     // Try to exercise the description code by adding all different
0540     // types of parameters with a large range of values.  Also
0541     // nested ParameterSets and vectors of them at the end.
0542 
0543     iDesc.addOptionalUntracked<bool>("testingAutoGeneratedCfi", true);
0544 
0545     edm::ParameterDescriptionNode* pn;
0546     pn = iDesc.add<int>("p_int", 2147483647);
0547     pn->setComment(
0548         "A big integer. I am trying to test the wrapping of comments in"
0549         " the printed output by putting in a long comment to see if it gets"
0550         " wrapped OK. The comment should get indented to the second column"
0551         " indent on every line. By default newlines should be inserted between"
0552         " words to make the lines fit in the terminal screen width. There is "
0553         "a command line parameter that can be set to override this width to "
0554         "any desired value. If there is no terminal then it should default to "
0555         "80. The logic for setting the width is in edmPluginHelp.cpp");
0556 
0557     iDesc.addUntracked<int>("p_int_untracked", -2147483647);
0558     iDesc.addOptional<int>("p_int_opt", 0);
0559     iDesc.addOptionalUntracked<int>("p_int_optuntracked", 7);
0560     iDesc.addOptional<int>("p_int_opt_nd");
0561     iDesc.addOptionalUntracked<int>("p_int_optuntracked_nd");
0562 
0563     std::vector<int> vint;
0564     iDesc.add<std::vector<int>>("vint1", vint);
0565     vint.push_back(2147483647);
0566     iDesc.add<std::vector<int>>(std::string("vint2"), vint);
0567     vint.push_back(-2147483647);
0568     iDesc.add<std::vector<int>>("vint3", vint);
0569     vint.push_back(0);
0570     iDesc.add<std::vector<int>>("vint4", vint);
0571 
0572     iDesc.add<unsigned>("uint1", 4294967295U);
0573     iDesc.addUntracked<unsigned>("uint2", 0);
0574 
0575     std::vector<unsigned> vuint;
0576     iDesc.add<std::vector<unsigned>>("vuint1", vuint);
0577     vuint.push_back(4294967295U);
0578     iDesc.add<std::vector<unsigned>>("vuint2", vuint);
0579     vuint.push_back(0);
0580     iDesc.add<std::vector<unsigned>>("vuint3", vuint);
0581     vuint.push_back(11);
0582     iDesc.add<std::vector<unsigned>>("vuint4", vuint);
0583     vuint.push_back(21);
0584     vuint.push_back(31);
0585     vuint.push_back(41);
0586     iDesc.add<std::vector<unsigned>>("vuint5", vuint);
0587 
0588     iDesc.add<long long>("int64v1", 9000000000000000000LL);
0589     iDesc.add<long long>("int64v2", -9000000000000000000LL);
0590     iDesc.add<long long>("int64v3", 0);
0591 
0592     std::vector<long long> vint64;
0593     iDesc.add<std::vector<long long>>("vint64v1", vint64);
0594     vint64.push_back(9000000000000000000LL);
0595     iDesc.add<std::vector<long long>>("vint64v2", vint64);
0596     vint64.push_back(-9000000000000000000LL);
0597     iDesc.add<std::vector<long long>>("vint64v3", vint64);
0598     vint64.push_back(0);
0599     iDesc.add<std::vector<long long>>("vint64v4", vint64);
0600 
0601     iDesc.add<unsigned long long>("uint64v1", 18000000000000000000ULL);
0602     iDesc.addUntracked<unsigned long long>("uint64v2", 0);
0603 
0604     std::vector<unsigned long long> vuint64;
0605     iDesc.add<std::vector<unsigned long long>>("vuint64v1", vuint64);
0606     vuint64.push_back(18000000000000000000ULL);
0607     iDesc.add<std::vector<unsigned long long>>("vuint64v2", vuint64);
0608     vuint64.push_back(0);
0609     iDesc.add<std::vector<unsigned long long>>("vuint64v3", vuint64);
0610     vuint64.push_back(11);
0611     iDesc.add<std::vector<unsigned long long>>("vuint64v4", vuint64);
0612 
0613     iDesc.add<double>("doublev1", std::numeric_limits<double>::min());
0614     iDesc.addUntracked<double>("doublev2", 0.0);
0615     iDesc.addUntracked<double>("doublev3", 0.3);
0616 
0617     std::vector<double> vdouble;
0618     iDesc.add<std::vector<double>>("vdoublev1", vdouble);
0619     // cmsRun will fail with a value this big
0620     // vdouble.push_back(std::numeric_limits<double>::max());
0621     // This works though
0622     vdouble.push_back(1e+300);
0623     iDesc.add<std::vector<double>>("vdoublev2", vdouble);
0624     vdouble.push_back(0.0);
0625     iDesc.add<std::vector<double>>("vdoublev3", vdouble);
0626     vdouble.push_back(11.0);
0627     iDesc.add<std::vector<double>>("vdoublev4", vdouble);
0628     vdouble.push_back(0.3);
0629     iDesc.add<std::vector<double>>("vdoublev5", vdouble);
0630 
0631     iDesc.add<bool>("boolv1", true);
0632     iDesc.add<bool>("boolv2", false);
0633 
0634     std::string test("Hello");
0635     iDesc.add<std::string>("stringv1", test);
0636     test.clear();
0637     iDesc.add<std::string>("stringv2", test);
0638 
0639     std::vector<std::string> vstring;
0640     iDesc.add<std::vector<std::string>>("vstringv1", vstring);
0641     test = "Hello";
0642     vstring.push_back(test);
0643     iDesc.add<std::vector<std::string>>("vstringv2", vstring);
0644     test = "World";
0645     vstring.push_back(test);
0646     iDesc.add<std::vector<std::string>>("vstringv3", vstring);
0647     test = "";
0648     vstring.push_back(test);
0649     iDesc.add<std::vector<std::string>>("vstringv4", vstring);
0650 
0651     edm::EventID eventID(11, 0, 12);
0652     iDesc.add<edm::EventID>("eventIDv1", eventID);
0653     edm::EventID eventID2(101, 0, 102);
0654     iDesc.add<edm::EventID>("eventIDv2", eventID2);
0655     std::vector<edm::EventID> vEventID;
0656     iDesc.add<std::vector<edm::EventID>>("vEventIDv1", vEventID);
0657     edm::EventID eventID3(1000, 0, 1100);
0658     vEventID.push_back(eventID3);
0659     iDesc.add<std::vector<edm::EventID>>("vEventIDv2", vEventID);
0660     edm::EventID eventID4(10000, 0, 11000);
0661     vEventID.push_back(eventID4);
0662     iDesc.add<std::vector<edm::EventID>>("vEventIDv3", vEventID);
0663     edm::EventID eventID5(100000, 0, 110000);
0664     vEventID.push_back(eventID5);
0665     iDesc.add<std::vector<edm::EventID>>("vEventIDv4", vEventID);
0666 
0667     edm::LuminosityBlockID luminosityID(11, 12);
0668     iDesc.add<edm::LuminosityBlockID>("luminosityIDv1", luminosityID);
0669     edm::LuminosityBlockID luminosityID2(101, 102);
0670     iDesc.add<edm::LuminosityBlockID>("luminosityIDv2", luminosityID2);
0671 
0672     std::vector<edm::LuminosityBlockID> vLuminosityBlockID;
0673     iDesc.add<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv1", vLuminosityBlockID);
0674     edm::LuminosityBlockID luminosityID3(1000, 1100);
0675     vLuminosityBlockID.push_back(luminosityID3);
0676     iDesc.add<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv2", vLuminosityBlockID);
0677     edm::LuminosityBlockID luminosityID4(10000, 11000);
0678     vLuminosityBlockID.push_back(luminosityID4);
0679     iDesc.add<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv3", vLuminosityBlockID);
0680     edm::LuminosityBlockID luminosityID5(100000, 110000);
0681     vLuminosityBlockID.push_back(luminosityID5);
0682     iDesc.add<std::vector<edm::LuminosityBlockID>>("vLuminosityBlockIDv4", vLuminosityBlockID);
0683 
0684     edm::LuminosityBlockRange lumiRange(1, 1, 9, 9);
0685     iDesc.add<edm::LuminosityBlockRange>("lumiRangev1", lumiRange);
0686     edm::LuminosityBlockRange lumiRange2(3, 4, 1000, 1000);
0687     iDesc.add<edm::LuminosityBlockRange>("lumiRangev2", lumiRange2);
0688 
0689     std::vector<edm::LuminosityBlockRange> vLumiRange;
0690     iDesc.add<std::vector<edm::LuminosityBlockRange>>("vLumiRangev1", vLumiRange);
0691     vLumiRange.push_back(lumiRange);
0692     iDesc.add<std::vector<edm::LuminosityBlockRange>>("vLumiRangev2", vLumiRange);
0693     vLumiRange.push_back(lumiRange2);
0694     iDesc.add<std::vector<edm::LuminosityBlockRange>>("vLumiRangev3", vLumiRange);
0695 
0696     edm::EventRange eventRange(1, 0, 1, 8, 0, 8);
0697     iDesc.add<edm::EventRange>("eventRangev1", eventRange);
0698     edm::EventRange eventRange2(3, 0, 4, 1001, 0, 1002);
0699     iDesc.add<edm::EventRange>("eventRangev2", eventRange2);
0700 
0701     std::vector<edm::EventRange> vEventRange;
0702     iDesc.add<std::vector<edm::EventRange>>("vEventRangev1", vEventRange);
0703     vEventRange.push_back(eventRange);
0704     iDesc.add<std::vector<edm::EventRange>>("vEventRangev2", vEventRange);
0705     vEventRange.push_back(eventRange2);
0706     iDesc.add<std::vector<edm::EventRange>>("vEventRangev3", vEventRange);
0707 
0708     edm::InputTag inputTag("One", "Two", "Three");
0709     iDesc.add<edm::InputTag>("inputTagv1", inputTag);
0710     edm::InputTag inputTag2("One", "Two");
0711     iDesc.add<edm::InputTag>("inputTagv2", inputTag2);
0712     edm::InputTag inputTag3("One");
0713     iDesc.add<edm::InputTag>("inputTagv3", inputTag3);
0714     edm::InputTag inputTag4("One", "", "Three");
0715     iDesc.add<edm::InputTag>("inputTagv4", inputTag4);
0716 
0717     std::vector<edm::InputTag> vInputTag;
0718     iDesc.add<std::vector<edm::InputTag>>("vInputTagv1", vInputTag);
0719     vInputTag.push_back(inputTag);
0720     iDesc.add<std::vector<edm::InputTag>>("vInputTagv2", vInputTag);
0721     vInputTag.push_back(inputTag2);
0722     iDesc.add<std::vector<edm::InputTag>>("vInputTagv3", vInputTag);
0723     vInputTag.push_back(inputTag3);
0724     iDesc.add<std::vector<edm::InputTag>>("vInputTagv4", vInputTag);
0725     vInputTag.push_back(inputTag4);
0726     iDesc.add<std::vector<edm::InputTag>>("vInputTagv5", vInputTag);
0727 
0728     edm::ESInputTag esinputTag("One", "Two");
0729     iDesc.add<edm::ESInputTag>("esinputTagv1", esinputTag);
0730     edm::ESInputTag esinputTag2("One", "");
0731     iDesc.add<edm::ESInputTag>("esinputTagv2", esinputTag2);
0732     edm::ESInputTag esinputTag3("", "Two");
0733     iDesc.add<edm::ESInputTag>("esinputTagv3", esinputTag3);
0734 
0735     std::vector<edm::ESInputTag> vESInputTag;
0736     iDesc.add<std::vector<edm::ESInputTag>>("vESInputTagv1", vESInputTag);
0737     vESInputTag.push_back(esinputTag);
0738     iDesc.add<std::vector<edm::ESInputTag>>("vESInputTagv2", vESInputTag);
0739     vESInputTag.push_back(esinputTag2);
0740     iDesc.add<std::vector<edm::ESInputTag>>("vESInputTagv3", vESInputTag);
0741     vESInputTag.push_back(esinputTag3);
0742     iDesc.add<std::vector<edm::ESInputTag>>("vESInputTagv4", vESInputTag);
0743 
0744     // For purposes of the test, this just needs to point to any file
0745     // that exists.
0746     edm::FileInPath fileInPath("FWCore/Integration/plugins/ProducerWithPSetDesc.cc");
0747     iDesc.add<edm::FileInPath>("fileInPath", fileInPath);
0748 
0749     edm::EmptyGroupDescription emptyGroup;
0750     iDesc.addNode(emptyGroup);
0751 
0752     edm::ParameterSetDescription bar;
0753     bar.add<unsigned int>("Drinks", 5);
0754     bar.addUntracked<unsigned int>("uDrinks", 5);
0755     bar.addOptional<unsigned int>("oDrinks", 5);
0756     bar.addOptionalUntracked<unsigned int>("ouDrinks", 5);
0757     iDesc.add("bar", bar);
0758 
0759     edm::ParameterDescription<edm::ParameterSetDescription> test101("test101", bar, true);
0760     iDesc.addOptionalNode(test101, false);
0761 
0762     edm::ParameterSetDescription barx;
0763     barx.add<unsigned int>("Drinks", 5);
0764     barx.addUntracked<unsigned int>("uDrinks", 5);
0765     barx.addOptional<unsigned int>("oDrinks", 5);
0766     barx.addOptionalUntracked<unsigned int>("ouDrinks", 5);
0767     barx.addOptional<unsigned int>("ndoDrinks");
0768     barx.addOptionalUntracked<unsigned int>("ndouDrinks");
0769 
0770     edm::ParameterDescription<std::vector<edm::ParameterSet>> test102("test102", edm::ParameterSetDescription(), true);
0771     iDesc.addOptionalNode(test102, false);
0772 
0773     edm::ParameterDescription<std::vector<edm::ParameterSet>> test103(std::string("test103"), barx, true);
0774     iDesc.addOptionalNode(test103, false);
0775 
0776     std::vector<edm::ParameterSet> defaultVPSet104;
0777     defaultVPSet104.push_back(edm::ParameterSet());
0778     edm::ParameterDescription<std::vector<edm::ParameterSet>> test104(
0779         std::string("test104"), barx, false, defaultVPSet104);
0780     iDesc.addNode(test104);
0781 
0782     std::vector<edm::ParameterSet> defaultVPSet105;
0783     edm::ParameterDescription<std::vector<edm::ParameterSet>> test105(
0784         std::string("test105"), barx, false, defaultVPSet105);
0785     iDesc.addNode(test105);
0786 
0787     double d1 = 0.1;
0788     double d2 = 0.2;
0789     double d3 = 0.3;
0790     iDesc.addNode(edm::ParameterDescription<double>("test1", d1, true));
0791     iDesc.addOptionalNode(edm::ParameterDescription<double>("test2", d2, true), true);
0792     // The value in the second argument is not used in this case
0793     iDesc.addOptionalNode(edm::ParameterDescription<double>("test3", d3, true), false);
0794 
0795     iDesc.addOptionalNode(edm::ParameterDescription<std::string>("testA", "fooA", true) and
0796                               edm::ParameterDescription<int>("testB", 100, true) &&
0797                               edm::ParameterDescription<int>("testC", 101, true),
0798                           true);
0799 
0800     iDesc.ifValueOptional(edm::ParameterDescription<int>("oiswitch", 1, true),
0801                           0 >> edm::ParameterDescription<int>("oivalue", 100, true) or
0802                               1 >> (edm::ParameterDescription<double>("oivalue1", 101.0, true) and
0803                                     edm::ParameterDescription<double>("oivalue2", 101.0, true)) or
0804                               2 >> edm::ParameterDescription<std::string>("oivalue", "102", true),
0805                           true);
0806 
0807     edm::ParameterSetDescription deeplyNested;
0808 
0809     bool case0 = true;
0810     bool case1 = false;
0811     deeplyNested.ifValue(edm::ParameterDescription<bool>("bswitch", false, true),
0812                          case0 >> edm::ParameterDescription<int>("bvalue", 100, true) or
0813                              case1 >> (edm::ParameterDescription<double>("bvalue1", 101.0, true) and
0814                                        edm::ParameterDescription<double>("bvalue2", 101.0, true)));
0815     deeplyNested.ifValue(edm::ParameterDescription<int>("iswitch", 1, true),
0816                          0 >> edm::ParameterDescription<int>("ivalue", 100, true) or
0817                              1 >> (edm::ParameterDescription<double>("ivalue1", 101.0, true) and
0818                                    edm::ParameterDescription<double>("ivalue2", 101.0, false)) or
0819                              2 >> edm::ParameterDescription<std::string>("ivalue", "102", true));
0820     deeplyNested.ifValue(edm::ParameterDescription<std::string>("sswitch", std::string("1"), true),
0821                          std::string("0") >> edm::ParameterDescription<int>("svalue", 100, true) or
0822                              "1" >> (edm::ParameterDescription<double>("svalue1", 101.0, true) and
0823                                      edm::ParameterDescription<double>("svalue2", 101.0, true)) or
0824                              "2" >> edm::ParameterDescription<std::string>("svalue", "102", true));
0825 
0826     deeplyNested.ifValueOptional(edm::ParameterDescription<int>("ndiswitch", 1, true),
0827                                  0 >> edm::ParameterDescription<int>("ndivalue", 100, true) or
0828                                      1 >> (edm::ParameterDescription<double>("ndivalue1", 101.0, true) and
0829                                            edm::ParameterDescription<double>("ndivalue2", 101.0, true)) or
0830                                      2 >> edm::ParameterDescription<std::string>("ndivalue", "102", true),
0831                                  false);
0832 
0833     deeplyNested.add<int>("testint", 1000);
0834 
0835     barx.add("testDeeplyNested", deeplyNested);
0836 
0837     iDesc.add("testDeeplyNested2", deeplyNested);
0838 
0839     edm::ParameterSetDescription validator;
0840     validator.add<int>("xvalue", 7);
0841     std::vector<edm::ParameterSet> vDefaults;
0842     edm::ParameterSet vDefaults0;
0843     vDefaults.push_back(vDefaults0);
0844     edm::ParameterSet vDefaults1;
0845     vDefaults1.addParameter<int>("xvalue", 100);
0846     vDefaults.push_back(vDefaults1);
0847     barx.addVPSet("anotherVPSet", validator, vDefaults);
0848 
0849     std::vector<edm::ParameterSet> defaultVPSet;
0850 
0851     edm::ParameterSet psetInVector1;
0852     psetInVector1.addParameter<unsigned int>("oDrinks", 11U);
0853     defaultVPSet.push_back(psetInVector1);
0854 
0855     edm::ParameterSet psetInVector2;
0856     psetInVector2.addParameter<unsigned int>("oDrinks", 11U);
0857     psetInVector2.addUntrackedParameter<unsigned int>("ouDrinks", 11U);
0858     psetInVector2.addUntrackedParameter<unsigned int>("ndouDrinks", 11U);
0859 
0860     std::vector<edm::ParameterSet> anotherDefaultVPSet;
0861     anotherDefaultVPSet.push_back(edm::ParameterSet());
0862     edm::ParameterSet anotherParameterSet;
0863     anotherParameterSet.addParameter<int>("xvalue", 17);
0864     anotherDefaultVPSet.push_back(anotherParameterSet);
0865     psetInVector2.addParameter<std::vector<edm::ParameterSet>>("anotherVPSet", anotherDefaultVPSet);
0866 
0867     edm::ParameterSet defaultForDeeplyNested;
0868     defaultForDeeplyNested.addParameter<int>("testint", 2);
0869     psetInVector2.addParameter<edm::ParameterSet>("testDeeplyNested", defaultForDeeplyNested);
0870 
0871     defaultVPSet.push_back(psetInVector2);
0872 
0873     iDesc.addVPSet("bars", barx, defaultVPSet);
0874 
0875     // Alternate way to add a ParameterSetDescription
0876     edm::ParameterDescriptionBase* parDescription;
0877     parDescription = iDesc.addOptional("subpset", edm::ParameterSetDescription());
0878     edm::ParameterSetDescription* subPsetDescription = parDescription->parameterSetDescription();
0879 
0880     subPsetDescription->add<int>("xvalue", 11);
0881     subPsetDescription->addUntracked<edm::ParameterSetDescription>(std::string("bar"), bar);
0882 
0883     // -----------------------------------------------
0884 
0885     edm::ParameterSetDescription wildcardPset;
0886     wildcardPset.addOptional<unsigned>("p_uint_opt", 0);
0887     wildcardPset.addWildcard<int>("*");
0888     pn = wildcardPset.addWildcardUntracked<double>(std::string("*"));
0889     pn->setComment("A comment for a wildcard parameter");
0890 
0891     std::unique_ptr<edm::ParameterDescriptionNode> wnode =
0892         std::make_unique<edm::ParameterWildcard<edm::ParameterSetDescription>>("*", edm::RequireExactlyOne, true);
0893     wildcardPset.addOptionalNode(std::move(wnode), false);
0894 
0895     edm::ParameterSetDescription wSet1;
0896     wSet1.add<unsigned int>("Drinks", 5);
0897 
0898     std::unique_ptr<edm::ParameterDescriptionNode> wnode2 =
0899         std::make_unique<edm::ParameterWildcard<edm::ParameterSetDescription>>(
0900             "*", edm::RequireAtLeastOne, true, wSet1);
0901     wildcardPset.addOptionalNode(std::move(wnode2), false);
0902 
0903     std::unique_ptr<edm::ParameterDescriptionNode> wnode3 =
0904         std::make_unique<edm::ParameterWildcard<std::vector<edm::ParameterSet>>>("*", edm::RequireExactlyOne, true);
0905     wildcardPset.addOptionalNode(std::move(wnode3), false);
0906 
0907     wSet1.add<unsigned int>("Drinks2", 11);
0908 
0909     std::unique_ptr<edm::ParameterDescriptionNode> wnode4 =
0910         std::make_unique<edm::ParameterWildcard<std::vector<edm::ParameterSet>>>(
0911             "*", edm::RequireAtLeastOne, true, wSet1);
0912     wildcardPset.addOptionalNode(std::move(wnode4), false);
0913 
0914     iDesc.add("wildcardPset", wildcardPset);
0915 
0916     // ---------------------------------------------
0917 
0918     std::vector<int> testIntVector;
0919     testIntVector.push_back(21);
0920     testIntVector.push_back(22);
0921     edm::ParameterSetDescription switchPset;
0922     pn = switchPset.ifValue(edm::ParameterDescription<int>("iswitch", 1, true),
0923                             0 >> edm::ParameterDescription<std::vector<int>>("ivalue", testIntVector, true) or
0924                                 1 >> (edm::ParameterDescription<double>("ivalue1", 101.0, true) and
0925                                       edm::ParameterDescription<double>("ivalue2", 101.0, true)) or
0926                                 2 >> edm::ParameterDescription<std::string>("ivalue", "102", true));
0927     pn->setComment("Comment for a ParameterSwitch");
0928 
0929     switchPset
0930         .ifValue(edm::ParameterDescription<bool>("addTeVRefits", true, true),
0931                  true >> (edm::ParameterDescription<edm::InputTag>("pickySrc", edm::InputTag(), true) and
0932                           edm::ParameterDescription<edm::InputTag>("tpfmsSrc", edm::InputTag(), true)) or
0933                      false >> edm::EmptyGroupDescription())
0934         ->setComment("If TeV refits are added, their sources need to be specified");
0935 
0936     iDesc.add("switchPset", switchPset);
0937 
0938     // -----------------------------------------------
0939 
0940     edm::ParameterSetDescription xorPset;
0941     xorPset.addNode(edm::ParameterDescription<std::string>("name", "11", true) xor
0942                     edm::ParameterDescription<unsigned int>("name", 11U, true));
0943 
0944     xorPset.addNode(edm::ParameterDescription<std::string>("name1", "11", true) xor
0945                     edm::ParameterDescription<unsigned int>("name1", 11U, true));
0946 
0947     xorPset.addOptionalNode(edm::ParameterDescription<std::string>("name2", "11", true) xor
0948                                 edm::ParameterDescription<unsigned int>("name2", 11U, true),
0949                             false);
0950 
0951     xorPset.addNode(edm::ParameterDescription<std::string>("name3", "11", true) xor
0952                     edm::ParameterDescription<unsigned int>("name4", 11U, true) xor test101 xor test103);
0953 
0954     iDesc.add("xorPset", xorPset);
0955 
0956     // -----------------------------------------
0957 
0958     edm::ParameterSetDescription orPset;
0959 
0960     orPset.addNode(edm::ParameterDescription<std::string>("x1", "11", true) or
0961                    edm::ParameterDescription<unsigned int>("x2", 11U, true));
0962 
0963     orPset.addNode(edm::ParameterDescription<std::string>("y1", "11", true) or
0964                    edm::ParameterDescription<unsigned int>("y2", 11U, true));
0965 
0966     orPset.addOptionalNode(edm::ParameterDescription<std::string>("z1", "11", true) or
0967                                edm::ParameterDescription<unsigned int>("z2", 11U, true) or test101 or test103,
0968                            false);
0969 
0970     iDesc.add("orPset", orPset);
0971 
0972     // ------------------------------------------------
0973 
0974     edm::ParameterSetDescription andPset;
0975 
0976     andPset.addNode(edm::ParameterDescription<std::string>("x1", "11", true) and
0977                     edm::ParameterDescription<unsigned int>("x2", 11U, true));
0978 
0979     andPset.addNode(edm::ParameterDescription<std::string>("y1", "11", true) and
0980                     edm::ParameterDescription<unsigned int>("y2", 11U, true));
0981 
0982     andPset.addNode(edm::ParameterDescription<std::string>("z1", "11", true) and
0983                     edm::ParameterDescription<unsigned int>("z2", 11U, true));
0984 
0985     andPset.addOptionalNode(edm::ParameterDescription<std::string>("a1", "11", true) and
0986                                 edm::ParameterDescription<unsigned int>("a2", 11U, true),
0987                             false);
0988 
0989     andPset.addOptionalNode((edm::ParameterDescription<std::string>("b1", "11", true) and
0990                              edm::ParameterDescription<unsigned int>("b2", 11U, true)) and
0991                                 edm::ParameterDescription<unsigned int>("b3", 11U, true) and
0992                                 (edm::ParameterDescription<unsigned int>("b4", 11U, true) and
0993                                  (edm::ParameterDescription<unsigned int>("b5", 11U, true) and
0994                                   edm::ParameterDescription<unsigned int>("b6", 11U, true))),
0995                             true);
0996 
0997     iDesc.add("andPset", andPset);
0998 
0999     // --------------------------------------
1000 
1001     edm::ParameterSetDescription ifExistsPset;
1002 
1003     ifExistsPset.ifExists(edm::ParameterDescription<unsigned int>("x1", 11U, true),
1004                           edm::ParameterDescription<std::string>("x2", "11", true));
1005 
1006     ifExistsPset.ifExistsOptional(edm::ParameterDescription<unsigned int>("y1", 11U, true),
1007                                   edm::ParameterDescription<std::string>("y2", "11", true),
1008                                   false);
1009 
1010     ifExistsPset.ifExists(edm::ParameterDescription<unsigned int>("z1", 11U, true),
1011                           edm::ParameterDescription<std::string>("z2", "11", true));
1012 
1013     iDesc.add("ifExistsPset", ifExistsPset);
1014 
1015     // ------------------------------------------
1016 
1017     edm::ParameterSetDescription allowedLabelsPset;
1018 
1019     allowedLabelsPset.addOptional<int>("p_int_opt", 0);
1020     allowedLabelsPset.labelsFrom<int>("testAllowedLabels");
1021     allowedLabelsPset.labelsFromUntracked<unsigned>(std::string("testAllowedLabelsUntracked"));
1022     allowedLabelsPset.labelsFromOptional<int>("testOptAllowedLabels", false);
1023     allowedLabelsPset.labelsFromOptionalUntracked<unsigned>(std::string("testOptAllowedLabelsUntracked"), false);
1024     allowedLabelsPset.labelsFromOptionalUntracked<edm::ParameterSetDescription>(std::string("testWithSet"), true, bar);
1025 
1026     allowedLabelsPset.labelsFromOptionalUntracked<std::vector<edm::ParameterSet>>(
1027         std::string("testWithVectorOfSets"), true, bar);
1028 
1029     iDesc.add("allowedLabelsPset", allowedLabelsPset);
1030 
1031     edm::ParameterSetDescription noDefaultPset3;
1032 
1033     noDefaultPset3.addOptional<int>(std::string("noDefault1"));
1034     noDefaultPset3.addOptional<std::vector<int>>("noDefault2");
1035     noDefaultPset3.addOptional<unsigned>("noDefault3");
1036     noDefaultPset3.addOptional<std::vector<unsigned>>("noDefault4");
1037     noDefaultPset3.addOptional<long long>("noDefault5");
1038     noDefaultPset3.addOptional<std::vector<long long>>("noDefault6");
1039     noDefaultPset3.addOptional<unsigned long long>("noDefault7");
1040     noDefaultPset3.addOptional<std::vector<unsigned long long>>("noDefault8");
1041     noDefaultPset3.addOptional<double>("noDefault9");
1042     noDefaultPset3.addOptional<std::vector<double>>("noDefault10");
1043     noDefaultPset3.addOptional<bool>("noDefault11");
1044     noDefaultPset3.addOptional<std::string>("noDefault12");
1045     noDefaultPset3.addOptional<std::vector<std::string>>("noDefault13");
1046     noDefaultPset3.addOptional<edm::EventID>("noDefault14");
1047     noDefaultPset3.addOptional<std::vector<edm::EventID>>("noDefault15");
1048     noDefaultPset3.addOptional<edm::LuminosityBlockID>("noDefault16");
1049     noDefaultPset3.addOptional<std::vector<edm::LuminosityBlockID>>("noDefault17");
1050     noDefaultPset3.addOptional<edm::InputTag>("noDefault18");
1051     noDefaultPset3.addOptional<std::vector<edm::InputTag>>("noDefault19");
1052     noDefaultPset3.addOptional<edm::FileInPath>("noDefault20");
1053     noDefaultPset3.addOptional<edm::LuminosityBlockRange>("noDefault21");
1054     noDefaultPset3.addOptional<std::vector<edm::LuminosityBlockRange>>("noDefault22");
1055     noDefaultPset3.addOptional<edm::EventRange>("noDefault23");
1056     noDefaultPset3.addOptional<std::vector<edm::EventRange>>("noDefault24");
1057 
1058     iDesc.add("noDefaultPset3", noDefaultPset3);
1059 
1060     edm::ParameterSetDescription noDefaultPset4;
1061 
1062     noDefaultPset4.addOptionalUntracked<int>(std::string("noDefault1"));
1063     noDefaultPset4.addOptionalUntracked<std::vector<int>>("noDefault2");
1064     noDefaultPset4.addOptionalUntracked<unsigned>("noDefault3");
1065     noDefaultPset4.addOptionalUntracked<std::vector<unsigned>>("noDefault4");
1066     noDefaultPset4.addOptionalUntracked<long long>("noDefault5");
1067     noDefaultPset4.addOptionalUntracked<std::vector<long long>>("noDefault6");
1068     noDefaultPset4.addOptionalUntracked<unsigned long long>("noDefault7");
1069     noDefaultPset4.addOptionalUntracked<std::vector<unsigned long long>>("noDefault8");
1070     noDefaultPset4.addOptionalUntracked<double>("noDefault9");
1071     noDefaultPset4.addOptionalUntracked<std::vector<double>>("noDefault10");
1072     noDefaultPset4.addOptionalUntracked<bool>("noDefault11");
1073     noDefaultPset4.addOptionalUntracked<std::string>("noDefault12");
1074     noDefaultPset4.addOptionalUntracked<std::vector<std::string>>("noDefault13");
1075     noDefaultPset4.addOptionalUntracked<edm::EventID>("noDefault14");
1076     noDefaultPset4.addOptionalUntracked<std::vector<edm::EventID>>("noDefault15");
1077     noDefaultPset4.addOptionalUntracked<edm::LuminosityBlockID>("noDefault16");
1078     noDefaultPset4.addOptionalUntracked<std::vector<edm::LuminosityBlockID>>("noDefault17");
1079     noDefaultPset4.addOptionalUntracked<edm::InputTag>("noDefault18");
1080     noDefaultPset4.addOptionalUntracked<std::vector<edm::InputTag>>("noDefault19");
1081     noDefaultPset4.addOptionalUntracked<edm::FileInPath>("noDefault20");
1082     noDefaultPset4.addOptionalUntracked<edm::LuminosityBlockRange>("noDefault21");
1083     noDefaultPset4.addOptionalUntracked<std::vector<edm::LuminosityBlockRange>>("noDefault22");
1084     noDefaultPset4.addOptionalUntracked<edm::EventRange>("noDefault23");
1085     noDefaultPset4.addOptionalUntracked<std::vector<edm::EventRange>>("noDefault24");
1086 
1087     iDesc.add("noDefaultPset4", noDefaultPset4);
1088 
1089     edm::ParameterSetDescription pluginDesc;
1090     pluginDesc.addNode(edm::PluginDescription<AnotherIntFactory>("type", "edmtestAnotherValueMaker", true));
1091     iDesc.add<edm::ParameterSetDescription>("plugin", pluginDesc);
1092 
1093     edm::ParameterSetDescription pluginDesc1;
1094     pluginDesc1.addNode(edm::PluginDescription<AnotherIntFactory>("type", true));
1095     iDesc.add<edm::ParameterSetDescription>("plugin1", pluginDesc1);
1096 
1097     edm::ParameterSetDescription pluginDesc2;
1098     pluginDesc2.addNode(edm::PluginDescription<AnotherIntFactory>("type", true));
1099     std::vector<edm::ParameterSet> vDefaultsPlugins2;
1100     iDesc.addVPSet("plugin2", pluginDesc2, vDefaultsPlugins2);
1101 
1102     edm::ParameterSetDescription pluginDesc3;
1103     pluginDesc3.addNode(edm::PluginDescription<AnotherIntFactory>("type", true));
1104     std::vector<edm::ParameterSet> vDefaultsPlugins3;
1105     edm::ParameterSet vpsetDefault0;
1106     vpsetDefault0.addParameter<std::string>("type", "edmtestAnotherOneMaker");
1107     vDefaultsPlugins3.push_back(vpsetDefault0);
1108     edm::ParameterSet vpsetDefault1;
1109     vpsetDefault1.addParameter<std::string>("type", "edmtestAnotherValueMaker");
1110     vpsetDefault1.addParameter<int>("value", 11);
1111     vDefaultsPlugins3.push_back(vpsetDefault1);
1112 
1113     iDesc.addVPSet("plugin3", pluginDesc3, vDefaultsPlugins3);
1114 
1115     edm::ParameterSetDescription pluginDesc4;
1116     pluginDesc4.addNode(
1117         edm::PluginDescription<AnotherIntFactory>("type", "edmtestAnotherMakerWithRecursivePlugin", true));
1118     iDesc.add<edm::ParameterSetDescription>("plugin4", pluginDesc4);
1119 
1120     edm::ParameterSetDescription pluginDesc5;
1121     pluginDesc5.addNode(
1122         edm::PluginDescription<AnotherIntFactory>("type", "edmtestAnotherMakerWithRecursivePlugin", true));
1123     std::vector<edm::ParameterSet> vDefaultsPlugins5;
1124     {
1125       edm::ParameterSet vpsetDefault0;
1126       vpsetDefault0.addParameter<std::string>("type", "edmtestAnotherOneMaker");
1127       vDefaultsPlugins5.push_back(vpsetDefault0);
1128       edm::ParameterSet vpsetDefault1;
1129       vpsetDefault1.addParameter<std::string>("type", "edmtestAnotherMakerWithRecursivePlugin");
1130       vpsetDefault1.addParameter<int>("value", 11);
1131       vDefaultsPlugins5.push_back(vpsetDefault1);
1132     }
1133     iDesc.addVPSet("plugin5", pluginDesc5, vDefaultsPlugins5);
1134 
1135     // ------------------------------------------
1136 
1137     descriptions.add("testProducerWithPsetDesc", iDesc);
1138 
1139     // ------------------------------------------
1140 
1141     edm::ParameterSetDescription iDesc1;
1142     iDesc1.add<int>("p_int", 1);
1143     iDesc1.setAllowAnything();
1144     iDesc1.setComment("A comment for a ParameterSetDescription");
1145 
1146     edm::ParameterSetDescription noDefaultPset1;
1147 
1148     noDefaultPset1.add<int>(std::string("noDefault1"));
1149     noDefaultPset1.add<std::vector<int>>("noDefault2");
1150     noDefaultPset1.add<unsigned>("noDefault3");
1151     noDefaultPset1.add<std::vector<unsigned>>("noDefault4");
1152     noDefaultPset1.add<long long>("noDefault5");
1153     noDefaultPset1.add<std::vector<long long>>("noDefault6");
1154     noDefaultPset1.add<unsigned long long>("noDefault7");
1155     noDefaultPset1.add<std::vector<unsigned long long>>("noDefault8");
1156     noDefaultPset1.add<double>("noDefault9");
1157     noDefaultPset1.add<std::vector<double>>("noDefault10");
1158     noDefaultPset1.add<bool>("noDefault11");
1159     noDefaultPset1.add<std::string>("noDefault12");
1160     noDefaultPset1.add<std::vector<std::string>>("noDefault13");
1161     noDefaultPset1.add<edm::EventID>("noDefault14");
1162     noDefaultPset1.add<std::vector<edm::EventID>>("noDefault15");
1163     noDefaultPset1.add<edm::LuminosityBlockID>("noDefault16");
1164     noDefaultPset1.add<std::vector<edm::LuminosityBlockID>>("noDefault17");
1165     noDefaultPset1.add<edm::InputTag>("noDefault18");
1166     noDefaultPset1.add<std::vector<edm::InputTag>>("noDefault19");
1167     noDefaultPset1.add<edm::FileInPath>("noDefault20");
1168     noDefaultPset1.add<edm::LuminosityBlockRange>("noDefault21");
1169     noDefaultPset1.add<std::vector<edm::LuminosityBlockRange>>("noDefault22");
1170     noDefaultPset1.add<edm::EventRange>("noDefault23");
1171     noDefaultPset1.add<std::vector<edm::EventRange>>("noDefault24");
1172 
1173     iDesc1.add("noDefaultPset1", noDefaultPset1);
1174 
1175     edm::ParameterSetDescription noDefaultPset2;
1176 
1177     noDefaultPset2.addUntracked<int>(std::string("noDefault1"));
1178     noDefaultPset2.addUntracked<std::vector<int>>("noDefault2");
1179     noDefaultPset2.addUntracked<unsigned>("noDefault3");
1180     noDefaultPset2.addUntracked<std::vector<unsigned>>("noDefault4");
1181     noDefaultPset2.addUntracked<long long>("noDefault5");
1182     noDefaultPset2.addUntracked<std::vector<long long>>("noDefault6");
1183     noDefaultPset2.addUntracked<unsigned long long>("noDefault7");
1184     noDefaultPset2.addUntracked<std::vector<unsigned long long>>("noDefault8");
1185     noDefaultPset2.addUntracked<double>("noDefault9");
1186     noDefaultPset2.addUntracked<std::vector<double>>("noDefault10");
1187     noDefaultPset2.addUntracked<bool>("noDefault11");
1188     noDefaultPset2.addUntracked<std::string>("noDefault12");
1189     noDefaultPset2.addUntracked<std::vector<std::string>>("noDefault13");
1190     noDefaultPset2.addUntracked<edm::EventID>("noDefault14");
1191     noDefaultPset2.addUntracked<std::vector<edm::EventID>>("noDefault15");
1192     noDefaultPset2.addUntracked<edm::LuminosityBlockID>("noDefault16");
1193     noDefaultPset2.addUntracked<std::vector<edm::LuminosityBlockID>>("noDefault17");
1194     noDefaultPset2.addUntracked<edm::InputTag>("noDefault18");
1195     noDefaultPset2.addUntracked<std::vector<edm::InputTag>>("noDefault19");
1196     noDefaultPset2.addUntracked<edm::FileInPath>("noDefault20");
1197     noDefaultPset2.addUntracked<edm::LuminosityBlockRange>("noDefault21");
1198     noDefaultPset2.addUntracked<std::vector<edm::LuminosityBlockRange>>("noDefault22");
1199     noDefaultPset2.addUntracked<edm::EventRange>("noDefault23");
1200     noDefaultPset2.addUntracked<std::vector<edm::EventRange>>("noDefault24");
1201 
1202     iDesc1.add("noDefaultPset2", noDefaultPset2);
1203     descriptions.add("testLabel1", iDesc1);
1204 
1205     // ------------------------------------------
1206 
1207     edm::ParameterSetDescription iDesc2;
1208     iDesc2.add<int>("p_int", 2);
1209     descriptions.addDefault(iDesc2);
1210 
1211     // ------------------------------------------
1212 
1213     edm::ParameterSetDescription iDesc3;
1214     iDesc3.add<int>("p_int", 3);
1215     descriptions.addWithDefaultLabel(iDesc3);
1216   }
1217 }  // namespace edmtest
1218 using edmtest::ProducerWithPSetDesc;
1219 DEFINE_FWK_MODULE(ProducerWithPSetDesc);