Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update FWCore/ParameterSet headers #31429

Merged
merged 2 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions FWCore/Integration/test/ProducerWithPSetDesc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/getFixedSizeArray.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ParameterSet/interface/ParameterDescriptionBase.h"
#include "FWCore/ParameterSet/interface/ParameterDescription.h"
Expand Down Expand Up @@ -80,10 +79,10 @@ namespace edmtest {
vint = ps.getParameter<std::vector<int>>("vint3");
assert(vint[0] == 2147483647);
assert(vint[1] == -2147483647);
std::array<int, 2> testArray = edm::getFixedSizeArray<int, 2>(ps, std::string("vint3"));
std::array<int, 2> testArray = ps.getParameter<std::array<int, 2>>(std::string("vint3"));
assert(testArray[0] == 2147483647);
assert(testArray[1] == -2147483647);
std::array<int, 2> testArray1 = edm::getFixedSizeArray<int, 2>(ps, "vint3");
std::array<int, 2> testArray1 = ps.getParameter<std::array<int, 2>>("vint3");
assert(testArray1[0] == 2147483647);
assert(testArray1[1] == -2147483647);
vint = ps.getParameter<std::vector<int>>("vint4");
Expand Down
189 changes: 120 additions & 69 deletions FWCore/ParameterSet/interface/ParameterSet.h

Large diffs are not rendered by default.

28 changes: 0 additions & 28 deletions FWCore/ParameterSet/interface/getFixedSizeArray.h

This file was deleted.

2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/ANDGroupDescription.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "FWCore/ParameterSet/interface/ANDGroupDescription.h"
#include "FWCore/ParameterSet/src/ANDGroupDescription.h"
#include "FWCore/Utilities/interface/EDMException.h"
#include "FWCore/ParameterSet/interface/DocFormatHelper.h"

Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/FillDescriptionFromPSet.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "FWCore/ParameterSet/interface/FillDescriptionFromPSet.h"
#include "FWCore/ParameterSet/src/FillDescriptionFromPSet.h"
#include "FWCore/ParameterSet/interface/ParameterDescriptionNode.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/ORGroupDescription.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "FWCore/ParameterSet/interface/ORGroupDescription.h"
#include "FWCore/ParameterSet/src/ORGroupDescription.h"
#include "FWCore/Utilities/interface/EDMException.h"
#include "FWCore/ParameterSet/interface/DocFormatHelper.h"

Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/ParameterDescription.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "DataFormats/Provenance/interface/LuminosityBlockRange.h"
#include "FWCore/ParameterSet/interface/DocFormatHelper.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "FWCore/ParameterSet/interface/FillDescriptionFromPSet.h"
#include "FWCore/ParameterSet/src/FillDescriptionFromPSet.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ParameterSet/interface/VParameterSetEntry.h"
#include "FWCore/Utilities/interface/Algorithms.h"
Expand Down
6 changes: 3 additions & 3 deletions FWCore/ParameterSet/src/ParameterDescriptionNode.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

#include "FWCore/ParameterSet/interface/ParameterDescriptionNode.h"
#include "FWCore/ParameterSet/interface/ParameterDescriptionCases.h"
#include "FWCore/ParameterSet/interface/ANDGroupDescription.h"
#include "FWCore/ParameterSet/interface/ORGroupDescription.h"
#include "FWCore/ParameterSet/interface/XORGroupDescription.h"
#include "FWCore/ParameterSet/src/ANDGroupDescription.h"
#include "FWCore/ParameterSet/src/ORGroupDescription.h"
#include "FWCore/ParameterSet/src/XORGroupDescription.h"
#include "FWCore/ParameterSet/interface/DocFormatHelper.h"

#include <vector>
Expand Down
9 changes: 8 additions & 1 deletion FWCore/ParameterSet/src/ParameterSet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/Registry.h"
#include "FWCore/ParameterSet/interface/split.h"
#include "FWCore/ParameterSet/src/split.h"
#include "FWCore/Utilities/interface/Algorithms.h"
#include "FWCore/Utilities/interface/Digest.h"
#include "FWCore/Utilities/interface/EDMException.h"
Expand All @@ -29,6 +29,13 @@

namespace edm {

namespace pset::exceptions {
void throwWrongNumberOfElements(std::string const& iName, size_t iExpected, size_t iGot) {
throw Exception(errors::Configuration) << "The parameter '" << iName << "' should have " << iExpected
<< " elements, but has " << iGot << " elements in the configuration.\n";
}
} // namespace pset::exceptions

void ParameterSet::invalidateRegistration(std::string const& nameOfTracked) {
// We have added a new parameter. Invalidate the ID.
if (isRegistered()) {
Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/ParameterSetConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ParameterSetConverter.cc
#include "FWCore/ParameterSet/interface/ParameterSetConverter.h"
#include <iterator>
#include "FWCore/ParameterSet/interface/Registry.h"
#include "FWCore/ParameterSet/interface/split.h"
#include "FWCore/ParameterSet/src/split.h"
#include "FWCore/Utilities/interface/Algorithms.h"

namespace edm {
Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/VParameterSetEntry.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "FWCore/ParameterSet/interface/VParameterSetEntry.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/split.h"
#include "FWCore/ParameterSet/src/split.h"
#include "FWCore/Utilities/interface/Digest.h"

#include <cassert>
Expand Down
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/XORGroupDescription.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include "FWCore/ParameterSet/interface/XORGroupDescription.h"
#include "FWCore/ParameterSet/src/XORGroupDescription.h"
#include "FWCore/Utilities/interface/EDMException.h"
#include "FWCore/ParameterSet/interface/DocFormatHelper.h"

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion FWCore/ParameterSet/src/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "FWCore/ParameterSet/interface/types.h"

#include "boost/lexical_cast.hpp"
#include "FWCore/ParameterSet/interface/split.h"
#include "FWCore/ParameterSet/src/split.h"
#include "FWCore/Utilities/interface/Parse.h"
#include <cctype>
#include <cstdlib>
Expand Down