19 #include "boost/bind.hpp"
37 if(!nameOfTracked.empty()) {
39 LogInfo(
"ParameterSet") <<
"Warning: You have added a new tracked parameter\n"
40 <<
"'" << nameOfTracked <<
"' to a previously registered parameter set.\n"
41 <<
"This is a bad idea because the new parameter(s) will not be recorded.\n"
42 <<
"Use the forthcoming ParameterSetDescription facility instead.\n"
43 <<
"A warning is given only for the first such parameter in a pset.\n";
70 <<
"The encoded configuration string "
71 <<
"passed to a ParameterSet during construction is invalid:\n"
86 <<
"The encoded configuration string "
87 <<
"passed to a ParameterSet during construction is invalid:\n"
112 psetTable_(other.psetTable_),
113 vpsetTable_(other.vpsetTable_),
146 psettable::iterator it =
psetTable_.find(name);
149 std::swap(*pset, it->second.psetForUpdate());
156 table::iterator it =
tbl_.find(name);
157 assert(it !=
tbl_.end());
163 psettable::iterator it =
psetTable_.find(name);
166 if (pset.isRegistered()) {
167 it->second.setIsTracked(
false);
177 std::auto_ptr<std::vector<ParameterSet> > vpset(
new std::vector<ParameterSet>);
178 std::swap(*vpset, it->second.vpsetForUpdate());
190 item.second.updateID();
195 i->second.registerPsetsAndUpdateIDs();
217 <<
"ParameterSet::id() called prematurely\n"
218 <<
"before ParameterSet::registerIt() has been called.\n";
241 <<
"The required parameter '" << name
242 <<
"' was not specified.\n";
246 template<
typename T,
typename U>
T first(std::pair<T, U>
const&
p) {
250 template<
typename T,
typename U> U
second(std::pair<T, U>
const&
p) {
261 table::const_iterator it =
tbl_.find(name);
262 if(it ==
tbl_.end()) {
264 <<
"Parameter '" << name
267 if(it->second.isTracked() ==
false) {
270 <<
"Framework Error: Parameter '" << name
271 <<
"' is incorrectly designated as tracked in the framework.";
274 <<
"Parameter '" << name
275 <<
"' is designated as tracked in the code,\n"
276 <<
"but is designated as untracked in the configuration file.\n"
277 <<
"Please remove 'untracked' from the configuration file for parameter '"<< name <<
"'.";
290 table::const_iterator it =
tbl_.find(name);
292 if(it ==
tbl_.end())
return 0;
293 if(it->second.isTracked()) {
296 <<
"Framework Error: Parameter '" << name
297 <<
"' is incorrectly designated as untracked in the framework.";
300 <<
"Parameter '" << name
301 <<
"' is designated as untracked in the code,\n"
302 <<
"but is not designated as untracked in the configuration file.\n"
303 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
311 psettable::const_iterator it =
psetTable_.find(name);
314 <<
"ParameterSet '" << name
317 if(it->second.isTracked() ==
false) {
320 <<
"Framework Error: ParameterSet '" << name
321 <<
"' is incorrectly designated as tracked in the framework.";
324 <<
"ParameterSet '" << name
325 <<
"' is designated as tracked in the code,\n"
326 <<
"but is designated as untracked in the configuration file.\n"
327 <<
"Please remove 'untracked' from the configuration file for parameter '"<< name <<
"'.";
335 psettable::const_iterator it =
psetTable_.find(name);
338 if(it->second.isTracked()) {
341 <<
"Framework Error: ParameterSet '" << name
342 <<
"' is incorrectly designated as untracked in the framework.";
345 <<
"ParameterSet '" << name
346 <<
"' is designated as untracked in the code,\n"
347 <<
"but is not designated as untracked in the configuration file.\n"
348 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
356 vpsettable::const_iterator it =
vpsetTable_.find(name);
359 <<
"VParameterSet '" << name
362 if(it->second.isTracked() ==
false) {
364 <<
"VParameterSet '" << name
365 <<
"' is designated as tracked in the code,\n"
366 <<
"but is designated as untracked in the configuration file.\n"
367 <<
"Please remove 'untracked' from the configuration file for parameter '"<< name <<
"'.";
374 vpsettable::const_iterator it =
vpsetTable_.find(name);
377 if(it->second.isTracked()) {
379 <<
"VParameterSet '" << name
380 <<
"' is designated as untracked in the code,\n"
381 <<
"but is not designated as untracked in the configuration file.\n"
382 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
394 table::const_iterator it =
tbl_.find(name);
395 if(it ==
tbl_.end()) {
403 psettable::const_iterator it =
psetTable_.find(name);
412 vpsettable::const_iterator it =
vpsetTable_.find(name);
424 if(existsAs<ParameterSet>(name)) {
427 else if(
existsAs<std::vector<ParameterSet> >(name)) {
435 <<
"Cannot find parameter " << name <<
" in " << *
this;
451 table::iterator it =
tbl_.find(name);
453 if(it ==
tbl_.end()) {
454 if(!
tbl_.insert(std::make_pair(name, value)).second)
456 <<
"cannot insert " << name
457 <<
" into a ParameterSet\n";
459 else if(okay_to_replace) {
467 psettable::iterator it =
psetTable_.find(name);
470 if(!
psetTable_.insert(std::make_pair(name, entry)).second)
472 <<
"cannot insert " << name
473 <<
" into a ParameterSet\n";
474 }
else if(okay_to_replace) {
485 if(!
vpsetTable_.insert(std::make_pair(name, entry)).second)
487 <<
"cannot insert " << name
488 <<
" into a VParameterSet\n";
489 }
else if(okay_to_replace) {
502 for(table::const_iterator
b = from.
tbl_.begin(),
e = from.
tbl_.end();
b !=
e; ++
b) {
503 this->
insert(
false,
b->first,
b->second);
518 else if(from.
existsAs<std::vector<ParameterSet> >(name)) {
521 else if(from.
exists(name)) {
526 <<
"Cannot find parameter " << name <<
" in " << from;
534 psettable::iterator it =
psetTable_.find(name);
536 isTracked = it->second.isTracked();
537 return &it->second.psetForUpdate();
570 for(table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
571 if(useAll ||
b->second.isTracked()) {
573 size +=
b->first.size();
574 size +=
b->second.sizeOfString();
578 if(useAll ||
b->second.isTracked()) {
580 size +=
b->first.size();
581 size +=
b->first.size();
582 size +=
b->first.size();
587 if(useAll ||
b->second.isTracked()) {
589 size +=
b->first.size();
594 rep.reserve(rep.size()+
size);
598 for(table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
599 if(useAll ||
b->second.isTracked()) {
603 b->second.toString(rep);
608 if(useAll ||
b->second.isTracked()) {
612 b->second.toString(rep);
617 if(useAll ||
b->second.isTracked()) {
621 b->second.toString(rep);
632 bool started =
false;
633 for(table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
634 if(
b->second.isTracked()) {
639 b->second.toDigest(digest);
644 if(
b->second.isTracked()) {
649 b->second.toDigest(digest);
654 if(
b->second.isTracked()) {
659 b->second.toDigest(digest);
677 std::vector<std::string>
temp;
678 if(!
split(std::back_inserter(temp), from,
'<',
';',
'>'))
682 for(std::vector<std::string>::const_iterator
b = temp.begin(),
e = temp.end();
b !=
e; ++
b) {
699 if(!
psetTable_.insert(std::make_pair(name, psetEntry)).second) {
702 }
else if(
rep[1] ==
'q') {
704 if(!
vpsetTable_.insert(std::make_pair(name, vpsetEntry)).second) {
707 }
else if(
rep[1] ==
'P') {
710 if(!
psetTable_.insert(std::make_pair(name, psetEntry)).second) {
713 }
else if(
rep[1] ==
'p') {
716 if(!
vpsetTable_.insert(std::make_pair(name, vpsetEntry)).second) {
722 if(!
tbl_.insert(std::make_pair(name, value)).second) {
734 table::const_iterator it =
tbl_.begin();
735 table::const_iterator
end =
tbl_.end();
737 Entry const&
e = it->second;
747 std::vector<std::string>
749 std::vector<std::string> returnValue;
760 return(
tbl_.find(parameterName) !=
tbl_.end() ||
768 for(table::const_iterator tblItr =
tbl_.begin(); tblItr !=
tbl_.end(); ++tblItr) {
769 if(tblItr->second.isTracked()) {
770 result.
tbl_.insert(*tblItr);
773 for(psettable::const_iterator psetItr =
psetTable_.begin(); psetItr !=
psetTable_.end(); ++psetItr) {
774 if(psetItr->second.isTracked()) {
778 for(vpsettable::const_iterator vpsetItr =
vpsetTable_.begin(); vpsetItr !=
vpsetTable_.end(); ++vpsetItr) {
779 if(vpsetItr->second.isTracked()) {
781 std::vector<ParameterSet>
const& this_vpset = vpsetItr->second.vpset();
783 typedef std::vector<ParameterSet>::const_iterator Iter;
784 for (Iter
i = this_vpset.begin(),
e = this_vpset.end();
i !=
e; ++
i) {
785 vresult.push_back(
i->trackedPart());
805 bool trackiness)
const {
806 for(psettable::const_iterator psetItr =
psetTable_.begin();
808 if(psetItr->second.isTracked() == trackiness) {
809 output.push_back(psetItr->first);
812 return output.size();
817 bool trackiness)
const {
818 for(vpsettable::const_iterator vpsetItr =
vpsetTable_.begin();
820 if(vpsetItr->second.isTracked() == trackiness) {
821 output.push_back(vpsetItr->first);
824 return output.size();
830 std::vector<std::string>&
output)
const {
838 table::const_iterator it =
tbl_.begin();
839 table::const_iterator
end =
tbl_.end();
841 Entry const&
e = it->second;
845 output.push_back(it->first);
853 std::vector<std::string> ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const {
854 std::vector<std::string>
result;
855 getNamesByCode_(
'F', trackiness, result);
861 return (a.
id() == b.
id());
867 if(a.
tbl().size() != b.
tbl().size()) {
876 typedef ParameterSet::table::const_iterator Ti;
877 for (Ti
i = a.
tbl().begin(),
e = a.
tbl().end(),
878 j = b.
tbl().begin(),
f = b.
tbl().end();
879 i !=
e &&
j !=
f; ++
i, ++
j) {
884 typedef ParameterSet::psettable::const_iterator
Pi;
887 i !=
e &&
j !=
f; ++
i, ++
j) {
888 if(
i->first !=
j->first) {
891 if(
i->second.isTracked() !=
j->second.isTracked()) {
898 typedef ParameterSet::vpsettable::const_iterator PVi;
901 i !=
e &&
j !=
f; ++
i, ++
j) {
902 if(
i->first !=
j->first) {
905 if(
i->second.isTracked() !=
j->second.isTracked()) {
908 std::vector<ParameterSet>
const& iv =
i->second.vpset();
909 std::vector<ParameterSet>
const& jv =
j->second.vpset();
910 if(iv.size() != jv.size()) {
913 for (
size_t k = 0;
k < iv.size(); ++
k) {
923 std::ostringstream os;
926 os <<
"{" << std::endl;
927 for(table::const_iterator
i =
tbl_.begin(),
e =
tbl_.end();
i !=
e; ++
i) {
928 os << indentation <<
" " <<
i->first <<
": " <<
i->second << std::endl;
934 os << indentation <<
" " << n <<
": " << pe.
dump(indent + 2) << std::endl;
940 os << indentation <<
" " << n <<
": " << pe.
dump(indent + 2) << std::endl;
942 os << indentation <<
"}";
957 <<
"Parameter Set ID '" <<
id <<
"' not found.";
964 LogWarning(
"Configuration") <<
"Warning:\n\tstring " << name
966 <<
"\"\nis deprecated, "
967 <<
"please update your config file to use\n\tInputTag "
968 << name <<
" = " <<
label;
978 return retrieve(
name).getBool();
987 return retrieve(
name).getInt32();
993 return retrieve(
name).getVInt32();
1002 return retrieve(
name).getInt64();
1006 std::vector<long long>
1008 return retrieve(
name).getVInt64();
1017 return retrieve(
name).getUInt32();
1021 std::vector<unsigned int>
1023 return retrieve(
name).getVUInt32();
1032 return retrieve(
name).getUInt64();
1036 std::vector<unsigned long long>
1037 ParameterSet::getParameter<std::vector<unsigned long long> >(
std::string const&
name)
const {
1038 return retrieve(
name).getVUInt64();
1047 return retrieve(
name).getDouble();
1053 return retrieve(
name).getVDouble();
1062 return retrieve(
name).getString();
1066 std::vector<std::string>
1068 return retrieve(
name).getVString();
1077 return retrieve(
name).getFileInPath();
1092 deprecatedInputTagWarning(
name, label);
1096 <<
name <<
" is expected to be InputTag or string (deprecated)";
1104 std::vector<InputTag>
1106 return retrieve(
name).getVInputTag();
1115 return retrieve(
name).getESInputTag();
1122 std::vector<ESInputTag>
1124 return retrieve(
name).getVESInputTag();
1133 return retrieve(
name).getEventID();
1140 std::vector<EventID>
1142 return retrieve(
name).getVEventID();
1151 return retrieve(
name).getLuminosityBlockID();
1158 std::vector<LuminosityBlockID>
1159 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const {
1160 return retrieve(
name).getVLuminosityBlockID();
1169 return retrieve(
name).getEventRange();
1176 std::vector<EventRange>
1178 return retrieve(
name).getVEventRange();
1187 return retrieve(
name).getLuminosityBlockRange();
1194 std::vector<LuminosityBlockRange>
1195 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const {
1196 return retrieve(
name).getVLuminosityBlockRange();
1211 return getParameterSetVector(
name);
1221 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const {
1222 Entry const* entryPtr = retrieveUntracked(
name);
1223 return entryPtr == 0 ? defaultValue : entryPtr->
getBool();
1229 return getEntryPointerOrThrow_(
name)->getBool();
1237 ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const {
1238 Entry const* entryPtr = retrieveUntracked(
name);
1239 return entryPtr == 0 ? defaultValue : entryPtr->
getInt32();
1245 return getEntryPointerOrThrow_(
name)->getInt32();
1250 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name, std::vector<int>
const& defaultValue)
const {
1251 Entry const* entryPtr = retrieveUntracked(
name);
1252 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt32();
1258 return getEntryPointerOrThrow_(
name)->getVInt32();
1266 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
unsigned int const& defaultValue)
const {
1267 Entry const* entryPtr = retrieveUntracked(
name);
1268 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt32();
1274 return getEntryPointerOrThrow_(
name)->getUInt32();
1278 std::vector<unsigned int>
1279 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const {
1280 Entry const* entryPtr = retrieveUntracked(
name);
1281 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt32();
1285 std::vector<unsigned int>
1286 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name)
const {
1287 return getEntryPointerOrThrow_(
name)->getVUInt32();
1295 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name,
unsigned long long const& defaultValue)
const {
1296 Entry const* entryPtr = retrieveUntracked(
name);
1297 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt64();
1303 return getEntryPointerOrThrow_(
name)->getUInt64();
1307 std::vector<unsigned long long>
1308 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const {
1309 Entry const* entryPtr = retrieveUntracked(
name);
1310 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt64();
1314 std::vector<unsigned long long>
1315 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name)
const {
1316 return getEntryPointerOrThrow_(
name)->getVUInt64();
1324 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
long long const& defaultValue)
const {
1325 Entry const* entryPtr = retrieveUntracked(
name);
1326 return entryPtr == 0 ? defaultValue : entryPtr->
getInt64();
1332 return getEntryPointerOrThrow_(
name)->getInt64();
1336 std::vector<long long>
1337 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name, std::vector<long long>
const& defaultValue)
const {
1338 Entry const* entryPtr = retrieveUntracked(
name);
1339 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt64();
1343 std::vector<long long>
1344 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const {
1345 return getEntryPointerOrThrow_(
name)->getVInt64();
1353 ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const {
1354 Entry const* entryPtr = retrieveUntracked(
name);
1355 return entryPtr == 0 ? defaultValue : entryPtr->
getDouble();
1361 return getEntryPointerOrThrow_(
name)->getDouble();
1366 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name, std::vector<double>
const& defaultValue)
const {
1367 Entry const* entryPtr = retrieveUntracked(
name);
return entryPtr == 0 ? defaultValue : entryPtr->
getVDouble();
1372 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const {
1373 return getEntryPointerOrThrow_(
name)->getVDouble();
1382 Entry const* entryPtr = retrieveUntracked(
name);
1383 return entryPtr == 0 ? defaultValue : entryPtr->
getString();
1389 return getEntryPointerOrThrow_(
name)->getString();
1393 std::vector<std::string>
1394 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name, std::vector<std::string>
const& defaultValue)
const {
1395 Entry const* entryPtr = retrieveUntracked(
name);
1396 return entryPtr == 0 ? defaultValue : entryPtr->
getVString();
1400 std::vector<std::string>
1401 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name)
const {
1402 return getEntryPointerOrThrow_(
name)->getVString();
1411 Entry const* entryPtr = retrieveUntracked(
name);
1412 return entryPtr == 0 ? defaultValue : entryPtr->
getFileInPath();
1418 return getEntryPointerOrThrow_(
name)->getFileInPath();
1427 Entry const* entryPtr = retrieveUntracked(
name);
1428 return entryPtr == 0 ? defaultValue : entryPtr->
getInputTag();
1434 return getEntryPointerOrThrow_(
name)->getInputTag();
1438 std::vector<InputTag>
1440 std::vector<InputTag>
const& defaultValue)
const {
1441 Entry const* entryPtr = retrieveUntracked(
name);
1442 return entryPtr == 0 ? defaultValue : entryPtr->
getVInputTag();
1446 std::vector<InputTag>
1447 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const {
1448 return getEntryPointerOrThrow_(
name)->getVInputTag();
1457 Entry const* entryPtr = retrieveUntracked(
name);
1458 return entryPtr == 0 ? defaultValue : entryPtr->
getESInputTag();
1464 return getEntryPointerOrThrow_(
name)->getESInputTag();
1468 std::vector<ESInputTag>
1470 std::vector<ESInputTag>
const& defaultValue)
const {
1471 Entry const* entryPtr = retrieveUntracked(
name);
1472 return entryPtr == 0 ? defaultValue : entryPtr->
getVESInputTag();
1476 std::vector<ESInputTag>
1477 ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
std::string const&
name)
const {
1478 return getEntryPointerOrThrow_(
name)->getVESInputTag();
1487 Entry const* entryPtr = retrieveUntracked(
name);
1488 return entryPtr == 0 ? defaultValue : entryPtr->
getEventID();
1494 return getEntryPointerOrThrow_(
name)->getEventID();
1498 std::vector<EventID>
1500 std::vector<EventID>
const& defaultValue)
const {
1501 Entry const* entryPtr = retrieveUntracked(
name);
1502 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventID();
1506 std::vector<EventID>
1507 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const {
1508 return getEntryPointerOrThrow_(
name)->getVEventID();
1517 Entry const* entryPtr = retrieveUntracked(
name);
1524 return getEntryPointerOrThrow_(
name)->getLuminosityBlockID();
1528 std::vector<LuminosityBlockID>
1529 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name,
1530 std::vector<LuminosityBlockID>
const& defaultValue)
const {
1531 Entry const* entryPtr = retrieveUntracked(
name);
1536 std::vector<LuminosityBlockID>
1537 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const {
1538 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockID();
1547 Entry const* entryPtr = retrieveUntracked(
name);
1548 return entryPtr == 0 ? defaultValue : entryPtr->
getEventRange();
1554 return getEntryPointerOrThrow_(
name)->getEventRange();
1558 std::vector<EventRange>
1560 std::vector<EventRange>
const& defaultValue)
const {
1561 Entry const* entryPtr = retrieveUntracked(
name);
1562 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventRange();
1566 std::vector<EventRange>
1567 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const {
1568 return getEntryPointerOrThrow_(
name)->getVEventRange();
1577 Entry const* entryPtr = retrieveUntracked(
name);
1583 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
std::string const&
name)
const {
1584 return getEntryPointerOrThrow_(
name)->getLuminosityBlockRange();
1588 std::vector<LuminosityBlockRange>
1589 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name,
1590 std::vector<LuminosityBlockRange>
const& defaultValue)
const {
1591 Entry const* entryPtr = retrieveUntracked(
name);
1596 std::vector<LuminosityBlockRange>
1597 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const {
1598 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockRange();
1607 ParameterSet::getParameter<bool>(
char const*
name)
const {
1608 return retrieve(
name).getBool();
1616 ParameterSet::getParameter<int>(
char const*
name)
const {
1617 return retrieve(
name).getInt32();
1622 ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const {
1623 return retrieve(
name).getVInt32();
1631 ParameterSet::getParameter<long long>(
char const*
name)
const {
1632 return retrieve(
name).getInt64();
1636 std::vector<long long>
1637 ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const {
1638 return retrieve(
name).getVInt64();
1646 ParameterSet::getParameter<unsigned int>(
char const*
name)
const {
1647 return retrieve(
name).getUInt32();
1651 std::vector<unsigned int>
1652 ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const {
1653 return retrieve(
name).getVUInt32();
1661 ParameterSet::getParameter<unsigned long long>(
char const*
name)
const {
1662 return retrieve(
name).getUInt64();
1666 std::vector<unsigned long long>
1667 ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const {
1668 return retrieve(
name).getVUInt64();
1676 ParameterSet::getParameter<double>(
char const*
name)
const {
1677 return retrieve(
name).getDouble();
1682 ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const {
1683 return retrieve(
name).getVDouble();
1691 ParameterSet::getParameter<std::string>(
char const*
name)
const {
1692 return retrieve(
name).getString();
1696 std::vector<std::string>
1697 ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const {
1698 return retrieve(
name).getVString();
1706 ParameterSet::getParameter<FileInPath>(
char const*
name)
const {
1707 return retrieve(
name).getFileInPath();
1715 ParameterSet::getParameter<InputTag>(
char const*
name)
const {
1722 deprecatedInputTagWarning(
name, label);
1726 <<
name <<
" is expected to be InputTag or string (deprecated)";
1733 std::vector<InputTag>
1734 ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const {
1735 return retrieve(
name).getVInputTag();
1743 ParameterSet::getParameter<ESInputTag>(
char const*
name)
const {
1744 return retrieve(
name).getESInputTag();
1751 std::vector<ESInputTag>
1752 ParameterSet::getParameter<std::vector<ESInputTag> >(
char const*
name)
const {
1753 return retrieve(
name).getVESInputTag();
1762 ParameterSet::getParameter<EventID>(
char const*
name)
const {
1763 return retrieve(
name).getEventID();
1770 std::vector<EventID>
1771 ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const {
1772 return retrieve(
name).getVEventID();
1780 ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const {
1781 return retrieve(
name).getLuminosityBlockID();
1788 std::vector<LuminosityBlockID>
1789 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const {
1790 return retrieve(
name).getVLuminosityBlockID();
1798 ParameterSet::getParameter<EventRange>(
char const*
name)
const {
1799 return retrieve(
name).getEventRange();
1806 std::vector<EventRange>
1807 ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const {
1808 return retrieve(
name).getVEventRange();
1816 ParameterSet::getParameter<LuminosityBlockRange>(
char const*
name)
const {
1817 return retrieve(
name).getLuminosityBlockRange();
1824 std::vector<LuminosityBlockRange>
1825 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const {
1826 return retrieve(
name).getVLuminosityBlockRange();
1834 ParameterSet::getParameter<ParameterSet>(
char const*
name)
const {
1840 ParameterSet::getParameter<VParameterSet>(
char const*
name)
const {
1841 return getParameterSetVector(
name);
1851 ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const {
1852 Entry const* entryPtr = retrieveUntracked(
name);
1853 return entryPtr == 0 ? defaultValue : entryPtr->
getBool();
1858 ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const {
1859 return getEntryPointerOrThrow_(
name)->getBool();
1867 ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const {
1868 Entry const* entryPtr = retrieveUntracked(
name);
1869 return entryPtr == 0 ? defaultValue : entryPtr->
getInt32();
1874 ParameterSet::getUntrackedParameter<int>(
char const*
name)
const {
1875 return getEntryPointerOrThrow_(
name)->getInt32();
1880 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name, std::vector<int>
const& defaultValue)
const {
1881 Entry const* entryPtr = retrieveUntracked(
name);
1882 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt32();
1887 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const {
1888 return getEntryPointerOrThrow_(
name)->getVInt32();
1896 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
unsigned int const& defaultValue)
const {
1897 Entry const* entryPtr = retrieveUntracked(
name);
1898 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt32();
1903 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const {
1904 return getEntryPointerOrThrow_(
name)->getUInt32();
1908 std::vector<unsigned int>
1909 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name, std::vector<unsigned int>
const& defaultValue)
const {
1910 Entry const* entryPtr = retrieveUntracked(
name);
1911 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt32();
1915 std::vector<unsigned int>
1916 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const {
1917 return getEntryPointerOrThrow_(
name)->getVUInt32();
1925 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name,
unsigned long long const& defaultValue)
const {
1926 Entry const* entryPtr = retrieveUntracked(
name);
1927 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt64();
1932 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const {
1933 return getEntryPointerOrThrow_(
name)->getUInt64();
1937 std::vector<unsigned long long>
1938 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name, std::vector<unsigned long long>
const& defaultValue)
const {
1939 Entry const* entryPtr = retrieveUntracked(
name);
1940 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt64();
1944 std::vector<unsigned long long>
1945 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name)
const {
1946 return getEntryPointerOrThrow_(
name)->getVUInt64();
1954 ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const {
1955 Entry const* entryPtr = retrieveUntracked(
name);
1956 return entryPtr == 0 ? defaultValue : entryPtr->
getInt64();
1961 ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const {
1962 return getEntryPointerOrThrow_(
name)->getInt64();
1966 std::vector<long long>
1967 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name, std::vector<long long>
const& defaultValue)
const {
1968 Entry const* entryPtr = retrieveUntracked(
name);
1969 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt64();
1973 std::vector<long long>
1974 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const {
1975 return getEntryPointerOrThrow_(
name)->getVInt64();
1983 ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const {
1984 Entry const* entryPtr = retrieveUntracked(
name);
1985 return entryPtr == 0 ? defaultValue : entryPtr->
getDouble();
1990 ParameterSet::getUntrackedParameter<double>(
char const*
name)
const {
1991 return getEntryPointerOrThrow_(
name)->getDouble();
1996 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name, std::vector<double>
const& defaultValue)
const {
1997 Entry const* entryPtr = retrieveUntracked(
name);
return entryPtr == 0 ? defaultValue : entryPtr->
getVDouble();
2002 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const {
2003 return getEntryPointerOrThrow_(
name)->getVDouble();
2011 ParameterSet::getUntrackedParameter<std::string>(
char const*
name,
std::string const& defaultValue)
const {
2012 Entry const* entryPtr = retrieveUntracked(
name);
2013 return entryPtr == 0 ? defaultValue : entryPtr->
getString();
2018 ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const {
2019 return getEntryPointerOrThrow_(
name)->getString();
2023 std::vector<std::string>
2024 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name, std::vector<std::string>
const& defaultValue)
const {
2025 Entry const* entryPtr = retrieveUntracked(
name);
2026 return entryPtr == 0 ? defaultValue : entryPtr->
getVString();
2030 std::vector<std::string>
2031 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const {
2032 return getEntryPointerOrThrow_(
name)->getVString();
2040 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name,
FileInPath const& defaultValue)
const {
2041 Entry const* entryPtr = retrieveUntracked(
name);
2042 return entryPtr == 0 ? defaultValue : entryPtr->
getFileInPath();
2047 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const {
2048 return getEntryPointerOrThrow_(
name)->getFileInPath();
2056 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name,
InputTag const& defaultValue)
const {
2057 Entry const* entryPtr = retrieveUntracked(
name);
2058 return entryPtr == 0 ? defaultValue : entryPtr->
getInputTag();
2063 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const {
2064 return getEntryPointerOrThrow_(
name)->getInputTag();
2068 std::vector<InputTag>
2069 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name,
2070 std::vector<InputTag>
const& defaultValue)
const {
2071 Entry const* entryPtr = retrieveUntracked(
name);
2072 return entryPtr == 0 ? defaultValue : entryPtr->
getVInputTag();
2076 std::vector<InputTag>
2077 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const {
2078 return getEntryPointerOrThrow_(
name)->getVInputTag();
2086 ParameterSet::getUntrackedParameter<ESInputTag>(
char const*
name,
ESInputTag const& defaultValue)
const {
2087 Entry const* entryPtr = retrieveUntracked(
name);
2088 return entryPtr == 0 ? defaultValue : entryPtr->
getESInputTag();
2093 ParameterSet::getUntrackedParameter<ESInputTag>(
char const*
name)
const {
2094 return getEntryPointerOrThrow_(
name)->getESInputTag();
2098 std::vector<ESInputTag>
2099 ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
char const*
name,
2100 std::vector<ESInputTag>
const& defaultValue)
const {
2101 Entry const* entryPtr = retrieveUntracked(
name);
2102 return entryPtr == 0 ? defaultValue : entryPtr->
getVESInputTag();
2106 std::vector<ESInputTag>
2107 ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
char const*
name)
const {
2108 return getEntryPointerOrThrow_(
name)->getVESInputTag();
2116 ParameterSet::getUntrackedParameter<EventID>(
char const*
name,
EventID const& defaultValue)
const {
2117 Entry const* entryPtr = retrieveUntracked(
name);
2118 return entryPtr == 0 ? defaultValue : entryPtr->
getEventID();
2123 ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const {
2124 return getEntryPointerOrThrow_(
name)->getEventID();
2128 std::vector<EventID>
2129 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name,
2130 std::vector<EventID>
const& defaultValue)
const {
2131 Entry const* entryPtr = retrieveUntracked(
name);
2132 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventID();
2136 std::vector<EventID>
2137 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const {
2138 return getEntryPointerOrThrow_(
name)->getVEventID();
2147 Entry const* entryPtr = retrieveUntracked(
name);
2153 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const {
2154 return getEntryPointerOrThrow_(
name)->getLuminosityBlockID();
2158 std::vector<LuminosityBlockID>
2159 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name,
2160 std::vector<LuminosityBlockID>
const& defaultValue)
const {
2161 Entry const* entryPtr = retrieveUntracked(
name);
2166 std::vector<LuminosityBlockID>
2167 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const {
2168 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockID();
2176 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name,
EventRange const& defaultValue)
const {
2177 Entry const* entryPtr = retrieveUntracked(
name);
2178 return entryPtr == 0 ? defaultValue : entryPtr->
getEventRange();
2183 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const {
2184 return getEntryPointerOrThrow_(
name)->getEventRange();
2188 std::vector<EventRange>
2189 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name,
2190 std::vector<EventRange>
const& defaultValue)
const {
2191 Entry const* entryPtr = retrieveUntracked(
name);
2192 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventRange();
2196 std::vector<EventRange>
2197 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const {
2198 return getEntryPointerOrThrow_(
name)->getVEventRange();
2207 Entry const* entryPtr = retrieveUntracked(
name);
2213 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name)
const {
2214 return getEntryPointerOrThrow_(
name)->getLuminosityBlockRange();
2218 std::vector<LuminosityBlockRange>
2219 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name,
2220 std::vector<LuminosityBlockRange>
const& defaultValue)
const {
2221 Entry const* entryPtr = retrieveUntracked(
name);
2226 std::vector<LuminosityBlockRange>
2227 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const {
2228 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockRange();
2236 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
ParameterSet const& defaultValue)
const {
2237 return getUntrackedParameterSet(
name, defaultValue);
2242 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name,
VParameterSet const& defaultValue)
const {
2243 return getUntrackedParameterSetVector(
name, defaultValue);
2249 return getUntrackedParameterSet(
name, defaultValue);
2255 return getUntrackedParameterSetVector(
name, defaultValue);
2260 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const {
2261 return getUntrackedParameterSet(
name);
2266 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const {
2267 return getUntrackedParameterSetVector(
name);
2273 return getUntrackedParameterSet(
name);
2279 return getUntrackedParameterSetVector(
name);
2288 invalidateRegistration(
name);
2295 invalidateRegistration(
name);
2302 invalidateRegistration(
name);
2309 invalidateRegistration(
name);
2341 std::vector<std::string>
2342 ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const {
2343 std::vector<std::string>
output;
2344 getParameterSetNames(output, trackiness);
2349 std::vector<std::string>
2350 ParameterSet::getParameterNamesForType<VParameterSet>(
bool trackiness)
const {
2351 std::vector<std::string>
output;
2352 getParameterSetVectorNames(output, trackiness);
2375 return defaultValue;
2377 return entryPtr->
pset();
2390 <<
"The required ParameterSet '" << name <<
"' was not specified.\n";
2391 return result->
pset();
2412 return entryPtr == 0 ? defaultValue : entryPtr->
vpset();
2425 <<
"The required ParameterSetVector '" << name <<
"' was not specified.\n";
2426 return result->
vpset();
std::vector< unsigned > getVUInt32() const
void setID(ParameterSetID const &id)
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
tuple start
Check for commandline option errors.
std::vector< unsigned long long > getVUInt64() const
std::vector< LuminosityBlockID > getVLuminosityBlockID() const
std::auto_ptr< std::vector< ParameterSet > > popVParameterSet(std::string const &name)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
ParameterSet getPSet() const
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 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
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
void insertVParameterSet(bool okay_to_replace, std::string const &name, VParameterSetEntry const &entry)
InputTag getInputTag() const
std::auto_ptr< ParameterSet > popParameterSet(std::string const &name)
std::vector< ParameterSet > const & vpset() const
returns the VPSet
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
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::auto_ptr< ParameterDescriptionNode > operator&&(ParameterDescriptionNode const &node_left, ParameterDescriptionNode const &node_right)
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
ParameterSet & operator=(ParameterSet const &other)
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
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
bool insertMapped(value_type const &v)
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