1 #ifndef FWCore_ParameterSet_ParameterSet_h 2 #define FWCore_ParameterSet_ParameterSet_h 69 Entry const& retrieve(
char const*)
const;
71 Entry const* retrieveUntracked(
char const*)
const;
73 Entry const* retrieveUnknown(
char const*)
const;
84 void insert(
bool ok_to_replace,
char const* ,
Entry const&);
104 getParameter(
char const*)
const;
116 getUntrackedParameterSet(
char const* name,
ParameterSet const& defaultValue)
const;
119 getUntrackedParameterSet(
std::string const& name)
const;
122 getUntrackedParameterSet(
char const* name)
const;
125 getParameterSetVector(
std::string const& name)
const;
128 getParameterSetVector(
char const* name)
const;
131 getUntrackedParameterSetVector(
std::string const& name, VParameterSet
const& defaultValue)
const;
134 getUntrackedParameterSetVector(
char const* name, VParameterSet
const& defaultValue)
const;
137 getUntrackedParameterSetVector(
std::string const& name)
const;
140 getUntrackedParameterSetVector(
char const* name)
const;
145 invalidateRegistration(name);
152 invalidateRegistration(name);
158 getUntrackedParameter(
std::string const&,
T const&)
const;
162 getUntrackedParameter(
char const*,
T const&)
const;
170 getUntrackedParameter(
char const*)
const;
177 getAllFileInPaths(std::vector<FileInPath>&
output)
const;
179 std::vector<std::string> getParameterNames()
const;
182 bool exists(
std::string const& parameterName)
const;
187 std::vector<std::string>
names = getParameterNamesForType<T>(trackiness);
188 return std::find(names.begin(), names.end(), parameterName) != names.end();
195 std::vector<std::string>
result;
199 Entry type_translator(
"", value, trackiness);
200 char type_code = type_translator.
typeCode();
202 (void)getNamesByCode_(type_code, trackiness, result);
219 return tbl_.empty() && psetTable_.empty() && vpsetTable_.empty();
229 size_t getParameterSetNames(std::vector<std::string>& output,
230 bool trackiness =
true)
const;
237 size_t getParameterSetVectorNames(std::vector<std::string>& output,
238 bool trackiness=
true)
const;
247 std::unique_ptr<ParameterSet> popParameterSet(
std::string const& name);
248 void eraseSimpleParameter(
std::string const& name);
249 void eraseOrSetUntrackedParameterSet(
std::string const& name);
251 std::vector<ParameterSet> popVParameterSet(
std::string const& name);
253 typedef std::map<std::string, Entry>
table;
254 table
const&
tbl()
const {
return tbl_;}
256 typedef std::map<std::string, ParameterSetEntry>
psettable;
259 typedef std::map<std::string, VParameterSetEntry>
vpsettable;
263 getPSetForUpdate(
std::string const& name,
bool& isTracked);
267 bool isTracked =
false;
268 return getPSetForUpdate(name, isTracked);
282 emptyParameterSetID();
302 void invalidateRegistration(
std::string const& nameOfTracked);
309 Entry const* getEntryPointerOrThrow_(
char const* name)
const;
313 size_t getNamesByCode_(
char code,
315 std::vector<std::string>& output)
const;
358 ParameterSet::getParameter<std::vector<int> >(
std::string const&
name)
const;
368 std::vector<long long>
369 ParameterSet::getParameter<std::vector<long long> >(
std::string const&
name)
const;
376 ParameterSet::getParameter<unsigned int>(
std::string const&
name)
const;
379 std::vector<unsigned int>
380 ParameterSet::getParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
387 ParameterSet::getParameter<unsigned long long>(
std::string const&
name)
const;
390 std::vector<unsigned long long>
391 ParameterSet::getParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
402 ParameterSet::getParameter<std::vector<double> >(
std::string const&
name)
const;
409 ParameterSet::getParameter<std::string>(
std::string const&
name)
const;
412 std::vector<std::string>
413 ParameterSet::getParameter<std::vector<std::string> >(
std::string const&
name)
const;
425 std::vector<std::string>
426 ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const;
439 std::vector<InputTag>
440 ParameterSet::getParameter<std::vector<InputTag> >(
std::string const&
name)
const;
453 std::vector<ESInputTag>
454 ParameterSet::getParameter<std::vector<ESInputTag> >(
std::string const&
name)
const;
468 ParameterSet::getParameter<std::vector<EventID> >(
std::string const&
name)
const;
475 ParameterSet::getParameter<LuminosityBlockID>(
std::string const&
name)
const;
481 std::vector<LuminosityBlockID>
482 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
495 std::vector<EventRange>
496 ParameterSet::getParameter<std::vector<EventRange> >(
std::string const&
name)
const;
503 ParameterSet::getParameter<LuminosityBlockRange>(
std::string const&
name)
const;
509 std::vector<LuminosityBlockRange>
510 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
517 ParameterSet::getParameter<ParameterSet>(
std::string const&
name)
const;
521 ParameterSet::getParameter<VParameterSet>(
std::string const&
name)
const;
545 ParameterSet::addParameter<VParameterSet>(
char const*
name, VParameterSet
const&
value);
549 ParameterSet::addUntrackedParameter<VParameterSet>(
std::string const&
name, VParameterSet
const&
value);
553 ParameterSet::addUntrackedParameter<VParameterSet>(
char const*
name, VParameterSet
const&
value);
562 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const;
566 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name)
const;
573 ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const;
577 ParameterSet::getUntrackedParameter<int>(
std::string const&
name)
const;
581 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name, std::vector<int>
const& defaultValue)
const;
585 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name)
const;
592 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
unsigned int const& defaultValue)
const;
596 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name)
const;
599 std::vector<unsigned int>
600 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const;
603 std::vector<unsigned int>
604 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
611 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name,
unsigned long long const& defaultValue)
const;
615 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name)
const;
618 std::vector<unsigned long long>
619 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const;
622 std::vector<unsigned long long>
623 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
630 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
long long const& defaultValue)
const;
634 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name)
const;
637 std::vector<long long>
638 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name, std::vector<long long>
const& defaultValue)
const;
641 std::vector<long long>
642 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const;
649 ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const;
653 ParameterSet::getUntrackedParameter<double>(
std::string const&
name)
const;
657 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name, std::vector<double>
const& defaultValue)
const;
661 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const;
672 ParameterSet::getUntrackedParameter<std::string>(
std::string const&
name)
const;
675 std::vector<std::string>
676 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name, std::vector<std::string>
const& defaultValue)
const;
679 std::vector<std::string>
680 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name)
const;
691 ParameterSet::getUntrackedParameter<FileInPath>(
std::string const&
name)
const;
702 ParameterSet::getUntrackedParameter<InputTag>(
std::string const&
name)
const;
705 std::vector<InputTag>
706 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name,
707 std::vector<InputTag>
const& defaultValue)
const;
710 std::vector<InputTag>
711 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const;
722 ParameterSet::getUntrackedParameter<EventID>(
std::string const&
name)
const;
726 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name,
727 std::vector<EventID>
const& defaultValue)
const;
730 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const;
741 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name)
const;
744 std::vector<LuminosityBlockID>
745 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name,
746 std::vector<LuminosityBlockID>
const& defaultValue)
const;
748 std::vector<LuminosityBlockID>
749 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
760 ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name)
const;
763 std::vector<EventRange>
764 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name,
765 std::vector<EventRange>
const& defaultValue)
const;
767 std::vector<EventRange>
768 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const;
779 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
std::string const&
name)
const;
782 std::vector<LuminosityBlockRange>
783 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name,
784 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
786 std::vector<LuminosityBlockRange>
787 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
795 ParameterSet::getParameter<bool>(
char const*
name)
const;
802 ParameterSet::getParameter<int>(
char const*
name)
const;
806 ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const;
813 ParameterSet::getParameter<long long>(
char const*
name)
const;
816 std::vector<long long>
817 ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const;
824 ParameterSet::getParameter<unsigned int>(
char const*
name)
const;
827 std::vector<unsigned int>
828 ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const;
835 ParameterSet::getParameter<unsigned long long>(
char const*
name)
const;
838 std::vector<unsigned long long>
839 ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const;
846 ParameterSet::getParameter<double>(
char const*
name)
const;
850 ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const;
857 ParameterSet::getParameter<std::string>(
char const*
name)
const;
860 std::vector<std::string>
861 ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const;
868 ParameterSet::getParameter<FileInPath>(
char const*
name)
const;
875 ParameterSet::getParameter<InputTag>(
char const*
name)
const;
881 std::vector<InputTag>
882 ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const;
889 ParameterSet::getParameter<EventID>(
char const*
name)
const;
896 ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const;
903 ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const;
909 std::vector<LuminosityBlockID>
910 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
917 ParameterSet::getParameter<EventRange>(
char const*
name)
const;
923 std::vector<EventRange>
924 ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const;
931 ParameterSet::getParameter<LuminosityBlockRange>(
char const*
name)
const;
937 std::vector<LuminosityBlockRange>
938 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
945 ParameterSet::getParameter<ParameterSet>(
char const*
name)
const;
949 ParameterSet::getParameter<VParameterSet>(
char const*
name)
const;
958 ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const;
962 ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const;
969 ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const;
973 ParameterSet::getUntrackedParameter<int>(
char const*
name)
const;
977 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name, std::vector<int>
const& defaultValue)
const;
981 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const;
988 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
unsigned int const& defaultValue)
const;
992 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const;
995 std::vector<unsigned int>
996 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name, std::vector<unsigned int>
const& defaultValue)
const;
999 std::vector<unsigned int>
1000 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const;
1007 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name,
unsigned long long const& defaultValue)
const;
1011 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const;
1014 std::vector<unsigned long long>
1015 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name, std::vector<unsigned long long>
const& defaultValue)
const;
1018 std::vector<unsigned long long>
1019 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name)
const;
1026 ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const;
1030 ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const;
1033 std::vector<long long>
1034 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name, std::vector<long long>
const& defaultValue)
const;
1037 std::vector<long long>
1038 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const;
1045 ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const;
1049 ParameterSet::getUntrackedParameter<double>(
char const*
name)
const;
1053 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name, std::vector<double>
const& defaultValue)
const;
1057 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const;
1064 ParameterSet::getUntrackedParameter<std::string>(
char const*
name,
std::string const& defaultValue)
const;
1068 ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const;
1071 std::vector<std::string>
1072 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name, std::vector<std::string>
const& defaultValue)
const;
1075 std::vector<std::string>
1076 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const;
1083 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name,
FileInPath const& defaultValue)
const;
1087 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const;
1094 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name,
InputTag const& defaultValue)
const;
1098 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const;
1101 std::vector<InputTag>
1102 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name,
1103 std::vector<InputTag>
const& defaultValue)
const;
1106 std::vector<InputTag>
1107 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const;
1114 ParameterSet::getUntrackedParameter<EventID>(
char const*
name,
EventID const& defaultValue)
const;
1118 ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const;
1121 std::vector<EventID>
1122 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name,
1123 std::vector<EventID>
const& defaultValue)
const;
1125 std::vector<EventID>
1126 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const;
1133 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name,
LuminosityBlockID const& defaultValue)
const;
1137 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const;
1140 std::vector<LuminosityBlockID>
1141 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name,
1142 std::vector<LuminosityBlockID>
const& defaultValue)
const;
1144 std::vector<LuminosityBlockID>
1145 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
1152 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name,
EventRange const& defaultValue)
const;
1156 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const;
1159 std::vector<EventRange>
1160 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name,
1161 std::vector<EventRange>
const& defaultValue)
const;
1163 std::vector<EventRange>
1164 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const;
1171 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name,
LuminosityBlockRange const& defaultValue)
const;
1175 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name)
const;
1178 std::vector<LuminosityBlockRange>
1179 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name,
1180 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
1182 std::vector<LuminosityBlockRange>
1183 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
1190 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
ParameterSet const& defaultValue)
const;
1198 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const;
1202 ParameterSet::getUntrackedParameter<ParameterSet>(
std::string const&
name)
const;
1206 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name, VParameterSet
const& defaultValue)
const;
1210 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const;
1214 ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name, VParameterSet
const& defaultValue)
const;
1218 ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name)
const;
1221 std::vector<std::string>
1222 ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const;
1225 std::vector<std::string>
1226 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
static const HistoName names[]
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)
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
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)