1 #ifndef FWCore_ParameterSet_ParameterSet_h
2 #define FWCore_ParameterSet_ParameterSet_h
80 void insert(
bool ok_to_replace,
char const* ,
Entry const&);
81 void insert(
bool ok_to_replace, std::string
const&,
Entry const&);
177 bool exists(std::string
const& parameterName)
const;
181 bool existsAs(std::string
const& parameterName,
bool trackiness=
true)
const {
182 std::vector<std::string>
names = getParameterNamesForType<T>(trackiness);
183 return std::find(names.begin(), names.end(), parameterName) != names.end();
190 std::vector<std::string>
result;
194 Entry type_translator(
"", value, trackiness);
195 char type_code = type_translator.
typeCode();
225 bool trackiness =
true)
const;
233 bool trackiness=
true)
const;
236 std::string
dump()
const;
246 typedef std::map<std::string, Entry>
table;
249 typedef std::map<std::string, ParameterSetEntry>
psettable;
252 typedef std::map<std::string, VParameterSetEntry>
vpsettable;
260 bool isTracked =
false;
295 std::vector<std::string>&
output)
const;
324 ParameterSet::getParameter<bool>(std::string
const&
name)
const;
331 ParameterSet::getParameter<int>(std::string
const&
name)
const;
335 ParameterSet::getParameter<std::vector<int> >(std::string
const&
name)
const;
342 ParameterSet::getParameter<long long>(std::string
const&
name)
const;
345 std::vector<long long>
346 ParameterSet::getParameter<std::vector<long long> >(std::string
const&
name)
const;
353 ParameterSet::getParameter<unsigned int>(std::string
const&
name)
const;
356 std::vector<unsigned int>
357 ParameterSet::getParameter<std::vector<unsigned int> >(std::string
const&
name)
const;
364 ParameterSet::getParameter<unsigned long long>(std::string
const&
name)
const;
367 std::vector<unsigned long long>
368 ParameterSet::getParameter<std::vector<unsigned long long> >(std::string
const&
name)
const;
375 ParameterSet::getParameter<double>(std::string
const&
name)
const;
379 ParameterSet::getParameter<std::vector<double> >(std::string
const&
name)
const;
386 ParameterSet::getParameter<std::string>(std::string
const&
name)
const;
389 std::vector<std::string>
390 ParameterSet::getParameter<std::vector<std::string> >(std::string
const&
name)
const;
397 ParameterSet::getParameter<FileInPath>(std::string
const&
name)
const;
402 std::vector<std::string>
403 ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const;
410 ParameterSet::getParameter<InputTag>(std::string
const&
name)
const;
416 std::vector<InputTag>
417 ParameterSet::getParameter<std::vector<InputTag> >(std::string
const&
name)
const;
424 ParameterSet::getParameter<ESInputTag>(std::string
const&
name)
const;
430 std::vector<ESInputTag>
431 ParameterSet::getParameter<std::vector<ESInputTag> >(std::string
const&
name)
const;
438 ParameterSet::getParameter<EventID>(std::string
const&
name)
const;
445 ParameterSet::getParameter<std::vector<EventID> >(std::string
const&
name)
const;
452 ParameterSet::getParameter<LuminosityBlockID>(std::string
const&
name)
const;
458 std::vector<LuminosityBlockID>
459 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(std::string
const&
name)
const;
466 ParameterSet::getParameter<EventRange>(std::string
const&
name)
const;
472 std::vector<EventRange>
473 ParameterSet::getParameter<std::vector<EventRange> >(std::string
const&
name)
const;
480 ParameterSet::getParameter<LuminosityBlockRange>(std::string
const&
name)
const;
486 std::vector<LuminosityBlockRange>
487 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(std::string
const&
name)
const;
494 ParameterSet::getParameter<ParameterSet>(std::string
const&
name)
const;
498 ParameterSet::getParameter<VParameterSet>(std::string
const&
name)
const;
510 ParameterSet::addUntrackedParameter<ParameterSet>(std::string
const&
name,
ParameterSet const&
value);
539 ParameterSet::getUntrackedParameter<bool>(std::string
const&
name,
bool const& defaultValue)
const;
543 ParameterSet::getUntrackedParameter<bool>(std::string
const&
name)
const;
550 ParameterSet::getUntrackedParameter<int>(std::string
const&
name,
int const& defaultValue)
const;
554 ParameterSet::getUntrackedParameter<int>(std::string
const&
name)
const;
558 ParameterSet::getUntrackedParameter<std::vector<int> >(std::string
const&
name, std::vector<int>
const& defaultValue)
const;
562 ParameterSet::getUntrackedParameter<std::vector<int> >(std::string
const&
name)
const;
569 ParameterSet::getUntrackedParameter<unsigned int>(std::string
const&
name,
unsigned int const& defaultValue)
const;
573 ParameterSet::getUntrackedParameter<unsigned int>(std::string
const&
name)
const;
576 std::vector<unsigned int>
577 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(std::string
const&
name, std::vector<unsigned int>
const& defaultValue)
const;
580 std::vector<unsigned int>
581 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(std::string
const&
name)
const;
588 ParameterSet::getUntrackedParameter<unsigned long long>(std::string
const&
name,
unsigned long long const& defaultValue)
const;
592 ParameterSet::getUntrackedParameter<unsigned long long>(std::string
const&
name)
const;
595 std::vector<unsigned long long>
596 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(std::string
const&
name, std::vector<unsigned long long>
const& defaultValue)
const;
599 std::vector<unsigned long long>
600 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(std::string
const&
name)
const;
607 ParameterSet::getUntrackedParameter<long long>(std::string
const&
name,
long long const& defaultValue)
const;
611 ParameterSet::getUntrackedParameter<long long>(std::string
const&
name)
const;
614 std::vector<long long>
615 ParameterSet::getUntrackedParameter<std::vector<long long> >(std::string
const&
name, std::vector<long long>
const& defaultValue)
const;
618 std::vector<long long>
619 ParameterSet::getUntrackedParameter<std::vector<long long> >(std::string
const&
name)
const;
626 ParameterSet::getUntrackedParameter<double>(std::string
const&
name,
double const& defaultValue)
const;
630 ParameterSet::getUntrackedParameter<double>(std::string
const&
name)
const;
634 ParameterSet::getUntrackedParameter<std::vector<double> >(std::string
const&
name, std::vector<double>
const& defaultValue)
const;
638 ParameterSet::getUntrackedParameter<std::vector<double> >(std::string
const&
name)
const;
645 ParameterSet::getUntrackedParameter<std::string>(std::string
const&
name, std::string
const& defaultValue)
const;
649 ParameterSet::getUntrackedParameter<std::string>(std::string
const&
name)
const;
652 std::vector<std::string>
653 ParameterSet::getUntrackedParameter<std::vector<std::string> >(std::string
const&
name, std::vector<std::string>
const& defaultValue)
const;
656 std::vector<std::string>
657 ParameterSet::getUntrackedParameter<std::vector<std::string> >(std::string
const&
name)
const;
664 ParameterSet::getUntrackedParameter<FileInPath>(std::string
const&
name,
FileInPath const& defaultValue)
const;
668 ParameterSet::getUntrackedParameter<FileInPath>(std::string
const&
name)
const;
675 ParameterSet::getUntrackedParameter<InputTag>(std::string
const&
name, InputTag
const& defaultValue)
const;
679 ParameterSet::getUntrackedParameter<InputTag>(std::string
const&
name)
const;
682 std::vector<InputTag>
683 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(std::string
const&
name,
684 std::vector<InputTag>
const& defaultValue)
const;
687 std::vector<InputTag>
688 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(std::string
const&
name)
const;
695 ParameterSet::getUntrackedParameter<EventID>(std::string
const&
name,
EventID const& defaultValue)
const;
699 ParameterSet::getUntrackedParameter<EventID>(std::string
const&
name)
const;
703 ParameterSet::getUntrackedParameter<std::vector<EventID> >(std::string
const&
name,
704 std::vector<EventID>
const& defaultValue)
const;
707 ParameterSet::getUntrackedParameter<std::vector<EventID> >(std::string
const&
name)
const;
714 ParameterSet::getUntrackedParameter<LuminosityBlockID>(std::string
const&
name,
LuminosityBlockID const& defaultValue)
const;
718 ParameterSet::getUntrackedParameter<LuminosityBlockID>(std::string
const&
name)
const;
721 std::vector<LuminosityBlockID>
722 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(std::string
const&
name,
723 std::vector<LuminosityBlockID>
const& defaultValue)
const;
725 std::vector<LuminosityBlockID>
726 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(std::string
const&
name)
const;
733 ParameterSet::getUntrackedParameter<EventRange>(std::string
const&
name, EventRange
const& defaultValue)
const;
737 ParameterSet::getUntrackedParameter<EventRange>(std::string
const&
name)
const;
740 std::vector<EventRange>
741 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(std::string
const&
name,
742 std::vector<EventRange>
const& defaultValue)
const;
744 std::vector<EventRange>
745 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(std::string
const&
name)
const;
752 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(std::string
const&
name,
LuminosityBlockRange const& defaultValue)
const;
756 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(std::string
const&
name)
const;
759 std::vector<LuminosityBlockRange>
760 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(std::string
const&
name,
761 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
763 std::vector<LuminosityBlockRange>
764 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(std::string
const&
name)
const;
772 ParameterSet::getParameter<bool>(
char const*
name)
const;
779 ParameterSet::getParameter<int>(
char const*
name)
const;
783 ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const;
790 ParameterSet::getParameter<long long>(
char const*
name)
const;
793 std::vector<long long>
794 ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const;
801 ParameterSet::getParameter<unsigned int>(
char const*
name)
const;
804 std::vector<unsigned int>
805 ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const;
812 ParameterSet::getParameter<unsigned long long>(
char const*
name)
const;
815 std::vector<unsigned long long>
816 ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const;
823 ParameterSet::getParameter<double>(
char const*
name)
const;
827 ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const;
834 ParameterSet::getParameter<std::string>(
char const*
name)
const;
837 std::vector<std::string>
838 ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const;
845 ParameterSet::getParameter<FileInPath>(
char const*
name)
const;
852 ParameterSet::getParameter<InputTag>(
char const*
name)
const;
858 std::vector<InputTag>
859 ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const;
866 ParameterSet::getParameter<EventID>(
char const*
name)
const;
873 ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const;
880 ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const;
886 std::vector<LuminosityBlockID>
887 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
894 ParameterSet::getParameter<EventRange>(
char const*
name)
const;
900 std::vector<EventRange>
901 ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const;
908 ParameterSet::getParameter<LuminosityBlockRange>(
char const*
name)
const;
914 std::vector<LuminosityBlockRange>
915 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
922 ParameterSet::getParameter<ParameterSet>(
char const*
name)
const;
926 ParameterSet::getParameter<VParameterSet>(
char const*
name)
const;
935 ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const;
939 ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const;
946 ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const;
950 ParameterSet::getUntrackedParameter<int>(
char const*
name)
const;
954 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name, std::vector<int>
const& defaultValue)
const;
958 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const;
965 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
unsigned int const& defaultValue)
const;
969 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const;
972 std::vector<unsigned int>
973 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name, std::vector<unsigned int>
const& defaultValue)
const;
976 std::vector<unsigned int>
977 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const;
984 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name,
unsigned long long const& defaultValue)
const;
988 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const;
991 std::vector<unsigned long long>
992 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name, std::vector<unsigned long long>
const& defaultValue)
const;
995 std::vector<unsigned long long>
996 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name)
const;
1003 ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const;
1007 ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const;
1010 std::vector<long long>
1011 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name, std::vector<long long>
const& defaultValue)
const;
1014 std::vector<long long>
1015 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const;
1022 ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const;
1026 ParameterSet::getUntrackedParameter<double>(
char const*
name)
const;
1030 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name, std::vector<double>
const& defaultValue)
const;
1034 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const;
1041 ParameterSet::getUntrackedParameter<std::string>(
char const*
name, std::string
const& defaultValue)
const;
1045 ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const;
1048 std::vector<std::string>
1049 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name, std::vector<std::string>
const& defaultValue)
const;
1052 std::vector<std::string>
1053 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const;
1060 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name,
FileInPath const& defaultValue)
const;
1064 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const;
1071 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name, InputTag
const& defaultValue)
const;
1075 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const;
1078 std::vector<InputTag>
1079 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name,
1080 std::vector<InputTag>
const& defaultValue)
const;
1083 std::vector<InputTag>
1084 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const;
1091 ParameterSet::getUntrackedParameter<EventID>(
char const*
name,
EventID const& defaultValue)
const;
1095 ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const;
1098 std::vector<EventID>
1099 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name,
1100 std::vector<EventID>
const& defaultValue)
const;
1102 std::vector<EventID>
1103 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const;
1110 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name,
LuminosityBlockID const& defaultValue)
const;
1114 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const;
1117 std::vector<LuminosityBlockID>
1118 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name,
1119 std::vector<LuminosityBlockID>
const& defaultValue)
const;
1121 std::vector<LuminosityBlockID>
1122 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
1129 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name, EventRange
const& defaultValue)
const;
1133 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const;
1136 std::vector<EventRange>
1137 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name,
1138 std::vector<EventRange>
const& defaultValue)
const;
1140 std::vector<EventRange>
1141 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const;
1148 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name,
LuminosityBlockRange const& defaultValue)
const;
1152 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name)
const;
1155 std::vector<LuminosityBlockRange>
1156 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name,
1157 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
1159 std::vector<LuminosityBlockRange>
1160 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
1167 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
ParameterSet const& defaultValue)
const;
1171 ParameterSet::getUntrackedParameter<ParameterSet>(std::string
const&
name,
ParameterSet const& defaultValue)
const;
1175 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const;
1179 ParameterSet::getUntrackedParameter<ParameterSet>(std::string
const&
name)
const;
1183 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name,
VParameterSet const& defaultValue)
const;
1187 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const;
1191 ParameterSet::getUntrackedParameter<VParameterSet>(std::string
const&
name,
VParameterSet const& defaultValue)
const;
1195 ParameterSet::getUntrackedParameter<VParameterSet>(std::string
const&
name)
const;
1198 std::vector<std::string>
1199 ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const;
1202 std::vector<std::string>
1203 ParameterSet::getParameterNamesForType<VParameterSet>(
bool trackiness)
const;
VParameterSet const & getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) const
T getParameter(std::string const &) const
Entry const & retrieve(char const *) const
std::string toString() const
T getUntrackedParameter(std::string const &, T const &) 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::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
std::map< std::string, ParameterSetEntry > psettable
void invalidateRegistration(std::string const &nameOfTracked) const
bool fromString(std::string const &)
ParameterSetID id() const
VParameterSetEntry const *const retrieveUntrackedVParameterSet(std::string const &) const
std::vector< ParameterSet > VParameterSet
Entry const *const retrieveUnknown(char const *) const
size_t getParameterSetVectorNames(std::vector< std::string > &output, bool trackiness=true) const
ParameterSet const & getParameterSet(ParameterSetID const &id)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
void toStringImp(std::string &, bool useAll) const
void insert(bool ok_to_replace, char const *, Entry const &)
void addUntrackedParameter(char const *name, T const &value)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void swap(Association< C > &lhs, Association< C > &rhs)
ParameterSet trackedPart() const
void setID(ParameterSetID const &id) const
void augment(ParameterSet const &from)
void swap(ParameterSet &other)
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
std::vector< FileInPath >::size_type getAllFileInPaths(std::vector< FileInPath > &output) const
void copyFrom(ParameterSet const &from, std::string const &name)
VParameterSetEntry * getPSetVectorForUpdate(std::string const &name)
ParameterSet const & getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
std::pair< std::string, MonitorElement * > entry
void addParameter(std::string const &name, T const &value)
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
void insertVParameterSet(bool okay_to_replace, std::string const &name, VParameterSetEntry const &entry)
std::auto_ptr< ParameterSet > popParameterSet(std::string const &name)
ParameterSet const & operator=(ParameterSet const &other)
std::vector< std::string > getParameterNames() const
bool isRegistered() const
Hash< ParameterSetType > ParameterSetID
friend std::ostream & operator<<(std::ostream &os, ParameterSet const &pset)
ParameterSetEntry const *const retrieveUnknownParameterSet(std::string const &) const
static std::string from(" from ")
std::string getParameterAsString(std::string const &name) const
psettable const & psetTable() const
void deprecatedInputTagWarning(std::string const &name, std::string const &label) const
void addParameter(char const *name, T const &value)
ParameterSet const & getParameterSet(std::string const &) const
void addUntrackedParameter(std::string const &name, T const &value)
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)
ParameterSetID trackedID() const
VParameterSetEntry const & retrieveVParameterSet(std::string const &) const
std::map< std::string, Entry > table
void allToString(std::string &result) const
std::map< std::string, VParameterSetEntry > vpsettable
boost::enable_if_c< has_match< A >::value &&has_match< B >::value, AndHelper< A, B > >::type operator&&(A const &a, B const &b)
VParameterSetEntry const *const retrieveUnknownVParameterSet(std::string const &) const
vpsettable const & vpsetTable() const
ParameterSetEntry const *const retrieveUntrackedParameterSet(std::string const &) const
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
Entry const *const retrieveUntracked(char const *) const
table const & tbl() const
static const HistoName names[]
ParameterSet const & registerIt()
bool isTransientEqual(ParameterSet const &a, ParameterSet const &b)
ParameterSet * getPSetForUpdate(std::string const &name)
ParameterSet * getPSetForUpdate(std::string const &name, bool &isTracked)