1 #ifndef FWCore_ParameterSet_ParameterSet_h 2 #define FWCore_ParameterSet_ParameterSet_h 68 Entry const& retrieve(
char const*)
const;
70 Entry const* retrieveUntracked(
char const*)
const;
72 Entry const* retrieveUnknown(
char const*)
const;
83 void insert(
bool ok_to_replace,
char const* ,
Entry const&);
103 getParameter(
char const*)
const;
115 getUntrackedParameterSet(
char const* name,
ParameterSet const& defaultValue)
const;
118 getUntrackedParameterSet(
std::string const& name)
const;
121 getUntrackedParameterSet(
char const* name)
const;
124 getParameterSetVector(
std::string const& name)
const;
127 getParameterSetVector(
char const* name)
const;
130 getUntrackedParameterSetVector(
std::string const& name, VParameterSet
const& defaultValue)
const;
133 getUntrackedParameterSetVector(
char const* name, VParameterSet
const& defaultValue)
const;
136 getUntrackedParameterSetVector(
std::string const& name)
const;
139 getUntrackedParameterSetVector(
char const* name)
const;
144 invalidateRegistration(name);
151 invalidateRegistration(name);
157 getUntrackedParameter(
std::string const&,
T const&)
const;
161 getUntrackedParameter(
char const*,
T const&)
const;
169 getUntrackedParameter(
char const*)
const;
176 getAllFileInPaths(std::vector<FileInPath>&
output)
const;
178 std::vector<std::string> getParameterNames()
const;
181 bool exists(
std::string const& parameterName)
const;
186 std::vector<std::string>
names = getParameterNamesForType<T>(trackiness);
187 return std::find(names.begin(), names.end(), parameterName) != names.end();
194 std::vector<std::string>
result;
198 Entry type_translator(
"", value, trackiness);
199 char type_code = type_translator.
typeCode();
201 (void)getNamesByCode_(type_code, trackiness, result);
218 return tbl_.empty() && psetTable_.empty() && vpsetTable_.empty();
228 size_t getParameterSetNames(std::vector<std::string>& output,
229 bool trackiness =
true)
const;
236 size_t getParameterSetVectorNames(std::vector<std::string>& output,
237 bool trackiness=
true)
const;
246 std::unique_ptr<ParameterSet> popParameterSet(
std::string const& name);
247 void eraseSimpleParameter(
std::string const& name);
248 void eraseOrSetUntrackedParameterSet(
std::string const& name);
250 std::vector<ParameterSet> popVParameterSet(
std::string const& name);
252 typedef std::map<std::string, Entry>
table;
253 table
const&
tbl()
const {
return tbl_;}
255 typedef std::map<std::string, ParameterSetEntry>
psettable;
258 typedef std::map<std::string, VParameterSetEntry>
vpsettable;
262 getPSetForUpdate(
std::string const& name,
bool& isTracked);
266 bool isTracked =
false;
267 return getPSetForUpdate(name, isTracked);
281 emptyParameterSetID();
301 void invalidateRegistration(
std::string const& nameOfTracked);
308 Entry const* getEntryPointerOrThrow_(
char const* name)
const;
312 size_t getNamesByCode_(
char code,
314 std::vector<std::string>& output)
const;
357 ParameterSet::getParameter<std::vector<int> >(
std::string const&
name)
const;
367 std::vector<long long>
368 ParameterSet::getParameter<std::vector<long long> >(
std::string const&
name)
const;
375 ParameterSet::getParameter<unsigned int>(
std::string const&
name)
const;
378 std::vector<unsigned int>
379 ParameterSet::getParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
386 ParameterSet::getParameter<unsigned long long>(
std::string const&
name)
const;
389 std::vector<unsigned long long>
390 ParameterSet::getParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
401 ParameterSet::getParameter<std::vector<double> >(
std::string const&
name)
const;
408 ParameterSet::getParameter<std::string>(
std::string const&
name)
const;
411 std::vector<std::string>
412 ParameterSet::getParameter<std::vector<std::string> >(
std::string const&
name)
const;
424 std::vector<std::string>
425 ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const;
438 std::vector<InputTag>
439 ParameterSet::getParameter<std::vector<InputTag> >(
std::string const&
name)
const;
452 std::vector<ESInputTag>
453 ParameterSet::getParameter<std::vector<ESInputTag> >(
std::string const&
name)
const;
467 ParameterSet::getParameter<std::vector<EventID> >(
std::string const&
name)
const;
474 ParameterSet::getParameter<LuminosityBlockID>(
std::string const&
name)
const;
480 std::vector<LuminosityBlockID>
481 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
494 std::vector<EventRange>
495 ParameterSet::getParameter<std::vector<EventRange> >(
std::string const&
name)
const;
502 ParameterSet::getParameter<LuminosityBlockRange>(
std::string const&
name)
const;
508 std::vector<LuminosityBlockRange>
509 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
516 ParameterSet::getParameter<ParameterSet>(
std::string const&
name)
const;
520 ParameterSet::getParameter<VParameterSet>(
std::string const&
name)
const;
544 ParameterSet::addParameter<VParameterSet>(
char const*
name, VParameterSet
const&
value);
548 ParameterSet::addUntrackedParameter<VParameterSet>(
std::string const&
name, VParameterSet
const&
value);
552 ParameterSet::addUntrackedParameter<VParameterSet>(
char const*
name, VParameterSet
const&
value);
561 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const;
565 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name)
const;
572 ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const;
576 ParameterSet::getUntrackedParameter<int>(
std::string const&
name)
const;
580 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name, std::vector<int>
const& defaultValue)
const;
584 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name)
const;
591 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
unsigned int const& defaultValue)
const;
595 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name)
const;
598 std::vector<unsigned int>
599 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const;
602 std::vector<unsigned int>
603 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
610 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name,
unsigned long long const& defaultValue)
const;
614 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name)
const;
617 std::vector<unsigned long long>
618 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const;
621 std::vector<unsigned long long>
622 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
629 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
long long const& defaultValue)
const;
633 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name)
const;
636 std::vector<long long>
637 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name, std::vector<long long>
const& defaultValue)
const;
640 std::vector<long long>
641 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const;
648 ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const;
652 ParameterSet::getUntrackedParameter<double>(
std::string const&
name)
const;
656 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name, std::vector<double>
const& defaultValue)
const;
660 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const;
671 ParameterSet::getUntrackedParameter<std::string>(
std::string const&
name)
const;
674 std::vector<std::string>
675 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name, std::vector<std::string>
const& defaultValue)
const;
678 std::vector<std::string>
679 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name)
const;
690 ParameterSet::getUntrackedParameter<FileInPath>(
std::string const&
name)
const;
701 ParameterSet::getUntrackedParameter<InputTag>(
std::string const&
name)
const;
704 std::vector<InputTag>
705 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name,
706 std::vector<InputTag>
const& defaultValue)
const;
709 std::vector<InputTag>
710 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const;
721 ParameterSet::getUntrackedParameter<EventID>(
std::string const&
name)
const;
725 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name,
726 std::vector<EventID>
const& defaultValue)
const;
729 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const;
740 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name)
const;
743 std::vector<LuminosityBlockID>
744 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name,
745 std::vector<LuminosityBlockID>
const& defaultValue)
const;
747 std::vector<LuminosityBlockID>
748 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
759 ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name)
const;
762 std::vector<EventRange>
763 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name,
764 std::vector<EventRange>
const& defaultValue)
const;
766 std::vector<EventRange>
767 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const;
778 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
std::string const&
name)
const;
781 std::vector<LuminosityBlockRange>
782 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name,
783 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
785 std::vector<LuminosityBlockRange>
786 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
794 ParameterSet::getParameter<bool>(
char const*
name)
const;
801 ParameterSet::getParameter<int>(
char const*
name)
const;
805 ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const;
812 ParameterSet::getParameter<long long>(
char const*
name)
const;
815 std::vector<long long>
816 ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const;
823 ParameterSet::getParameter<unsigned int>(
char const*
name)
const;
826 std::vector<unsigned int>
827 ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const;
834 ParameterSet::getParameter<unsigned long long>(
char const*
name)
const;
837 std::vector<unsigned long long>
838 ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const;
845 ParameterSet::getParameter<double>(
char const*
name)
const;
849 ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const;
856 ParameterSet::getParameter<std::string>(
char const*
name)
const;
859 std::vector<std::string>
860 ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const;
867 ParameterSet::getParameter<FileInPath>(
char const*
name)
const;
874 ParameterSet::getParameter<InputTag>(
char const*
name)
const;
880 std::vector<InputTag>
881 ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const;
888 ParameterSet::getParameter<EventID>(
char const*
name)
const;
895 ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const;
902 ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const;
908 std::vector<LuminosityBlockID>
909 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
916 ParameterSet::getParameter<EventRange>(
char const*
name)
const;
922 std::vector<EventRange>
923 ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const;
930 ParameterSet::getParameter<LuminosityBlockRange>(
char const*
name)
const;
936 std::vector<LuminosityBlockRange>
937 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
944 ParameterSet::getParameter<ParameterSet>(
char const*
name)
const;
948 ParameterSet::getParameter<VParameterSet>(
char const*
name)
const;
957 ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const;
961 ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const;
968 ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const;
972 ParameterSet::getUntrackedParameter<int>(
char const*
name)
const;
976 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name, std::vector<int>
const& defaultValue)
const;
980 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const;
987 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
unsigned int const& defaultValue)
const;
991 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const;
994 std::vector<unsigned int>
995 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name, std::vector<unsigned int>
const& defaultValue)
const;
998 std::vector<unsigned int>
999 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const;
1006 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name,
unsigned long long const& defaultValue)
const;
1010 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const;
1013 std::vector<unsigned long long>
1014 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name, std::vector<unsigned long long>
const& defaultValue)
const;
1017 std::vector<unsigned long long>
1018 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name)
const;
1025 ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const;
1029 ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const;
1032 std::vector<long long>
1033 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name, std::vector<long long>
const& defaultValue)
const;
1036 std::vector<long long>
1037 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const;
1044 ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const;
1048 ParameterSet::getUntrackedParameter<double>(
char const*
name)
const;
1052 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name, std::vector<double>
const& defaultValue)
const;
1056 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const;
1063 ParameterSet::getUntrackedParameter<std::string>(
char const*
name,
std::string const& defaultValue)
const;
1067 ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const;
1070 std::vector<std::string>
1071 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name, std::vector<std::string>
const& defaultValue)
const;
1074 std::vector<std::string>
1075 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const;
1082 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name,
FileInPath const& defaultValue)
const;
1086 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const;
1093 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name,
InputTag const& defaultValue)
const;
1097 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const;
1100 std::vector<InputTag>
1101 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name,
1102 std::vector<InputTag>
const& defaultValue)
const;
1105 std::vector<InputTag>
1106 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const;
1113 ParameterSet::getUntrackedParameter<EventID>(
char const*
name,
EventID const& defaultValue)
const;
1117 ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const;
1120 std::vector<EventID>
1121 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name,
1122 std::vector<EventID>
const& defaultValue)
const;
1124 std::vector<EventID>
1125 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const;
1132 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name,
LuminosityBlockID const& defaultValue)
const;
1136 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const;
1139 std::vector<LuminosityBlockID>
1140 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name,
1141 std::vector<LuminosityBlockID>
const& defaultValue)
const;
1143 std::vector<LuminosityBlockID>
1144 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
1151 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name,
EventRange const& defaultValue)
const;
1155 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const;
1158 std::vector<EventRange>
1159 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name,
1160 std::vector<EventRange>
const& defaultValue)
const;
1162 std::vector<EventRange>
1163 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const;
1170 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name,
LuminosityBlockRange const& defaultValue)
const;
1174 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name)
const;
1177 std::vector<LuminosityBlockRange>
1178 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name,
1179 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
1181 std::vector<LuminosityBlockRange>
1182 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
1189 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
ParameterSet const& defaultValue)
const;
1197 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const;
1201 ParameterSet::getUntrackedParameter<ParameterSet>(
std::string const&
name)
const;
1205 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name, VParameterSet
const& defaultValue)
const;
1209 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const;
1213 ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name, VParameterSet
const& defaultValue)
const;
1217 ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name)
const;
1220 std::vector<std::string>
1221 ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const;
1224 std::vector<std::string>
1225 ParameterSet::getParameterNamesForType<VParameterSet>(
bool trackiness)
const;
void swap(ParameterSet &a, ParameterSet &b)
ParameterSet::Bool operator&&(ParameterSet::Bool a, ParameterSet::Bool b)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::map< std::string, ParameterSetEntry > psettable
std::vector< ParameterSet > VParameterSet
ParameterSet const & getParameterSet(ParameterSetID const &id)
void addUntrackedParameter(char const *name, T const &value)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const std::string names[nVars_]
ParameterSet const & getProcessParameterSetContainingModule(ModuleDescription const &moduleDescription)
void swap(ParameterSet &other)
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
void addParameter(std::string const &name, T const &value)
bool operator==(MD5Result const &a, MD5Result const &b)
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
bool isRegistered() const
Namespace of DDCMS conversion namespace.
psettable const & psetTable() const
void addParameter(char const *name, T const &value)
void addUntrackedParameter(std::string const &name, T const &value)
ParameterSetID trackedID() const
bool operator!=(MD5Result const &a, MD5Result const &b)
std::map< std::string, Entry > table
std::map< std::string, VParameterSetEntry > vpsettable
vpsettable const & vpsetTable() const
std::ostream & operator<<(std::ostream &os, MD5Result const &r)
pat::CandKinResolution::Parametrization fromString(const std::string &name)
Convert a name into a parametrization code.
table const & tbl() const
bool isTransientEqual(ParameterSet const &a, ParameterSet const &b)
ParameterSet * getPSetForUpdate(std::string const &name)