1 #ifndef FWCore_ParameterSet_ParameterSet_h 2 #define FWCore_ParameterSet_ParameterSet_h 65 Entry const& retrieve(
char const*)
const;
67 Entry const* retrieveUntracked(
char const*)
const;
69 Entry const* retrieveUnknown(
char const*)
const;
80 void insert(
bool ok_to_replace,
char const*,
Entry const&);
98 T getParameter(
char const*)
const;
110 ParameterSet const& getUntrackedParameterSet(
char const* name)
const;
112 VParameterSet
const& getParameterSetVector(
std::string const& name)
const;
114 VParameterSet
const& getParameterSetVector(
char const* name)
const;
116 VParameterSet getUntrackedParameterSetVector(
std::string const& name, VParameterSet
const& defaultValue)
const;
118 VParameterSet getUntrackedParameterSetVector(
char const* name, VParameterSet
const& defaultValue)
const;
120 VParameterSet
const& getUntrackedParameterSetVector(
std::string const& name)
const;
122 VParameterSet
const& getUntrackedParameterSetVector(
char const* name)
const;
124 template <
typename T>
126 invalidateRegistration(name);
130 template <
typename T>
132 invalidateRegistration(name);
136 template <
typename T>
139 template <
typename T>
140 T getUntrackedParameter(
char const*,
T const&)
const;
142 template <
typename T>
145 template <
typename T>
146 T getUntrackedParameter(
char const*)
const;
154 std::vector<std::string> getParameterNames()
const;
157 bool exists(
std::string const& parameterName)
const;
160 template <
typename T>
162 std::vector<std::string>
names = getParameterNamesForType<T>(trackiness);
163 return std::find(names.begin(), names.end(), parameterName) != names.end();
168 template <
typename T>
170 std::vector<std::string>
result;
174 Entry type_translator(
"", value, trackiness);
175 char type_code = type_translator.
typeCode();
177 (void)getNamesByCode_(type_code, trackiness, result);
181 template <
typename T>
186 template <
typename T>
191 bool empty()
const {
return tbl_.empty() && psetTable_.empty() && vpsetTable_.empty(); }
200 size_t getParameterSetNames(std::vector<std::string>& output,
bool trackiness =
true)
const;
207 size_t getParameterSetVectorNames(std::vector<std::string>& output,
bool trackiness =
true)
const;
216 std::unique_ptr<ParameterSet> popParameterSet(
std::string const& name);
217 void eraseSimpleParameter(
std::string const& name);
218 void eraseOrSetUntrackedParameterSet(
std::string const& name);
220 std::vector<ParameterSet> popVParameterSet(
std::string const& name);
222 typedef std::map<std::string, Entry>
table;
223 table
const&
tbl()
const {
return tbl_; }
225 typedef std::map<std::string, ParameterSetEntry>
psettable;
226 psettable
const&
psetTable()
const {
return psetTable_; }
228 typedef std::map<std::string, VParameterSetEntry>
vpsettable;
234 bool isTracked =
false;
235 return getPSetForUpdate(name, isTracked);
241 static void registerFromString(
std::string const& rep);
264 void invalidateRegistration(
std::string const& nameOfTracked);
271 Entry const* getEntryPointerOrThrow_(
char const* name)
const;
275 size_t getNamesByCode_(
char code,
bool trackiness, std::vector<std::string>& output)
const;
305 std::vector<int> ParameterSet::getParameter<std::vector<int> >(
std::string const&
name)
const;
311 long long ParameterSet::getParameter<long long>(
std::string const&
name)
const;
314 std::vector<long long> ParameterSet::getParameter<std::vector<long long> >(
std::string const&
name)
const;
320 unsigned int ParameterSet::getParameter<unsigned int>(
std::string const&
name)
const;
323 std::vector<unsigned int> ParameterSet::getParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
329 unsigned long long ParameterSet::getParameter<unsigned long long>(
std::string const&
name)
const;
332 std::vector<unsigned long long> ParameterSet::getParameter<std::vector<unsigned long long> >(
339 double ParameterSet::getParameter<double>(
std::string const&
name)
const;
342 std::vector<double> ParameterSet::getParameter<std::vector<double> >(
std::string const&
name)
const;
351 std::vector<std::string> ParameterSet::getParameter<std::vector<std::string> >(
std::string const&
name)
const;
362 std::vector<std::string> ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const;
374 std::vector<InputTag> ParameterSet::getParameter<std::vector<InputTag> >(
std::string const&
name)
const;
386 std::vector<ESInputTag> ParameterSet::getParameter<std::vector<ESInputTag> >(
std::string const&
name)
const;
398 std::vector<EventID> ParameterSet::getParameter<std::vector<EventID> >(
std::string const&
name)
const;
410 std::vector<LuminosityBlockID> ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
423 std::vector<EventRange> ParameterSet::getParameter<std::vector<EventRange> >(
std::string const&
name)
const;
435 std::vector<LuminosityBlockRange> ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
445 VParameterSet ParameterSet::getParameter<VParameterSet>(
std::string const&
name)
const;
460 void ParameterSet::addParameter<VParameterSet>(
std::string const&
name, VParameterSet
const&
value);
463 void ParameterSet::addParameter<VParameterSet>(
char const*
name, VParameterSet
const&
value);
466 void ParameterSet::addUntrackedParameter<VParameterSet>(
std::string const&
name, VParameterSet
const&
value);
469 void ParameterSet::addUntrackedParameter<VParameterSet>(
char const*
name, VParameterSet
const&
value);
477 bool ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const;
480 bool ParameterSet::getUntrackedParameter<bool>(
std::string const&
name)
const;
486 int ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const;
489 int ParameterSet::getUntrackedParameter<int>(
std::string const&
name)
const;
492 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name,
493 std::vector<int>
const& defaultValue)
const;
496 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name)
const;
502 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
503 unsigned int const& defaultValue)
const;
506 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name)
const;
509 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
510 std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const;
513 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
520 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
521 std::string const&
name,
unsigned long long const& defaultValue)
const;
524 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name)
const;
527 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
528 std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const;
531 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
538 long long ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
539 long long const& defaultValue)
const;
542 long long ParameterSet::getUntrackedParameter<long long>(
std::string const&
name)
const;
545 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
546 std::string const&
name, std::vector<long long>
const& defaultValue)
const;
549 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const;
555 double ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const;
558 double ParameterSet::getUntrackedParameter<double>(
std::string const&
name)
const;
561 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
562 std::string const&
name, std::vector<double>
const& defaultValue)
const;
565 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const;
578 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
579 std::string const&
name, std::vector<std::string>
const& defaultValue)
const;
582 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name)
const;
604 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
605 std::string const&
name, std::vector<InputTag>
const& defaultValue)
const;
608 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const;
620 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
621 std::string const&
name, std::vector<EventID>
const& defaultValue)
const;
623 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const;
636 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
637 std::string const&
name, std::vector<LuminosityBlockID>
const& defaultValue)
const;
639 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
653 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
654 std::string const&
name, std::vector<EventRange>
const& defaultValue)
const;
656 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const;
669 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
670 std::string const&
name, std::vector<LuminosityBlockRange>
const& defaultValue)
const;
672 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
680 bool ParameterSet::getParameter<bool>(
char const*
name)
const;
686 int ParameterSet::getParameter<int>(
char const*
name)
const;
689 std::vector<int> ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const;
695 long long ParameterSet::getParameter<long long>(
char const*
name)
const;
698 std::vector<long long> ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const;
704 unsigned int ParameterSet::getParameter<unsigned int>(
char const*
name)
const;
707 std::vector<unsigned int> ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const;
713 unsigned long long ParameterSet::getParameter<unsigned long long>(
char const*
name)
const;
716 std::vector<unsigned long long> ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const;
722 double ParameterSet::getParameter<double>(
char const*
name)
const;
725 std::vector<double> ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const;
731 std::string ParameterSet::getParameter<std::string>(
char const*
name)
const;
734 std::vector<std::string> ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const;
740 FileInPath ParameterSet::getParameter<FileInPath>(
char const*
name)
const;
746 InputTag ParameterSet::getParameter<InputTag>(
char const*
name)
const;
752 std::vector<InputTag> ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const;
758 EventID ParameterSet::getParameter<EventID>(
char const*
name)
const;
764 std::vector<EventID> ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const;
776 std::vector<LuminosityBlockID> ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
782 EventRange ParameterSet::getParameter<EventRange>(
char const*
name)
const;
788 std::vector<EventRange> ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const;
800 std::vector<LuminosityBlockRange> ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
801 char const*
name)
const;
807 ParameterSet ParameterSet::getParameter<ParameterSet>(
char const*
name)
const;
810 VParameterSet ParameterSet::getParameter<VParameterSet>(
char const*
name)
const;
818 bool ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const;
821 bool ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const;
827 int ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const;
830 int ParameterSet::getUntrackedParameter<int>(
char const*
name)
const;
833 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name,
834 std::vector<int>
const& defaultValue)
const;
837 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const;
843 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
844 unsigned int const& defaultValue)
const;
847 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const;
850 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
851 char const*
name, std::vector<unsigned int>
const& defaultValue)
const;
854 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const;
860 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
861 char const*
name,
unsigned long long const& defaultValue)
const;
864 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const;
867 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
868 char const*
name, std::vector<unsigned long long>
const& defaultValue)
const;
871 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
872 char const*
name)
const;
878 long long ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const;
881 long long ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const;
884 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
885 char const*
name, std::vector<long long>
const& defaultValue)
const;
888 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const;
894 double ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const;
897 double ParameterSet::getUntrackedParameter<double>(
char const*
name)
const;
900 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
901 char const*
name, std::vector<double>
const& defaultValue)
const;
904 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const;
913 std::string ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const;
916 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
917 char const*
name, std::vector<std::string>
const& defaultValue)
const;
920 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const;
929 FileInPath ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const;
935 InputTag ParameterSet::getUntrackedParameter<InputTag>(
char const*
name,
InputTag const& defaultValue)
const;
938 InputTag ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const;
941 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
942 char const*
name, std::vector<InputTag>
const& defaultValue)
const;
945 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const;
951 EventID ParameterSet::getUntrackedParameter<EventID>(
char const*
name,
EventID const& defaultValue)
const;
954 EventID ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const;
957 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
958 char const*
name, std::vector<EventID>
const& defaultValue)
const;
960 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const;
973 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
974 char const*
name, std::vector<LuminosityBlockID>
const& defaultValue)
const;
976 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
977 char const*
name)
const;
986 EventRange ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const;
989 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
990 char const*
name, std::vector<EventRange>
const& defaultValue)
const;
992 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const;
1005 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
1006 char const*
name, std::vector<LuminosityBlockRange>
const& defaultValue)
const;
1008 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
1009 char const*
name)
const;
1015 ParameterSet ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
1023 ParameterSet ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const;
1029 VParameterSet ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name,
1030 VParameterSet
const& defaultValue)
const;
1033 VParameterSet ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const;
1036 VParameterSet ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name,
1037 VParameterSet
const& defaultValue)
const;
1040 VParameterSet ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name)
const;
1043 std::vector<std::string> ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const;
1046 std::vector<std::string> 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
std::string toString(const std::pair< T, T > &aT)
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)