32 namespace pset::exceptions {
35 <<
" elements, but has " << iGot <<
" elements in the configuration.\n";
43 if (!nameOfTracked.empty()) {
45 LogInfo(
"ParameterSet") <<
"Warning: You have added a new tracked parameter\n"
46 <<
"'" << nameOfTracked <<
"' to a previously registered parameter set.\n"
47 <<
"This is a bad idea because the new parameter(s) will not be recorded.\n"
48 <<
"Use the forthcoming ParameterSetDescription facility instead.\n"
49 <<
"A warning is given only for the first such parameter in a pset.\n";
67 <<
"The encoded configuration string "
68 <<
"passed to a ParameterSet during construction is invalid:\n"
77 : tbl_(), psetTable_(), vpsetTable_(), id_(id) {
80 <<
"The encoded configuration string "
81 <<
"passed to a ParameterSet during construction is invalid:\n"
123 psettable::iterator it =
psetTable_.find(name);
125 auto pset = std::make_unique<ParameterSet>();
126 std::swap(*pset, it->second.psetForUpdate());
133 table::iterator it =
tbl_.find(name);
140 psettable::iterator it =
psetTable_.find(name);
143 if (pset.isRegistered()) {
144 it->second.setIsTracked(
false);
154 std::vector<ParameterSet> vpset;
155 std::swap(vpset, it->second.vpsetForUpdate());
167 item.second.updateID();
172 i->second.registerPsetsAndUpdateIDs();
193 <<
"before ParameterSet::registerIt() has been called.\n";
210 if (result ==
nullptr)
212 <<
"The required parameter '" << name <<
"' was not specified.\n";
216 template <
typename T,
typename U>
221 template <
typename T,
typename U>
229 table::const_iterator it =
tbl_.find(name);
230 if (it ==
tbl_.end()) {
233 if (it->second.isTracked() ==
false) {
234 if (name[0] ==
'@') {
236 <<
"Framework Error: Parameter '" << name <<
"' is incorrectly designated as tracked in the framework.";
239 <<
"Parameter '" << name <<
"' is designated as tracked in the code,\n"
240 <<
"but is designated as untracked in the configuration file.\n"
241 <<
"Please remove 'untracked' from the configuration file for parameter '" << name <<
"'.";
250 table::const_iterator it =
tbl_.find(name);
252 if (it ==
tbl_.end())
254 if (it->second.isTracked()) {
255 if (name[0] ==
'@') {
257 <<
"Framework Error: Parameter '" << name <<
"' is incorrectly designated as untracked in the framework.";
260 <<
"Parameter '" << name <<
"' is designated as untracked in the code,\n"
261 <<
"but is not designated as untracked in the configuration file.\n"
262 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
269 psettable::const_iterator it =
psetTable_.find(name);
273 if (it->second.isTracked() ==
false) {
274 if (name[0] ==
'@') {
276 <<
"Framework Error: ParameterSet '" << name <<
"' is incorrectly designated as tracked in the framework.";
279 <<
"ParameterSet '" << name <<
"' is designated as tracked in the code,\n"
280 <<
"but is designated as untracked in the configuration file.\n"
281 <<
"Please remove 'untracked' from the configuration file for parameter '" << name <<
"'.";
288 psettable::const_iterator it =
psetTable_.find(name);
292 if (it->second.isTracked()) {
293 if (name[0] ==
'@') {
295 <<
"Framework Error: ParameterSet '" << name
296 <<
"' is incorrectly designated as untracked in the framework.";
299 <<
"ParameterSet '" << name <<
"' is designated as untracked in the code,\n"
300 <<
"but is not designated as untracked in the configuration file.\n"
301 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
308 vpsettable::const_iterator it =
vpsetTable_.find(name);
312 if (it->second.isTracked() ==
false) {
314 <<
"VParameterSet '" << name <<
"' is designated as tracked in the code,\n"
315 <<
"but is designated as untracked in the configuration file.\n"
316 <<
"Please remove 'untracked' from the configuration file for parameter '" << name <<
"'.";
322 vpsettable::const_iterator it =
vpsetTable_.find(name);
326 if (it->second.isTracked()) {
328 <<
"VParameterSet '" << name <<
"' is designated as untracked in the code,\n"
329 <<
"but is not designated as untracked in the configuration file.\n"
330 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
338 table::const_iterator it =
tbl_.find(name);
339 if (it ==
tbl_.end()) {
346 psettable::const_iterator it =
psetTable_.find(name);
354 vpsettable::const_iterator it =
vpsetTable_.find(name);
365 if (existsAs<ParameterSet>(name)) {
367 }
else if (
existsAs<std::vector<ParameterSet> >(name)) {
369 }
else if (
exists(name)) {
373 <<
"Cannot find parameter " << name <<
" in " << *
this;
387 table::iterator it =
tbl_.find(name);
389 if (it ==
tbl_.end()) {
390 if (!
tbl_.insert(std::make_pair(name, value)).second)
392 }
else if (okay_to_replace) {
400 psettable::iterator it =
psetTable_.find(name);
403 if (!
psetTable_.insert(std::make_pair(name, entry)).second)
405 }
else if (okay_to_replace) {
418 if (!
vpsetTable_.insert(std::make_pair(name, entry)).second)
420 <<
"cannot insert " << name <<
" into a VParameterSet\n";
421 }
else if (okay_to_replace) {
433 for (table::const_iterator
b = from.
tbl_.begin(),
e = from.
tbl_.end();
b !=
e; ++
b) {
434 this->
insert(
false,
b->first,
b->second);
448 }
else if (from.
existsAs<std::vector<ParameterSet> >(name)) {
450 }
else if (from.
exists(name)) {
460 psettable::iterator it =
psetTable_.find(name);
463 isTracked = it->second.isTracked();
464 return &it->second.psetForUpdate();
490 for (table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
491 if (useAll ||
b->second.isTracked()) {
493 size +=
b->first.size();
494 size +=
b->second.sizeOfString();
498 if (useAll ||
b->second.isTracked()) {
500 size +=
b->first.size();
501 size +=
b->first.size();
502 size +=
b->first.size();
507 if (useAll ||
b->second.isTracked()) {
509 size +=
b->first.size();
514 rep.reserve(rep.size() +
size);
518 for (table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
519 if (useAll ||
b->second.isTracked()) {
523 b->second.toString(rep);
528 if (useAll ||
b->second.isTracked()) {
532 b->second.toString(rep);
537 if (useAll ||
b->second.isTracked()) {
541 b->second.toString(rep);
551 bool started =
false;
552 for (table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
553 if (
b->second.isTracked()) {
558 b->second.toDigest(digest);
563 if (
b->second.isTracked()) {
568 b->second.toDigest(digest);
573 if (
b->second.isTracked()) {
578 b->second.toDigest(digest);
594 std::vector<std::string>
temp;
595 if (!
split(std::back_inserter(temp), from,
'<',
';',
'>'))
599 for (std::vector<std::string>::const_iterator
b = temp.begin(),
e = temp.end();
b !=
e; ++
b) {
616 if (!
psetTable_.insert(std::make_pair(name, psetEntry)).second) {
619 }
else if (
rep[1] ==
'q') {
621 if (!
vpsetTable_.insert(std::make_pair(name, vpsetEntry)).second) {
624 }
else if (
rep[1] ==
'P') {
627 if (!
psetTable_.insert(std::make_pair(name, psetEntry)).second) {
630 }
else if (
rep[1] ==
'p') {
633 if (!
vpsetTable_.insert(std::make_pair(name, vpsetEntry)).second) {
639 if (!
tbl_.insert(std::make_pair(name, value)).second) {
650 table::const_iterator it =
tbl_.begin();
651 table::const_iterator
end =
tbl_.end();
653 Entry const&
e = it->second;
664 using std::placeholders::_1;
665 std::vector<std::string> returnValue;
668 back_inserter(returnValue),
672 back_inserter(returnValue),
676 back_inserter(returnValue),
688 for (table::const_iterator tblItr =
tbl_.begin(); tblItr !=
tbl_.end(); ++tblItr) {
689 if (tblItr->second.isTracked()) {
690 result.
tbl_.insert(*tblItr);
693 for (psettable::const_iterator psetItr =
psetTable_.begin(); psetItr !=
psetTable_.end(); ++psetItr) {
694 if (psetItr->second.isTracked()) {
698 for (vpsettable::const_iterator vpsetItr =
vpsetTable_.begin(); vpsetItr !=
vpsetTable_.end(); ++vpsetItr) {
699 if (vpsetItr->second.isTracked()) {
701 std::vector<ParameterSet>
const& this_vpset = vpsetItr->second.vpset();
703 typedef std::vector<ParameterSet>::const_iterator Iter;
704 for (Iter
i = this_vpset.begin(),
e = this_vpset.end();
i !=
e; ++
i) {
705 vresult.push_back(
i->trackedPart());
725 for (psettable::const_iterator psetItr =
psetTable_.begin(); psetItr !=
psetTable_.end(); ++psetItr) {
726 if (psetItr->second.isTracked() == trackiness) {
727 output.push_back(psetItr->first);
730 return output.size();
734 for (vpsettable::const_iterator vpsetItr =
vpsetTable_.begin(); vpsetItr !=
vpsetTable_.end(); ++vpsetItr) {
735 if (vpsetItr->second.isTracked() == trackiness) {
736 output.push_back(vpsetItr->first);
739 return output.size();
750 table::const_iterator it =
tbl_.begin();
751 table::const_iterator
end =
tbl_.end();
753 Entry const&
e = it->second;
756 output.push_back(it->first);
764 std::vector<std::string> ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const {
765 std::vector<std::string>
result;
766 getNamesByCode_(
'F', trackiness, result);
772 return (a.
id() == b.
id());
778 if (a.
tbl().size() != b.
tbl().size()) {
787 typedef ParameterSet::table::const_iterator Ti;
788 for (Ti
i = a.
tbl().begin(),
e = a.
tbl().end(),
j = b.
tbl().begin(),
f = b.
tbl().end();
i !=
e &&
j !=
f;
794 typedef ParameterSet::psettable::const_iterator
Pi;
798 if (
i->first !=
j->first) {
801 if (
i->second.isTracked() !=
j->second.isTracked()) {
808 typedef ParameterSet::vpsettable::const_iterator PVi;
812 if (
i->first !=
j->first) {
815 if (
i->second.isTracked() !=
j->second.isTracked()) {
818 std::vector<ParameterSet>
const&
iv =
i->second.vpset();
819 std::vector<ParameterSet>
const& jv =
j->second.vpset();
820 if (iv.size() != jv.size()) {
823 for (
size_t k = 0;
k < iv.size(); ++
k) {
833 std::ostringstream os;
836 os <<
"{" << std::endl;
837 for (table::const_iterator
i =
tbl_.begin(),
e =
tbl_.end();
i !=
e; ++
i) {
838 os << indentation <<
" " <<
i->first <<
": " <<
i->second << std::endl;
844 os << indentation <<
" " << n <<
": " << pe.
dump(indent + 2) << std::endl;
850 os << indentation <<
" " << n <<
": " << pe.
dump(indent + 2) << std::endl;
852 os << indentation <<
"}";
875 LogWarning(
"Configuration") <<
"Warning:\n\tstring " << name <<
" = \"" << label <<
"\"\nis deprecated, "
876 <<
"please update your config file to use\n\tInputTag " << name <<
" = " <<
label;
885 return retrieve(
name).getBool();
893 return retrieve(
name).getInt32();
897 std::vector<int> ParameterSet::getParameter<std::vector<int> >(
std::string const&
name)
const {
898 return retrieve(
name).getVInt32();
906 return retrieve(
name).getInt64();
910 std::vector<long long> ParameterSet::getParameter<std::vector<long long> >(
std::string const&
name)
const {
911 return retrieve(
name).getVInt64();
918 unsigned int ParameterSet::getParameter<unsigned int>(
std::string const&
name)
const {
919 return retrieve(
name).getUInt32();
923 std::vector<unsigned int> ParameterSet::getParameter<std::vector<unsigned int> >(
std::string const&
name)
const {
924 return retrieve(
name).getVUInt32();
931 unsigned long long ParameterSet::getParameter<unsigned long long>(
std::string const&
name)
const {
932 return retrieve(
name).getUInt64();
936 std::vector<unsigned long long> ParameterSet::getParameter<std::vector<unsigned long long> >(
938 return retrieve(
name).getVUInt64();
946 return retrieve(
name).getDouble();
950 std::vector<double> ParameterSet::getParameter<std::vector<double> >(
std::string const&
name)
const {
951 return retrieve(
name).getVDouble();
959 return retrieve(
name).getString();
963 std::vector<std::string> ParameterSet::getParameter<std::vector<std::string> >(
std::string const&
name)
const {
964 return retrieve(
name).getVString();
972 return retrieve(
name).getFileInPath();
986 deprecatedInputTagWarning(
name, label);
990 <<
"type of " <<
name <<
" is expected to be InputTag or string (deprecated)";
997 std::vector<InputTag> ParameterSet::getParameter<std::vector<InputTag> >(
std::string const&
name)
const {
998 return retrieve(
name).getVInputTag();
1006 return retrieve(
name).getESInputTag();
1013 std::vector<ESInputTag> ParameterSet::getParameter<std::vector<ESInputTag> >(
std::string const&
name)
const {
1014 return retrieve(
name).getVESInputTag();
1022 return retrieve(
name).getEventID();
1029 std::vector<EventID> ParameterSet::getParameter<std::vector<EventID> >(
std::string const&
name)
const {
1030 return retrieve(
name).getVEventID();
1038 return retrieve(
name).getLuminosityBlockID();
1045 std::vector<LuminosityBlockID> ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
1047 return retrieve(
name).getVLuminosityBlockID();
1055 return retrieve(
name).getEventRange();
1062 std::vector<EventRange> ParameterSet::getParameter<std::vector<EventRange> >(
std::string const&
name)
const {
1063 return retrieve(
name).getVEventRange();
1071 return retrieve(
name).getLuminosityBlockRange();
1078 std::vector<LuminosityBlockRange> ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
1080 return retrieve(
name).getVLuminosityBlockRange();
1093 return getParameterSetVector(
name);
1102 bool ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const {
1103 Entry const* entryPtr = retrieveUntracked(
name);
1104 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getBool();
1109 return getEntryPointerOrThrow_(
name)->getBool();
1116 int ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const {
1117 Entry const* entryPtr = retrieveUntracked(
name);
1118 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getInt32();
1123 return getEntryPointerOrThrow_(
name)->getInt32();
1127 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name,
1128 std::vector<int>
const& defaultValue)
const {
1129 Entry const* entryPtr = retrieveUntracked(
name);
1130 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVInt32();
1134 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name)
const {
1135 return getEntryPointerOrThrow_(
name)->getVInt32();
1143 unsigned int const& defaultValue)
const {
1144 Entry const* entryPtr = retrieveUntracked(
name);
1145 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getUInt32();
1149 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name)
const {
1150 return getEntryPointerOrThrow_(
name)->getUInt32();
1154 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
1155 std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const {
1156 Entry const* entryPtr = retrieveUntracked(
name);
1157 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVUInt32();
1161 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
1163 return getEntryPointerOrThrow_(
name)->getVUInt32();
1170 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
1171 std::string const&
name,
unsigned long long const& defaultValue)
const {
1172 Entry const* entryPtr = retrieveUntracked(
name);
1173 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getUInt64();
1177 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name)
const {
1178 return getEntryPointerOrThrow_(
name)->getUInt64();
1182 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
1183 std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const {
1184 Entry const* entryPtr = retrieveUntracked(
name);
1185 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVUInt64();
1189 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
1191 return getEntryPointerOrThrow_(
name)->getVUInt64();
1199 long long const& defaultValue)
const {
1200 Entry const* entryPtr = retrieveUntracked(
name);
1201 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getInt64();
1206 return getEntryPointerOrThrow_(
name)->getInt64();
1210 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
1211 std::string const&
name, std::vector<long long>
const& defaultValue)
const {
1212 Entry const* entryPtr = retrieveUntracked(
name);
1213 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVInt64();
1217 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const {
1218 return getEntryPointerOrThrow_(
name)->getVInt64();
1225 double ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const {
1226 Entry const* entryPtr = retrieveUntracked(
name);
1227 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getDouble();
1232 return getEntryPointerOrThrow_(
name)->getDouble();
1236 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
1237 std::string const&
name, std::vector<double>
const& defaultValue)
const {
1238 Entry const* entryPtr = retrieveUntracked(
name);
1239 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVDouble();
1243 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const {
1244 return getEntryPointerOrThrow_(
name)->getVDouble();
1253 Entry const* entryPtr = retrieveUntracked(
name);
1254 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getString();
1259 return getEntryPointerOrThrow_(
name)->getString();
1263 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
1264 std::string const&
name, std::vector<std::string>
const& defaultValue)
const {
1265 Entry const* entryPtr = retrieveUntracked(
name);
1266 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVString();
1270 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
1272 return getEntryPointerOrThrow_(
name)->getVString();
1281 Entry const* entryPtr = retrieveUntracked(
name);
1282 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getFileInPath();
1287 return getEntryPointerOrThrow_(
name)->getFileInPath();
1295 Entry const* entryPtr = retrieveUntracked(
name);
1296 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getInputTag();
1301 return getEntryPointerOrThrow_(
name)->getInputTag();
1305 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
1306 std::string const&
name, std::vector<InputTag>
const& defaultValue)
const {
1307 Entry const* entryPtr = retrieveUntracked(
name);
1308 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVInputTag();
1312 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const {
1313 return getEntryPointerOrThrow_(
name)->getVInputTag();
1322 Entry const* entryPtr = retrieveUntracked(
name);
1323 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getESInputTag();
1328 return getEntryPointerOrThrow_(
name)->getESInputTag();
1332 std::vector<ESInputTag> ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
1333 std::string const&
name, std::vector<ESInputTag>
const& defaultValue)
const {
1334 Entry const* entryPtr = retrieveUntracked(
name);
1335 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVESInputTag();
1339 std::vector<ESInputTag> ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
std::string const&
name)
const {
1340 return getEntryPointerOrThrow_(
name)->getVESInputTag();
1348 Entry const* entryPtr = retrieveUntracked(
name);
1349 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getEventID();
1354 return getEntryPointerOrThrow_(
name)->getEventID();
1358 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
1359 std::string const&
name, std::vector<EventID>
const& defaultValue)
const {
1360 Entry const* entryPtr = retrieveUntracked(
name);
1361 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVEventID();
1365 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const {
1366 return getEntryPointerOrThrow_(
name)->getVEventID();
1375 Entry const* entryPtr = retrieveUntracked(
name);
1381 return getEntryPointerOrThrow_(
name)->getLuminosityBlockID();
1385 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
1386 std::string const&
name, std::vector<LuminosityBlockID>
const& defaultValue)
const {
1387 Entry const* entryPtr = retrieveUntracked(
name);
1392 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
1394 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockID();
1403 Entry const* entryPtr = retrieveUntracked(
name);
1404 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getEventRange();
1409 return getEntryPointerOrThrow_(
name)->getEventRange();
1413 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
1414 std::string const&
name, std::vector<EventRange>
const& defaultValue)
const {
1415 Entry const* entryPtr = retrieveUntracked(
name);
1416 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVEventRange();
1420 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const {
1421 return getEntryPointerOrThrow_(
name)->getVEventRange();
1430 Entry const* entryPtr = retrieveUntracked(
name);
1436 return getEntryPointerOrThrow_(
name)->getLuminosityBlockRange();
1440 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
1441 std::string const&
name, std::vector<LuminosityBlockRange>
const& defaultValue)
const {
1442 Entry const* entryPtr = retrieveUntracked(
name);
1447 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
1449 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockRange();
1457 bool ParameterSet::getParameter<bool>(
char const*
name)
const {
1458 return retrieve(
name).getBool();
1465 int ParameterSet::getParameter<int>(
char const*
name)
const {
1466 return retrieve(
name).getInt32();
1470 std::vector<int> ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const {
1471 return retrieve(
name).getVInt32();
1478 long long ParameterSet::getParameter<long long>(
char const*
name)
const {
1479 return retrieve(
name).getInt64();
1483 std::vector<long long> ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const {
1484 return retrieve(
name).getVInt64();
1491 unsigned int ParameterSet::getParameter<unsigned int>(
char const*
name)
const {
1492 return retrieve(
name).getUInt32();
1496 std::vector<unsigned int> ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const {
1497 return retrieve(
name).getVUInt32();
1504 unsigned long long ParameterSet::getParameter<unsigned long long>(
char const*
name)
const {
1505 return retrieve(
name).getUInt64();
1509 std::vector<unsigned long long> ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const {
1510 return retrieve(
name).getVUInt64();
1517 double ParameterSet::getParameter<double>(
char const*
name)
const {
1518 return retrieve(
name).getDouble();
1522 std::vector<double> ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const {
1523 return retrieve(
name).getVDouble();
1531 return retrieve(
name).getString();
1535 std::vector<std::string> ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const {
1536 return retrieve(
name).getVString();
1544 return retrieve(
name).getFileInPath();
1558 deprecatedInputTagWarning(
name, label);
1562 <<
"type of " <<
name <<
" is expected to be InputTag or string (deprecated)";
1569 std::vector<InputTag> ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const {
1570 return retrieve(
name).getVInputTag();
1578 return retrieve(
name).getESInputTag();
1585 std::vector<ESInputTag> ParameterSet::getParameter<std::vector<ESInputTag> >(
char const*
name)
const {
1586 return retrieve(
name).getVESInputTag();
1594 return retrieve(
name).getEventID();
1601 std::vector<EventID> ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const {
1602 return retrieve(
name).getVEventID();
1610 return retrieve(
name).getLuminosityBlockID();
1617 std::vector<LuminosityBlockID> ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const {
1618 return retrieve(
name).getVLuminosityBlockID();
1626 return retrieve(
name).getEventRange();
1633 std::vector<EventRange> ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const {
1634 return retrieve(
name).getVEventRange();
1642 return retrieve(
name).getLuminosityBlockRange();
1649 std::vector<LuminosityBlockRange> ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
1650 char const*
name)
const {
1651 return retrieve(
name).getVLuminosityBlockRange();
1664 return getParameterSetVector(
name);
1673 bool ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const {
1674 Entry const* entryPtr = retrieveUntracked(
name);
1675 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getBool();
1679 bool ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const {
1680 return getEntryPointerOrThrow_(
name)->getBool();
1687 int ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const {
1688 Entry const* entryPtr = retrieveUntracked(
name);
1689 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getInt32();
1693 int ParameterSet::getUntrackedParameter<int>(
char const*
name)
const {
1694 return getEntryPointerOrThrow_(
name)->getInt32();
1698 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name,
1699 std::vector<int>
const& defaultValue)
const {
1700 Entry const* entryPtr = retrieveUntracked(
name);
1701 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVInt32();
1705 std::vector<int> ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const {
1706 return getEntryPointerOrThrow_(
name)->getVInt32();
1713 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
1714 unsigned int const& defaultValue)
const {
1715 Entry const* entryPtr = retrieveUntracked(
name);
1716 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getUInt32();
1720 unsigned int ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const {
1721 return getEntryPointerOrThrow_(
name)->getUInt32();
1725 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
1726 char const*
name, std::vector<unsigned int>
const& defaultValue)
const {
1727 Entry const* entryPtr = retrieveUntracked(
name);
1728 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVUInt32();
1732 std::vector<unsigned int> ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const {
1733 return getEntryPointerOrThrow_(
name)->getVUInt32();
1740 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
1741 char const*
name,
unsigned long long const& defaultValue)
const {
1742 Entry const* entryPtr = retrieveUntracked(
name);
1743 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getUInt64();
1747 unsigned long long ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const {
1748 return getEntryPointerOrThrow_(
name)->getUInt64();
1752 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
1753 char const*
name, std::vector<unsigned long long>
const& defaultValue)
const {
1754 Entry const* entryPtr = retrieveUntracked(
name);
1755 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVUInt64();
1759 std::vector<unsigned long long> ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
1760 char const*
name)
const {
1761 return getEntryPointerOrThrow_(
name)->getVUInt64();
1768 long long ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const {
1769 Entry const* entryPtr = retrieveUntracked(
name);
1770 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getInt64();
1774 long long ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const {
1775 return getEntryPointerOrThrow_(
name)->getInt64();
1779 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
1780 char const*
name, std::vector<long long>
const& defaultValue)
const {
1781 Entry const* entryPtr = retrieveUntracked(
name);
1782 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVInt64();
1786 std::vector<long long> ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const {
1787 return getEntryPointerOrThrow_(
name)->getVInt64();
1794 double ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const {
1795 Entry const* entryPtr = retrieveUntracked(
name);
1796 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getDouble();
1800 double ParameterSet::getUntrackedParameter<double>(
char const*
name)
const {
1801 return getEntryPointerOrThrow_(
name)->getDouble();
1805 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
1806 char const*
name, std::vector<double>
const& defaultValue)
const {
1807 Entry const* entryPtr = retrieveUntracked(
name);
1808 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVDouble();
1812 std::vector<double> ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const {
1813 return getEntryPointerOrThrow_(
name)->getVDouble();
1822 Entry const* entryPtr = retrieveUntracked(
name);
1823 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getString();
1828 return getEntryPointerOrThrow_(
name)->getString();
1832 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
1833 char const*
name, std::vector<std::string>
const& defaultValue)
const {
1834 Entry const* entryPtr = retrieveUntracked(
name);
1835 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVString();
1839 std::vector<std::string> ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const {
1840 return getEntryPointerOrThrow_(
name)->getVString();
1848 Entry const* entryPtr = retrieveUntracked(
name);
1849 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getFileInPath();
1854 return getEntryPointerOrThrow_(
name)->getFileInPath();
1862 Entry const* entryPtr = retrieveUntracked(
name);
1863 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getInputTag();
1867 InputTag ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const {
1868 return getEntryPointerOrThrow_(
name)->getInputTag();
1872 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
1873 char const*
name, std::vector<InputTag>
const& defaultValue)
const {
1874 Entry const* entryPtr = retrieveUntracked(
name);
1875 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVInputTag();
1879 std::vector<InputTag> ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const {
1880 return getEntryPointerOrThrow_(
name)->getVInputTag();
1888 Entry const* entryPtr = retrieveUntracked(
name);
1889 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getESInputTag();
1894 return getEntryPointerOrThrow_(
name)->getESInputTag();
1898 std::vector<ESInputTag> ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
1899 char const*
name, std::vector<ESInputTag>
const& defaultValue)
const {
1900 Entry const* entryPtr = retrieveUntracked(
name);
1901 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVESInputTag();
1905 std::vector<ESInputTag> ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
char const*
name)
const {
1906 return getEntryPointerOrThrow_(
name)->getVESInputTag();
1913 EventID ParameterSet::getUntrackedParameter<EventID>(
char const*
name,
EventID const& defaultValue)
const {
1914 Entry const* entryPtr = retrieveUntracked(
name);
1915 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getEventID();
1919 EventID ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const {
1920 return getEntryPointerOrThrow_(
name)->getEventID();
1924 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
1925 char const*
name, std::vector<EventID>
const& defaultValue)
const {
1926 Entry const* entryPtr = retrieveUntracked(
name);
1927 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVEventID();
1931 std::vector<EventID> ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const {
1932 return getEntryPointerOrThrow_(
name)->getVEventID();
1941 Entry const* entryPtr = retrieveUntracked(
name);
1947 return getEntryPointerOrThrow_(
name)->getLuminosityBlockID();
1951 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
1952 char const*
name, std::vector<LuminosityBlockID>
const& defaultValue)
const {
1953 Entry const* entryPtr = retrieveUntracked(
name);
1958 std::vector<LuminosityBlockID> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
1959 char const*
name)
const {
1960 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockID();
1968 Entry const* entryPtr = retrieveUntracked(
name);
1969 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getEventRange();
1974 return getEntryPointerOrThrow_(
name)->getEventRange();
1978 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
1979 char const*
name, std::vector<EventRange>
const& defaultValue)
const {
1980 Entry const* entryPtr = retrieveUntracked(
name);
1981 return entryPtr ==
nullptr ? defaultValue : entryPtr->
getVEventRange();
1985 std::vector<EventRange> ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const {
1986 return getEntryPointerOrThrow_(
name)->getVEventRange();
1995 Entry const* entryPtr = retrieveUntracked(
name);
2001 return getEntryPointerOrThrow_(
name)->getLuminosityBlockRange();
2005 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
2006 char const*
name, std::vector<LuminosityBlockRange>
const& defaultValue)
const {
2007 Entry const* entryPtr = retrieveUntracked(
name);
2012 std::vector<LuminosityBlockRange> ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
2013 char const*
name)
const {
2014 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockRange();
2023 return getUntrackedParameterSet(
name, defaultValue);
2029 return getUntrackedParameterSetVector(
name, defaultValue);
2035 return getUntrackedParameterSet(
name, defaultValue);
2041 return getUntrackedParameterSetVector(
name, defaultValue);
2046 return getUntrackedParameterSet(
name);
2051 return getUntrackedParameterSetVector(
name);
2056 return getUntrackedParameterSet(
name);
2061 return getUntrackedParameterSetVector(
name);
2069 invalidateRegistration(
name);
2075 invalidateRegistration(
name);
2081 invalidateRegistration(
name);
2087 invalidateRegistration(
name);
2115 std::vector<std::string> ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const {
2116 std::vector<std::string>
output;
2117 getParameterSetNames(output, trackiness);
2122 std::vector<std::string> ParameterSet::getParameterNamesForType<VParameterSet>(
bool trackiness)
const {
2123 std::vector<std::string>
output;
2124 getParameterSetVectorNames(output, trackiness);
2142 if (entryPtr ==
nullptr) {
2143 return defaultValue;
2145 return entryPtr->
pset();
2154 if (result ==
nullptr)
2156 <<
"The required ParameterSet '" << name <<
"' was not specified.\n";
2157 return result->
pset();
2176 return entryPtr ==
nullptr ? defaultValue : entryPtr->
vpset();
2185 if (result ==
nullptr)
2187 <<
"The required ParameterSetVector '" << name <<
"' was not specified.\n";
2188 return result->
vpset();
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
std::vector< unsigned > getVUInt32() const
void setID(ParameterSetID const &id)
ParameterSetID const & mainParameterSetID() const
Entry const & retrieve(char const *) const
std::string toString() const
std::vector< double > getVDouble() const
VParameterSet const & getParameterSetVector(std::string const &name) const
ParameterSetEntry const & retrieveParameterSet(std::string const &) const
Entry const * getEntryPointerOrThrow_(std::string const &name) const
std::vector< unsigned long long > getVUInt64() const
std::vector< LuminosityBlockID > getVLuminosityBlockID() const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
ParameterSet getPSet() const
std::unique_ptr< ParameterSet > popParameterSet(std::string const &name)
std::string dump(unsigned int indent=0) const
std::string dump(unsigned int indent=0) const
ParameterSetEntry const * retrieveUntrackedParameterSet(std::string const &) const
bool fromString(std::string const &)
std::string dump(unsigned int indent=0) const
unsigned getUInt32() const
ParameterSetID id() const
VParameterSetEntry const * retrieveUntrackedVParameterSet(std::string const &) const
std::vector< ParameterSet > VParameterSet
size_t getParameterSetVectorNames(std::vector< std::string > &output, bool trackiness=true) const
ParameterSet const & getParameterSet(ParameterSetID const &id)
std::vector< InputTag > getVInputTag() const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void toStringImp(std::string &, bool useAll) const
void insert(bool ok_to_replace, char const *, Entry const &)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
void swap(Hash< I > &other)
LuminosityBlockRange getLuminosityBlockRange() const
std::vector< EventID > getVEventID() const
ParameterSet const & getProcessParameterSetContainingModule(ModuleDescription const &moduleDescription)
ParameterSet trackedPart() const
void augment(ParameterSet const &from)
void eraseOrSetUntrackedParameterSet(std::string const &name)
void swap(ParameterSet &other)
U second(std::pair< T, U > const &p)
unsigned long long getUInt64() const
std::vector< FileInPath >::size_type getAllFileInPaths(std::vector< FileInPath > &output) const
ParameterSet const & pset() const
returns the PSet
void copyFrom(ParameterSet const &from, std::string const &name)
long long getInt64() const
VParameterSetEntry * getPSetVectorForUpdate(std::string const &name)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void addParameter(std::string const &name, T const &value)
std::vector< ParameterSet > getVPSet() const
ParameterSetEntry const * retrieveUnknownParameterSet(std::string const &) const
void insertVParameterSet(bool okay_to_replace, std::string const &name, VParameterSetEntry const &entry)
InputTag getInputTag() const
std::vector< ParameterSet > const & vpset() const
returns the VPSet
bool insertMapped(value_type const &v, bool forceUpdate=false)
std::vector< long long > getVInt64() const
VParameterSetEntry const * retrieveUnknownVParameterSet(std::string const &) const
bool split(OutIter result, std::string const &string_to_split, char first, char sep, char last)
std::vector< ESInputTag > getVESInputTag() const
std::vector< std::string > getParameterNames() const
void eraseSimpleParameter(std::string const &name)
void copyForModify(ParameterSet const &other)
bool isRegistered() const
std::vector< EventRange > getVEventRange() const
Hash< ParameterSetType > ParameterSetID
void invalidateRegistration(std::string const &nameOfTracked)
std::string toString() const
Log< level::Info, false > LogInfo
static void registerFromString(std::string const &rep)
std::string getParameterAsString(std::string const &name) const
FileInPath getFileInPath() const
psettable const & psetTable() const
void deprecatedInputTagWarning(std::string const &name, std::string const &label) const
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
ParameterSet const & getParameterSet(std::string const &) const
std::string toString() const
size_t getNamesByCode_(char code, bool trackiness, std::vector< std::string > &output) const
void insertParameterSet(bool okay_to_replace, std::string const &name, ParameterSetEntry const &entry)
void toDigest(cms::Digest &digest) const
std::vector< int > getVInt32() const
std::string toString() const
VParameterSetEntry const & retrieveVParameterSet(std::string const &) const
LuminosityBlockID getLuminosityBlockID() const
void allToString(std::string &result) const
std::vector< ParameterSet > popVParameterSet(std::string const &name)
vpsettable const & vpsetTable() const
EventRange getEventRange() const
VParameterSet getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) const
std::vector< LuminosityBlockRange > getVLuminosityBlockRange() const
ESInputTag getESInputTag() const
Entry const * retrieveUntracked(char const *) const
Log< level::Warning, false > LogWarning
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
void throwWrongNumberOfElements(std::string const &iParameterName, size_t iExpected, size_t iGot)
Entry const * retrieveUnknown(char const *) const
T first(std::pair< T, U > const &p)
table const & tbl() const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
std::string toString() const
static ParameterSetID emptyParameterSetID()
ParameterSet const & registerIt()
bool isTransientEqual(ParameterSet const &a, ParameterSet const &b)
std::vector< std::string > getVString() const
tuple size
Write out results.
std::string getString() const
static Registry * instance()
void append(std::string const &s)
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)
EventID getEventID() const