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"
97 psetTable_(other.psetTable_),
98 vpsetTable_(other.vpsetTable_),
131 psettable::iterator it =
psetTable_.find(name);
141 table::iterator it =
tbl_.find(name);
142 assert(it !=
tbl_.end());
148 psettable::iterator it =
psetTable_.find(name);
151 if (pset.isRegistered()) {
152 it->second.setIsTracked(
false);
162 std::auto_ptr<std::vector<ParameterSet> > vpset(
new std::vector<ParameterSet>);
171 if(!
i->second.pset().isRegistered()) {
172 i->second.pset().registerIt();
174 i->second.updateID();
179 i->second.registerPsetsAndUpdateIDs();
201 <<
"ParameterSet::id() called prematurely\n"
202 <<
"before ParameterSet::registerIt() has been called.\n";
225 <<
"The required parameter '" << name
226 <<
"' was not specified.\n";
230 template<
typename T,
typename U>
T first(std::pair<T, U>
const&
p) {
234 template<
typename T,
typename U> U
second(std::pair<T, U>
const&
p) {
245 table::const_iterator it =
tbl_.find(name);
246 if(it ==
tbl_.end()) {
248 <<
"Parameter '" << name
251 if(it->second.isTracked() ==
false) {
254 <<
"Framework Error: Parameter '" << name
255 <<
"' is incorrectly designated as tracked in the framework.";
258 <<
"Parameter '" << name
259 <<
"' is designated as tracked in the code,\n"
260 <<
"but is designated as untracked in the configuration file.\n"
261 <<
"Please remove 'untracked' from the configuration file for parameter '"<< name <<
"'.";
274 table::const_iterator it =
tbl_.find(name);
276 if(it ==
tbl_.end())
return 0;
277 if(it->second.isTracked()) {
280 <<
"Framework Error: Parameter '" << name
281 <<
"' is incorrectly designated as untracked in the framework.";
284 <<
"Parameter '" << name
285 <<
"' is designated as untracked in the code,\n"
286 <<
"but is not designated as untracked in the configuration file.\n"
287 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
295 psettable::const_iterator it =
psetTable_.find(name);
298 <<
"ParameterSet '" << name
301 if(it->second.isTracked() ==
false) {
304 <<
"Framework Error: ParameterSet '" << name
305 <<
"' is incorrectly designated as tracked in the framework.";
308 <<
"ParameterSet '" << name
309 <<
"' is designated as tracked in the code,\n"
310 <<
"but is designated as untracked in the configuration file.\n"
311 <<
"Please remove 'untracked' from the configuration file for parameter '"<< name <<
"'.";
319 psettable::const_iterator it =
psetTable_.find(name);
322 if(it->second.isTracked()) {
325 <<
"Framework Error: ParameterSet '" << name
326 <<
"' is incorrectly designated as untracked in the framework.";
329 <<
"ParameterSet '" << name
330 <<
"' is designated as untracked in the code,\n"
331 <<
"but is not designated as untracked in the configuration file.\n"
332 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
340 vpsettable::const_iterator it =
vpsetTable_.find(name);
343 <<
"VParameterSet '" << name
346 if(it->second.isTracked() ==
false) {
348 <<
"VParameterSet '" << name
349 <<
"' is designated as tracked in the code,\n"
350 <<
"but is designated as untracked in the configuration file.\n"
351 <<
"Please remove 'untracked' from the configuration file for parameter '"<< name <<
"'.";
358 vpsettable::const_iterator it =
vpsetTable_.find(name);
361 if(it->second.isTracked()) {
363 <<
"VParameterSet '" << name
364 <<
"' is designated as untracked in the code,\n"
365 <<
"but is not designated as untracked in the configuration file.\n"
366 <<
"Please change the configuration file to 'untracked <type> " << name <<
"'.";
378 table::const_iterator it =
tbl_.find(name);
379 if(it ==
tbl_.end()) {
387 psettable::const_iterator it =
psetTable_.find(name);
396 vpsettable::const_iterator it =
vpsetTable_.find(name);
408 if(existsAs<ParameterSet>(name)) {
411 else if(
existsAs<std::vector<ParameterSet> >(name)) {
419 <<
"Cannot find parameter " << name <<
" in " << *
this;
435 table::iterator it =
tbl_.find(name);
437 if(it ==
tbl_.end()) {
438 if(!
tbl_.insert(std::make_pair(name, value)).second)
440 <<
"cannot insert " << name
441 <<
" into a ParameterSet\n";
443 else if(okay_to_replace) {
451 psettable::iterator it =
psetTable_.find(name);
454 if(!
psetTable_.insert(std::make_pair(name, entry)).second)
456 <<
"cannot insert " << name
457 <<
" into a ParameterSet\n";
458 }
else if(okay_to_replace) {
469 if(!
vpsetTable_.insert(std::make_pair(name, entry)).second)
471 <<
"cannot insert " << name
472 <<
" into a VParameterSet\n";
473 }
else if(okay_to_replace) {
486 for(table::const_iterator
b = from.
tbl_.begin(),
e = from.
tbl_.end();
b !=
e; ++
b) {
487 this->
insert(
false,
b->first,
b->second);
502 else if(from.
existsAs<std::vector<ParameterSet> >(name)) {
505 else if(from.
exists(name)) {
510 <<
"Cannot find parameter " << name <<
" in " << from;
518 psettable::iterator it =
psetTable_.find(name);
520 isTracked = it->second.isTracked();
521 return &it->second.pset();
554 for(table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
555 if(useAll ||
b->second.isTracked()) {
557 size +=
b->first.size();
558 size +=
b->second.sizeOfString();
562 if(useAll ||
b->second.isTracked()) {
564 size +=
b->first.size();
565 size +=
b->first.size();
566 size +=
b->first.size();
571 if(useAll ||
b->second.isTracked()) {
573 size +=
b->first.size();
578 rep.reserve(rep.size()+
size);
582 for(table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
583 if(useAll ||
b->second.isTracked()) {
587 b->second.toString(rep);
592 if(useAll ||
b->second.isTracked()) {
596 b->second.toString(rep);
601 if(useAll ||
b->second.isTracked()) {
605 b->second.toString(rep);
616 bool started =
false;
617 for(table::const_iterator
b =
tbl_.begin(),
e =
tbl_.end();
b !=
e; ++
b) {
618 if(
b->second.isTracked()) {
623 b->second.toDigest(digest);
628 if(
b->second.isTracked()) {
633 b->second.toDigest(digest);
638 if(
b->second.isTracked()) {
643 b->second.toDigest(digest);
661 std::vector<std::string>
temp;
662 if(!
split(std::back_inserter(temp), from,
'<',
';',
'>'))
666 for(std::vector<std::string>::const_iterator
b = temp.begin(),
e = temp.end();
b !=
e; ++
b) {
683 if(!
psetTable_.insert(std::make_pair(name, psetEntry)).second) {
686 }
else if(
rep[1] ==
'q') {
688 if(!
vpsetTable_.insert(std::make_pair(name, vpsetEntry)).second) {
691 }
else if(
rep[1] ==
'P') {
694 if(!
psetTable_.insert(std::make_pair(name, psetEntry)).second) {
697 }
else if(
rep[1] ==
'p') {
700 if(!
vpsetTable_.insert(std::make_pair(name, vpsetEntry)).second) {
706 if(!
tbl_.insert(std::make_pair(name, value)).second) {
718 table::const_iterator it =
tbl_.begin();
719 table::const_iterator
end =
tbl_.end();
721 Entry const&
e = it->second;
731 std::vector<std::string>
733 std::vector<std::string> returnValue;
744 return(
tbl_.find(parameterName) !=
tbl_.end() ||
752 for(table::const_iterator tblItr =
tbl_.begin(); tblItr !=
tbl_.end(); ++tblItr) {
753 if(tblItr->second.isTracked()) {
754 result.
tbl_.insert(*tblItr);
757 for(psettable::const_iterator psetItr =
psetTable_.begin(); psetItr !=
psetTable_.end(); ++psetItr) {
758 if(psetItr->second.isTracked()) {
762 for(vpsettable::const_iterator vpsetItr =
vpsetTable_.begin(); vpsetItr !=
vpsetTable_.end(); ++vpsetItr) {
763 if(vpsetItr->second.isTracked()) {
765 std::vector<ParameterSet>
const& this_vpset = vpsetItr->second.vpset();
767 typedef std::vector<ParameterSet>::const_iterator Iter;
768 for (Iter
i = this_vpset.begin(),
e = this_vpset.end();
i !=
e; ++
i) {
769 vresult.push_back(
i->trackedPart());
781 return output.size();
786 bool trackiness)
const {
787 for(psettable::const_iterator psetItr =
psetTable_.begin();
789 if(psetItr->second.isTracked() == trackiness) {
790 output.push_back(psetItr->first);
793 return output.size();
798 bool trackiness)
const {
799 for(vpsettable::const_iterator vpsetItr =
vpsetTable_.begin();
801 if(vpsetItr->second.isTracked() == trackiness) {
802 output.push_back(vpsetItr->first);
805 return output.size();
811 std::vector<std::string>&
output)
const {
819 table::const_iterator it =
tbl_.begin();
820 table::const_iterator
end =
tbl_.end();
822 Entry const&
e = it->second;
826 output.push_back(it->first);
834 std::vector<std::string> ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const {
835 std::vector<std::string>
result;
836 getNamesByCode_(
'F', trackiness, result);
842 return (a.
id() == b.
id());
848 if(a.
tbl().size() != b.
tbl().size()) {
857 typedef ParameterSet::table::const_iterator Ti;
858 for (Ti
i = a.
tbl().begin(),
e = a.
tbl().end(),
859 j = b.
tbl().begin(),
f = b.
tbl().end();
860 i !=
e &&
j !=
f; ++
i, ++
j) {
865 typedef ParameterSet::psettable::const_iterator
Pi;
868 i !=
e &&
j !=
f; ++
i, ++
j) {
869 if(
i->first !=
j->first) {
872 if(
i->second.isTracked() !=
j->second.isTracked()) {
879 typedef ParameterSet::vpsettable::const_iterator PVi;
882 i !=
e &&
j !=
f; ++
i, ++
j) {
883 if(
i->first !=
j->first) {
886 if(
i->second.isTracked() !=
j->second.isTracked()) {
889 std::vector<ParameterSet>
const& iv =
i->second.vpset();
890 std::vector<ParameterSet>
const& jv =
j->second.vpset();
891 if(iv.size() != jv.size()) {
894 for (
size_t k = 0;
k < iv.size(); ++
k) {
904 std::ostringstream os;
907 os <<
"{" << std::endl;
908 for(table::const_iterator
i =
tbl_.begin(),
e =
tbl_.end();
i !=
e; ++
i) {
909 os << indentation <<
" " <<
i->first <<
": " <<
i->second << std::endl;
915 os << indentation <<
" " << n <<
": " << pe.
dump(indent + 2) << std::endl;
921 os << indentation <<
" " << n <<
": " << pe.
dump(indent + 2) << std::endl;
923 os << indentation <<
"}";
938 <<
"Parameter Set ID '" <<
id <<
"' not found.";
945 LogWarning(
"Configuration") <<
"Warning:\n\tstring " << name
947 <<
"\"\nis deprecated, "
948 <<
"please update your config file to use\n\tInputTag "
949 << name <<
" = " <<
label;
959 return retrieve(
name).getBool();
968 return retrieve(
name).getInt32();
974 return retrieve(
name).getVInt32();
983 return retrieve(
name).getInt64();
987 std::vector<long long>
989 return retrieve(
name).getVInt64();
998 return retrieve(
name).getUInt32();
1002 std::vector<unsigned int>
1004 return retrieve(
name).getVUInt32();
1013 return retrieve(
name).getUInt64();
1017 std::vector<unsigned long long>
1018 ParameterSet::getParameter<std::vector<unsigned long long> >(
std::string const&
name)
const {
1019 return retrieve(
name).getVUInt64();
1028 return retrieve(
name).getDouble();
1034 return retrieve(
name).getVDouble();
1043 return retrieve(
name).getString();
1047 std::vector<std::string>
1049 return retrieve(
name).getVString();
1058 return retrieve(
name).getFileInPath();
1073 deprecatedInputTagWarning(
name, label);
1077 <<
name <<
" is expected to be InputTag or string (deprecated)";
1085 std::vector<InputTag>
1087 return retrieve(
name).getVInputTag();
1096 return retrieve(
name).getESInputTag();
1103 std::vector<ESInputTag>
1105 return retrieve(
name).getVESInputTag();
1114 return retrieve(
name).getEventID();
1121 std::vector<EventID>
1123 return retrieve(
name).getVEventID();
1132 return retrieve(
name).getLuminosityBlockID();
1139 std::vector<LuminosityBlockID>
1140 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const {
1141 return retrieve(
name).getVLuminosityBlockID();
1150 return retrieve(
name).getEventRange();
1157 std::vector<EventRange>
1159 return retrieve(
name).getVEventRange();
1168 return retrieve(
name).getLuminosityBlockRange();
1175 std::vector<LuminosityBlockRange>
1176 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const {
1177 return retrieve(
name).getVLuminosityBlockRange();
1192 return getParameterSetVector(
name);
1202 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const {
1203 Entry const* entryPtr = retrieveUntracked(
name);
1204 return entryPtr == 0 ? defaultValue : entryPtr->
getBool();
1210 return getEntryPointerOrThrow_(
name)->getBool();
1218 ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const {
1219 Entry const* entryPtr = retrieveUntracked(
name);
1220 return entryPtr == 0 ? defaultValue : entryPtr->
getInt32();
1226 return getEntryPointerOrThrow_(
name)->getInt32();
1231 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name, std::vector<int>
const& defaultValue)
const {
1232 Entry const* entryPtr = retrieveUntracked(
name);
1233 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt32();
1239 return getEntryPointerOrThrow_(
name)->getVInt32();
1247 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
unsigned int const& defaultValue)
const {
1248 Entry const* entryPtr = retrieveUntracked(
name);
1249 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt32();
1255 return getEntryPointerOrThrow_(
name)->getUInt32();
1259 std::vector<unsigned int>
1260 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const {
1261 Entry const* entryPtr = retrieveUntracked(
name);
1262 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt32();
1266 std::vector<unsigned int>
1267 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name)
const {
1268 return getEntryPointerOrThrow_(
name)->getVUInt32();
1276 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name,
unsigned long long const& defaultValue)
const {
1277 Entry const* entryPtr = retrieveUntracked(
name);
1278 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt64();
1284 return getEntryPointerOrThrow_(
name)->getUInt64();
1288 std::vector<unsigned long long>
1289 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const {
1290 Entry const* entryPtr = retrieveUntracked(
name);
1291 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt64();
1295 std::vector<unsigned long long>
1296 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name)
const {
1297 return getEntryPointerOrThrow_(
name)->getVUInt64();
1305 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
long long const& defaultValue)
const {
1306 Entry const* entryPtr = retrieveUntracked(
name);
1307 return entryPtr == 0 ? defaultValue : entryPtr->
getInt64();
1313 return getEntryPointerOrThrow_(
name)->getInt64();
1317 std::vector<long long>
1318 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name, std::vector<long long>
const& defaultValue)
const {
1319 Entry const* entryPtr = retrieveUntracked(
name);
1320 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt64();
1324 std::vector<long long>
1325 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const {
1326 return getEntryPointerOrThrow_(
name)->getVInt64();
1334 ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const {
1335 Entry const* entryPtr = retrieveUntracked(
name);
1336 return entryPtr == 0 ? defaultValue : entryPtr->
getDouble();
1342 return getEntryPointerOrThrow_(
name)->getDouble();
1347 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name, std::vector<double>
const& defaultValue)
const {
1348 Entry const* entryPtr = retrieveUntracked(
name);
return entryPtr == 0 ? defaultValue : entryPtr->
getVDouble();
1353 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const {
1354 return getEntryPointerOrThrow_(
name)->getVDouble();
1363 Entry const* entryPtr = retrieveUntracked(
name);
1364 return entryPtr == 0 ? defaultValue : entryPtr->
getString();
1370 return getEntryPointerOrThrow_(
name)->getString();
1374 std::vector<std::string>
1375 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name, std::vector<std::string>
const& defaultValue)
const {
1376 Entry const* entryPtr = retrieveUntracked(
name);
1377 return entryPtr == 0 ? defaultValue : entryPtr->
getVString();
1381 std::vector<std::string>
1382 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name)
const {
1383 return getEntryPointerOrThrow_(
name)->getVString();
1392 Entry const* entryPtr = retrieveUntracked(
name);
1393 return entryPtr == 0 ? defaultValue : entryPtr->
getFileInPath();
1399 return getEntryPointerOrThrow_(
name)->getFileInPath();
1408 Entry const* entryPtr = retrieveUntracked(
name);
1409 return entryPtr == 0 ? defaultValue : entryPtr->
getInputTag();
1415 return getEntryPointerOrThrow_(
name)->getInputTag();
1419 std::vector<InputTag>
1421 std::vector<InputTag>
const& defaultValue)
const {
1422 Entry const* entryPtr = retrieveUntracked(
name);
1423 return entryPtr == 0 ? defaultValue : entryPtr->
getVInputTag();
1427 std::vector<InputTag>
1428 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const {
1429 return getEntryPointerOrThrow_(
name)->getVInputTag();
1438 Entry const* entryPtr = retrieveUntracked(
name);
1439 return entryPtr == 0 ? defaultValue : entryPtr->
getESInputTag();
1445 return getEntryPointerOrThrow_(
name)->getESInputTag();
1449 std::vector<ESInputTag>
1451 std::vector<ESInputTag>
const& defaultValue)
const {
1452 Entry const* entryPtr = retrieveUntracked(
name);
1453 return entryPtr == 0 ? defaultValue : entryPtr->
getVESInputTag();
1457 std::vector<ESInputTag>
1458 ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
std::string const&
name)
const {
1459 return getEntryPointerOrThrow_(
name)->getVESInputTag();
1468 Entry const* entryPtr = retrieveUntracked(
name);
1469 return entryPtr == 0 ? defaultValue : entryPtr->
getEventID();
1475 return getEntryPointerOrThrow_(
name)->getEventID();
1479 std::vector<EventID>
1481 std::vector<EventID>
const& defaultValue)
const {
1482 Entry const* entryPtr = retrieveUntracked(
name);
1483 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventID();
1487 std::vector<EventID>
1488 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const {
1489 return getEntryPointerOrThrow_(
name)->getVEventID();
1498 Entry const* entryPtr = retrieveUntracked(
name);
1505 return getEntryPointerOrThrow_(
name)->getLuminosityBlockID();
1509 std::vector<LuminosityBlockID>
1510 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name,
1511 std::vector<LuminosityBlockID>
const& defaultValue)
const {
1512 Entry const* entryPtr = retrieveUntracked(
name);
1517 std::vector<LuminosityBlockID>
1518 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const {
1519 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockID();
1528 Entry const* entryPtr = retrieveUntracked(
name);
1529 return entryPtr == 0 ? defaultValue : entryPtr->
getEventRange();
1535 return getEntryPointerOrThrow_(
name)->getEventRange();
1539 std::vector<EventRange>
1541 std::vector<EventRange>
const& defaultValue)
const {
1542 Entry const* entryPtr = retrieveUntracked(
name);
1543 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventRange();
1547 std::vector<EventRange>
1548 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const {
1549 return getEntryPointerOrThrow_(
name)->getVEventRange();
1558 Entry const* entryPtr = retrieveUntracked(
name);
1564 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
std::string const&
name)
const {
1565 return getEntryPointerOrThrow_(
name)->getLuminosityBlockRange();
1569 std::vector<LuminosityBlockRange>
1570 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name,
1571 std::vector<LuminosityBlockRange>
const& defaultValue)
const {
1572 Entry const* entryPtr = retrieveUntracked(
name);
1577 std::vector<LuminosityBlockRange>
1578 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const {
1579 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockRange();
1588 ParameterSet::getParameter<bool>(
char const*
name)
const {
1589 return retrieve(
name).getBool();
1597 ParameterSet::getParameter<int>(
char const*
name)
const {
1598 return retrieve(
name).getInt32();
1603 ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const {
1604 return retrieve(
name).getVInt32();
1612 ParameterSet::getParameter<long long>(
char const*
name)
const {
1613 return retrieve(
name).getInt64();
1617 std::vector<long long>
1618 ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const {
1619 return retrieve(
name).getVInt64();
1627 ParameterSet::getParameter<unsigned int>(
char const*
name)
const {
1628 return retrieve(
name).getUInt32();
1632 std::vector<unsigned int>
1633 ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const {
1634 return retrieve(
name).getVUInt32();
1642 ParameterSet::getParameter<unsigned long long>(
char const*
name)
const {
1643 return retrieve(
name).getUInt64();
1647 std::vector<unsigned long long>
1648 ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const {
1649 return retrieve(
name).getVUInt64();
1657 ParameterSet::getParameter<double>(
char const*
name)
const {
1658 return retrieve(
name).getDouble();
1663 ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const {
1664 return retrieve(
name).getVDouble();
1672 ParameterSet::getParameter<std::string>(
char const*
name)
const {
1673 return retrieve(
name).getString();
1677 std::vector<std::string>
1678 ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const {
1679 return retrieve(
name).getVString();
1687 ParameterSet::getParameter<FileInPath>(
char const*
name)
const {
1688 return retrieve(
name).getFileInPath();
1696 ParameterSet::getParameter<InputTag>(
char const*
name)
const {
1703 deprecatedInputTagWarning(
name, label);
1707 <<
name <<
" is expected to be InputTag or string (deprecated)";
1714 std::vector<InputTag>
1715 ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const {
1716 return retrieve(
name).getVInputTag();
1724 ParameterSet::getParameter<ESInputTag>(
char const*
name)
const {
1725 return retrieve(
name).getESInputTag();
1732 std::vector<ESInputTag>
1733 ParameterSet::getParameter<std::vector<ESInputTag> >(
char const*
name)
const {
1734 return retrieve(
name).getVESInputTag();
1743 ParameterSet::getParameter<EventID>(
char const*
name)
const {
1744 return retrieve(
name).getEventID();
1751 std::vector<EventID>
1752 ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const {
1753 return retrieve(
name).getVEventID();
1761 ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const {
1762 return retrieve(
name).getLuminosityBlockID();
1769 std::vector<LuminosityBlockID>
1770 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const {
1771 return retrieve(
name).getVLuminosityBlockID();
1779 ParameterSet::getParameter<EventRange>(
char const*
name)
const {
1780 return retrieve(
name).getEventRange();
1787 std::vector<EventRange>
1788 ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const {
1789 return retrieve(
name).getVEventRange();
1797 ParameterSet::getParameter<LuminosityBlockRange>(
char const*
name)
const {
1798 return retrieve(
name).getLuminosityBlockRange();
1805 std::vector<LuminosityBlockRange>
1806 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const {
1807 return retrieve(
name).getVLuminosityBlockRange();
1815 ParameterSet::getParameter<ParameterSet>(
char const*
name)
const {
1821 ParameterSet::getParameter<VParameterSet>(
char const*
name)
const {
1822 return getParameterSetVector(
name);
1832 ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const {
1833 Entry const* entryPtr = retrieveUntracked(
name);
1834 return entryPtr == 0 ? defaultValue : entryPtr->
getBool();
1839 ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const {
1840 return getEntryPointerOrThrow_(
name)->getBool();
1848 ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const {
1849 Entry const* entryPtr = retrieveUntracked(
name);
1850 return entryPtr == 0 ? defaultValue : entryPtr->
getInt32();
1855 ParameterSet::getUntrackedParameter<int>(
char const*
name)
const {
1856 return getEntryPointerOrThrow_(
name)->getInt32();
1861 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name, std::vector<int>
const& defaultValue)
const {
1862 Entry const* entryPtr = retrieveUntracked(
name);
1863 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt32();
1868 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const {
1869 return getEntryPointerOrThrow_(
name)->getVInt32();
1877 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
unsigned int const& defaultValue)
const {
1878 Entry const* entryPtr = retrieveUntracked(
name);
1879 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt32();
1884 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const {
1885 return getEntryPointerOrThrow_(
name)->getUInt32();
1889 std::vector<unsigned int>
1890 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name, std::vector<unsigned int>
const& defaultValue)
const {
1891 Entry const* entryPtr = retrieveUntracked(
name);
1892 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt32();
1896 std::vector<unsigned int>
1897 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const {
1898 return getEntryPointerOrThrow_(
name)->getVUInt32();
1906 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name,
unsigned long long const& defaultValue)
const {
1907 Entry const* entryPtr = retrieveUntracked(
name);
1908 return entryPtr == 0 ? defaultValue : entryPtr->
getUInt64();
1913 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const {
1914 return getEntryPointerOrThrow_(
name)->getUInt64();
1918 std::vector<unsigned long long>
1919 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name, std::vector<unsigned long long>
const& defaultValue)
const {
1920 Entry const* entryPtr = retrieveUntracked(
name);
1921 return entryPtr == 0 ? defaultValue : entryPtr->
getVUInt64();
1925 std::vector<unsigned long long>
1926 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name)
const {
1927 return getEntryPointerOrThrow_(
name)->getVUInt64();
1935 ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const {
1936 Entry const* entryPtr = retrieveUntracked(
name);
1937 return entryPtr == 0 ? defaultValue : entryPtr->
getInt64();
1942 ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const {
1943 return getEntryPointerOrThrow_(
name)->getInt64();
1947 std::vector<long long>
1948 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name, std::vector<long long>
const& defaultValue)
const {
1949 Entry const* entryPtr = retrieveUntracked(
name);
1950 return entryPtr == 0 ? defaultValue : entryPtr->
getVInt64();
1954 std::vector<long long>
1955 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const {
1956 return getEntryPointerOrThrow_(
name)->getVInt64();
1964 ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const {
1965 Entry const* entryPtr = retrieveUntracked(
name);
1966 return entryPtr == 0 ? defaultValue : entryPtr->
getDouble();
1971 ParameterSet::getUntrackedParameter<double>(
char const*
name)
const {
1972 return getEntryPointerOrThrow_(
name)->getDouble();
1977 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name, std::vector<double>
const& defaultValue)
const {
1978 Entry const* entryPtr = retrieveUntracked(
name);
return entryPtr == 0 ? defaultValue : entryPtr->
getVDouble();
1983 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const {
1984 return getEntryPointerOrThrow_(
name)->getVDouble();
1992 ParameterSet::getUntrackedParameter<std::string>(
char const*
name,
std::string const& defaultValue)
const {
1993 Entry const* entryPtr = retrieveUntracked(
name);
1994 return entryPtr == 0 ? defaultValue : entryPtr->
getString();
1999 ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const {
2000 return getEntryPointerOrThrow_(
name)->getString();
2004 std::vector<std::string>
2005 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name, std::vector<std::string>
const& defaultValue)
const {
2006 Entry const* entryPtr = retrieveUntracked(
name);
2007 return entryPtr == 0 ? defaultValue : entryPtr->
getVString();
2011 std::vector<std::string>
2012 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const {
2013 return getEntryPointerOrThrow_(
name)->getVString();
2021 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name,
FileInPath const& defaultValue)
const {
2022 Entry const* entryPtr = retrieveUntracked(
name);
2023 return entryPtr == 0 ? defaultValue : entryPtr->
getFileInPath();
2028 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const {
2029 return getEntryPointerOrThrow_(
name)->getFileInPath();
2037 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name,
InputTag const& defaultValue)
const {
2038 Entry const* entryPtr = retrieveUntracked(
name);
2039 return entryPtr == 0 ? defaultValue : entryPtr->
getInputTag();
2044 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const {
2045 return getEntryPointerOrThrow_(
name)->getInputTag();
2049 std::vector<InputTag>
2050 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name,
2051 std::vector<InputTag>
const& defaultValue)
const {
2052 Entry const* entryPtr = retrieveUntracked(
name);
2053 return entryPtr == 0 ? defaultValue : entryPtr->
getVInputTag();
2057 std::vector<InputTag>
2058 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const {
2059 return getEntryPointerOrThrow_(
name)->getVInputTag();
2067 ParameterSet::getUntrackedParameter<ESInputTag>(
char const*
name,
ESInputTag const& defaultValue)
const {
2068 Entry const* entryPtr = retrieveUntracked(
name);
2069 return entryPtr == 0 ? defaultValue : entryPtr->
getESInputTag();
2074 ParameterSet::getUntrackedParameter<ESInputTag>(
char const*
name)
const {
2075 return getEntryPointerOrThrow_(
name)->getESInputTag();
2079 std::vector<ESInputTag>
2080 ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
char const*
name,
2081 std::vector<ESInputTag>
const& defaultValue)
const {
2082 Entry const* entryPtr = retrieveUntracked(
name);
2083 return entryPtr == 0 ? defaultValue : entryPtr->
getVESInputTag();
2087 std::vector<ESInputTag>
2088 ParameterSet::getUntrackedParameter<std::vector<ESInputTag> >(
char const*
name)
const {
2089 return getEntryPointerOrThrow_(
name)->getVESInputTag();
2097 ParameterSet::getUntrackedParameter<EventID>(
char const*
name,
EventID const& defaultValue)
const {
2098 Entry const* entryPtr = retrieveUntracked(
name);
2099 return entryPtr == 0 ? defaultValue : entryPtr->
getEventID();
2104 ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const {
2105 return getEntryPointerOrThrow_(
name)->getEventID();
2109 std::vector<EventID>
2110 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name,
2111 std::vector<EventID>
const& defaultValue)
const {
2112 Entry const* entryPtr = retrieveUntracked(
name);
2113 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventID();
2117 std::vector<EventID>
2118 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const {
2119 return getEntryPointerOrThrow_(
name)->getVEventID();
2128 Entry const* entryPtr = retrieveUntracked(
name);
2134 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const {
2135 return getEntryPointerOrThrow_(
name)->getLuminosityBlockID();
2139 std::vector<LuminosityBlockID>
2140 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name,
2141 std::vector<LuminosityBlockID>
const& defaultValue)
const {
2142 Entry const* entryPtr = retrieveUntracked(
name);
2147 std::vector<LuminosityBlockID>
2148 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const {
2149 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockID();
2157 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name,
EventRange const& defaultValue)
const {
2158 Entry const* entryPtr = retrieveUntracked(
name);
2159 return entryPtr == 0 ? defaultValue : entryPtr->
getEventRange();
2164 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const {
2165 return getEntryPointerOrThrow_(
name)->getEventRange();
2169 std::vector<EventRange>
2170 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name,
2171 std::vector<EventRange>
const& defaultValue)
const {
2172 Entry const* entryPtr = retrieveUntracked(
name);
2173 return entryPtr == 0 ? defaultValue : entryPtr->
getVEventRange();
2177 std::vector<EventRange>
2178 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const {
2179 return getEntryPointerOrThrow_(
name)->getVEventRange();
2188 Entry const* entryPtr = retrieveUntracked(
name);
2194 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name)
const {
2195 return getEntryPointerOrThrow_(
name)->getLuminosityBlockRange();
2199 std::vector<LuminosityBlockRange>
2200 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name,
2201 std::vector<LuminosityBlockRange>
const& defaultValue)
const {
2202 Entry const* entryPtr = retrieveUntracked(
name);
2207 std::vector<LuminosityBlockRange>
2208 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const {
2209 return getEntryPointerOrThrow_(
name)->getVLuminosityBlockRange();
2217 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
ParameterSet const& defaultValue)
const {
2218 return getUntrackedParameterSet(
name, defaultValue);
2223 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name,
VParameterSet const& defaultValue)
const {
2224 return getUntrackedParameterSetVector(
name, defaultValue);
2230 return getUntrackedParameterSet(
name, defaultValue);
2236 return getUntrackedParameterSetVector(
name, defaultValue);
2241 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const {
2242 return getUntrackedParameterSet(
name);
2247 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const {
2248 return getUntrackedParameterSetVector(
name);
2254 return getUntrackedParameterSet(
name);
2260 return getUntrackedParameterSetVector(
name);
2269 invalidateRegistration(
name);
2276 invalidateRegistration(
name);
2283 invalidateRegistration(
name);
2290 invalidateRegistration(
name);
2322 std::vector<std::string>
2323 ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const {
2324 std::vector<std::string>
output;
2325 getParameterSetNames(output, trackiness);
2330 std::vector<std::string>
2331 ParameterSet::getParameterNamesForType<VParameterSet>(
bool trackiness)
const {
2332 std::vector<std::string>
output;
2333 getParameterSetVectorNames(output, trackiness);
2359 return defaultValue;
2361 return entryPtr->
pset();
2374 <<
"The required ParameterSet '" << name <<
"' was not specified.\n";
2375 return result->
pset();
2396 return entryPtr == 0 ? defaultValue : entryPtr->
vpset();
2409 <<
"The required ParameterSetVector '" << name <<
"' was not specified.\n";
2410 return result->
vpset();
std::vector< unsigned > getVUInt32() const
VParameterSet const & getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) 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
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
void invalidateRegistration(std::string const &nameOfTracked) 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
static ThreadSafeRegistry * instance()
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 &)
void swap(Hash< I > &other)
bool insertMapped(value_type const &v)
LuminosityBlockRange getLuminosityBlockRange() const
std::vector< EventID > getVEventID() const
ParameterSet trackedPart() const
void setID(ParameterSetID const &id) 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
void copyFrom(ParameterSet const &from, std::string const &name)
long long getInt64() const
VParameterSetEntry * getPSetVectorForUpdate(std::string const &name)
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::pair< std::string, MonitorElement * > entry
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
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
std::string toString() const
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
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
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
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
void append(std::string const &s)
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)
EventID getEventID() const