1 #ifndef FWCore_ParameterSet_ParameterSet_h 2 #define FWCore_ParameterSet_ParameterSet_h 24 #include <string_view> 91 void insert(
bool ok_to_replace,
char const*,
Entry const&);
105 template <
typename T>
108 template <
typename T>
135 template <
typename T>
141 template <
typename T>
147 template <
typename T>
150 template <
typename T>
153 template <
typename T>
156 template <
typename T>
171 template <
typename T>
173 std::vector<std::string>
names = getParameterNamesForType<T>(trackiness);
179 template <
typename T>
181 std::vector<std::string>
result;
186 char type_code = type_translator.
typeCode();
192 template <
typename T>
197 template <
typename T>
233 typedef std::map<std::string, Entry, std::less<>>
table;
236 typedef std::map<std::string, ParameterSetEntry, std::less<>>
psettable;
239 typedef std::map<std::string, VParameterSetEntry, std::less<>>
vpsettable;
245 bool isTracked =
false;
258 static std::string_view
extent(std::string_view);
306 template <
typename T>
312 template <
typename T>
323 template <
typename T, std::
size_t N>
327 if (iVec.size() !=
N) {
331 std::copy_n(std::make_move_iterator(iVec.begin()),
N,
a.begin());
336 template <
typename T>
338 using GetType = std::vector<edm::ParameterSet>;
340 std::vector<std::pair<std::string, T>>
ret(vpset.size());
359 std::vector<int> ParameterSet::getParameter<std::vector<int>>(
std::string const&
name)
const;
365 long long ParameterSet::getParameter<long long>(
std::string const&
name)
const;
368 std::vector<long long> ParameterSet::getParameter<std::vector<long long>>(
std::string const&
name)
const;
374 unsigned int ParameterSet::getParameter<unsigned int>(
std::string const&
name)
const;
377 std::vector<unsigned int> ParameterSet::getParameter<std::vector<unsigned int>>(
std::string const&
name)
const;
383 unsigned long long ParameterSet::getParameter<unsigned long long>(
std::string const&
name)
const;
386 std::vector<unsigned long long> ParameterSet::getParameter<std::vector<unsigned long long>>(
393 double ParameterSet::getParameter<double>(
std::string const&
name)
const;
396 std::vector<double> ParameterSet::getParameter<std::vector<double>>(
std::string const&
name)
const;
405 std::vector<std::string> ParameterSet::getParameter<std::vector<std::string>>(
std::string const&
name)
const;
411 FileInPath ParameterSet::getParameter<FileInPath>(
std::string const&
name)
const;
416 std::vector<std::string> ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const;
428 std::vector<InputTag> ParameterSet::getParameter<std::vector<InputTag>>(
std::string const&
name)
const;
440 std::vector<ESInputTag> ParameterSet::getParameter<std::vector<ESInputTag>>(
std::string const&
name)
const;
446 EventID ParameterSet::getParameter<EventID>(
std::string const&
name)
const;
452 std::vector<EventID> ParameterSet::getParameter<std::vector<EventID>>(
std::string const&
name)
const;
458 LuminosityBlockID ParameterSet::getParameter<LuminosityBlockID>(
std::string const&
name)
const;
464 std::vector<LuminosityBlockID> ParameterSet::getParameter<std::vector<LuminosityBlockID>>(
471 EventRange ParameterSet::getParameter<EventRange>(
std::string const&
name)
const;
477 std::vector<EventRange> ParameterSet::getParameter<std::vector<EventRange>>(
std::string const&
name)
const;
489 std::vector<LuminosityBlockRange> ParameterSet::getParameter<std::vector<LuminosityBlockRange>>(
534 bool ParameterSet::getUntrackedParameter<bool>(
std::string const&
name)
const;
543 int ParameterSet::getUntrackedParameter<int>(
std::string const&
name)
const;
546 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int>>(
std::string const&
name,
550 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int>>(
std::string const&
name)
const;
556 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
560 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name)
const;
563 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int>>(
567 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int>>(
574 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
578 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name)
const;
581 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long>>(
585 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long>>(
592 long long ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
596 long long ParameterSet::getUntrackedParameter<long long>(
std::string const&
name)
const;
599 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long>>(
603 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long>>(
std::string const&
name)
const;
612 double ParameterSet::getUntrackedParameter<double>(
std::string const&
name)
const;
615 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double>>(
619 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double>>(
std::string const&
name)
const;
632 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string>>(
636 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string>>(
std::string const&
name)
const;
642 FileInPath ParameterSet::getUntrackedParameter<FileInPath>(
std::string const&
name,
646 FileInPath ParameterSet::getUntrackedParameter<FileInPath>(
std::string const&
name)
const;
658 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag>>(
662 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag>>(
std::string const&
name)
const;
671 EventID ParameterSet::getUntrackedParameter<EventID>(
std::string const&
name)
const;
674 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID>>(
677 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID>>(
std::string const&
name)
const;
683 LuminosityBlockID ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name,
687 LuminosityBlockID ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name)
const;
690 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID>>(
693 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID>>(
700 EventRange ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name,
704 EventRange ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name)
const;
707 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange>>(
710 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange>>(
std::string const&
name)
const;
723 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange>>(
726 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange>>(
734 bool ParameterSet::getParameter<bool>(
char const*
name)
const;
740 int ParameterSet::getParameter<int>(
char const*
name)
const;
743 std::vector<int> ParameterSet::getParameter<std::vector<int>>(
char const*
name)
const;
749 long long ParameterSet::getParameter<long long>(
char const*
name)
const;
752 std::vector<long long> ParameterSet::getParameter<std::vector<long long>>(
char const*
name)
const;
758 unsigned int ParameterSet::getParameter<unsigned int>(
char const*
name)
const;
761 std::vector<unsigned int> ParameterSet::getParameter<std::vector<unsigned int>>(
char const*
name)
const;
767 unsigned long long ParameterSet::getParameter<unsigned long long>(
char const*
name)
const;
770 std::vector<unsigned long long> ParameterSet::getParameter<std::vector<unsigned long long>>(
char const*
name)
const;
776 double ParameterSet::getParameter<double>(
char const*
name)
const;
779 std::vector<double> ParameterSet::getParameter<std::vector<double>>(
char const*
name)
const;
785 std::string ParameterSet::getParameter<std::string>(
char const*
name)
const;
788 std::vector<std::string> ParameterSet::getParameter<std::vector<std::string>>(
char const*
name)
const;
794 FileInPath ParameterSet::getParameter<FileInPath>(
char const*
name)
const;
800 InputTag ParameterSet::getParameter<InputTag>(
char const*
name)
const;
806 std::vector<InputTag> ParameterSet::getParameter<std::vector<InputTag>>(
char const*
name)
const;
812 ESInputTag ParameterSet::getParameter<ESInputTag>(
char const*
name)
const;
818 std::vector<ESInputTag> ParameterSet::getParameter<std::vector<ESInputTag>>(
char const*
name)
const;
824 EventID ParameterSet::getParameter<EventID>(
char const*
name)
const;
830 std::vector<EventID> ParameterSet::getParameter<std::vector<EventID>>(
char const*
name)
const;
836 LuminosityBlockID ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const;
842 std::vector<LuminosityBlockID> ParameterSet::getParameter<std::vector<LuminosityBlockID>>(
char const*
name)
const;
848 EventRange ParameterSet::getParameter<EventRange>(
char const*
name)
const;
854 std::vector<EventRange> ParameterSet::getParameter<std::vector<EventRange>>(
char const*
name)
const;
866 std::vector<LuminosityBlockRange> ParameterSet::getParameter<std::vector<LuminosityBlockRange>>(
867 char const*
name)
const;
873 ParameterSet ParameterSet::getParameter<ParameterSet>(
char const*
name)
const;
884 bool ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const&
defaultValue)
const;
887 bool ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const;
893 int ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const&
defaultValue)
const;
896 int ParameterSet::getUntrackedParameter<int>(
char const*
name)
const;
899 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int>>(
char const*
name,
903 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int>>(
char const*
name)
const;
909 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
913 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const;
916 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int>>(
920 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int>>(
char const*
name)
const;
926 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
930 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const;
933 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long>>(
934 char const*
name, std::vector<unsigned long long>
const&
defaultValue)
const;
937 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long>>(
938 char const*
name)
const;
944 long long ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const&
defaultValue)
const;
947 long long ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const;
950 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long>>(
954 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long>>(
char const*
name)
const;
960 double ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const&
defaultValue)
const;
963 double ParameterSet::getUntrackedParameter<double>(
char const*
name)
const;
966 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double>>(
970 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double>>(
char const*
name)
const;
979 std::string ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const;
982 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string>>(
986 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string>>(
char const*
name)
const;
992 FileInPath ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name, FileInPath
const&
defaultValue)
const;
995 FileInPath ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const;
1004 InputTag ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const;
1007 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag>>(
1011 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag>>(
char const*
name)
const;
1017 EventID ParameterSet::getUntrackedParameter<EventID>(
char const*
name, EventID
const&
defaultValue)
const;
1020 EventID ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const;
1023 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID>>(
1026 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID>>(
char const*
name)
const;
1032 LuminosityBlockID ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name,
1036 LuminosityBlockID ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const;
1039 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID>>(
1040 char const*
name, std::vector<LuminosityBlockID>
const&
defaultValue)
const;
1042 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID>>(
1043 char const*
name)
const;
1049 EventRange ParameterSet::getUntrackedParameter<EventRange>(
char const*
name, EventRange
const&
defaultValue)
const;
1052 EventRange ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const;
1055 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange>>(
1058 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange>>(
char const*
name)
const;
1071 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange>>(
1072 char const*
name, std::vector<LuminosityBlockRange>
const&
defaultValue)
const;
1074 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange>>(
1075 char const*
name)
const;
1081 ParameterSet ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
1089 ParameterSet ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const;
1095 VParameterSet ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name,
1099 VParameterSet ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const;
1109 std::vector<std::string> ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const;
1112 std::vector<std::string> ParameterSet::getParameterNamesForType<VParameterSet>(
bool trackiness)
const;
std::vector< edm::ParameterSet > GetType
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
void setID(ParameterSetID const &id)
ParameterSetID trackedID() const
T getParameter(std::string const &) const
table const & tbl() const
std::unique_ptr< ParameterSet > popParameterSet(std::string const &name)
ret
prodAgent to be discontinued
std::vector< ParameterSet > VParameterSet
std::string toString() const
void toStringImp(std::string &, bool useAll) const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
int exceptions(int argc, char *argv[])
ParameterSet const & getParameterSet(std::string const &) const
ParameterSet & operator=(ParameterSet const &other)=default
size_t getParameterSetVectorNames(std::vector< std::string > &output, bool trackiness=true) const
ParameterSet trackedPart() const
VParameterSetEntry const * retrieveUntrackedVParameterSet(std::string const &) const
VParameterSetEntry const & retrieveVParameterSet(std::string const &) const
std::map< std::string, ParameterSetEntry, std::less<> > psettable
void insert(bool ok_to_replace, char const *, Entry const &)
void addUntrackedParameter(char const *name, T const &value)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const std::string names[nVars_]
void swap(Association< C > &lhs, Association< C > &rhs)
static std::string_view extent(std::string_view)
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
TEMPL(T2) struct Divides void
Entry const * retrieveUntracked(char const *) const
void augment(ParameterSet const &from)
void eraseOrSetUntrackedParameterSet(std::string const &name)
T getUntrackedParameter(std::string const &, T const &) const
void swap(ParameterSet &other)
void allToString(std::string &result) const
ParameterSetID id() const
VParameterSet getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) const
void copyFrom(ParameterSet const &from, std::string const &name)
static std::array< T, N > convert(std::vector< T > iVec, std::string const &iName)
ParameterSet const & registerIt()
std::vector< FileInPath >::size_type getAllFileInPaths(std::vector< FileInPath > &output) const
VParameterSetEntry * getPSetVectorForUpdate(std::string const &name)
Entry const & retrieve(char const *) const
void addParameter(std::string const &name, T const &value)
bool fromString(std::string_view)
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
static auto convert(std::vector< edm::ParameterSet > vpset, std::string const &iName)
void insertVParameterSet(bool okay_to_replace, std::string const &name, VParameterSetEntry const &entry)
VParameterSetEntry const * retrieveUnknownVParameterSet(std::string const &) const
ParameterSetEntry const * retrieveUntrackedParameterSet(std::string const &) const
constexpr bool operator!=(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
void eraseSimpleParameter(std::string const &name)
void copyForModify(ParameterSet const &other)
Hash< ParameterSetType > ParameterSetID
void invalidateRegistration(std::string const &nameOfTracked)
friend std::ostream & operator<<(std::ostream &os, ParameterSet const &pset)
size_t getNamesByCode_(char code, bool trackiness, std::vector< std::string > &output) const
ParameterSet const & getProcessParameterSetContainingModule(ModuleDescription const &moduleDescription)
Namespace of DDCMS conversion namespace.
static void registerFromString(std::string const &rep)
void addParameter(char const *name, T const &value)
Entry const * retrieveUnknown(char const *) const
void addUntrackedParameter(std::string const &name, T const &value)
void insertParameterSet(bool okay_to_replace, std::string const &name, ParameterSetEntry const &entry)
void deprecatedInputTagWarning(std::string const &name, std::string const &label) const
std::map< std::string, VParameterSetEntry, std::less<> > vpsettable
ParameterSetEntry const * retrieveUnknownParameterSet(std::string const &) const
ParameterSet const & getParameterSet(ParameterSetID const &id)
std::vector< ParameterSet > popVParameterSet(std::string const &name)
VParameterSet const & getParameterSetVector(std::string const &name) const
std::string dump(unsigned int indent=0) const
std::string getParameterAsString(std::string const &name) const
std::map< std::string, Entry, std::less<> > table
bool isRegistered() const
Entry const * getEntryPointerOrThrow_(std::string const &name) const
void throwWrongNumberOfElements(std::string const &iParameterName, size_t iExpected, size_t iGot)
static ParameterSetID emptyParameterSetID()
ParameterSetEntry const & retrieveParameterSet(std::string const &) const
void toDigest(cms::Digest &digest) const
std::vector< std::string > getParameterNames() const
bool isTransientEqual(ParameterSet const &a, ParameterSet const &b)
vpsettable const & vpsetTable() const
ParameterSet * getPSetForUpdate(std::string const &name)
psettable const & psetTable() const
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)