1 #ifndef FWCore_ParameterSet_ParameterSet_h
2 #define FWCore_ParameterSet_ParameterSet_h
83 void insert(
bool ok_to_replace,
char const* ,
Entry const&);
186 std::vector<std::string>
names = getParameterNamesForType<T>(trackiness);
187 return std::find(names.begin(), names.end(), parameterName) != names.end();
194 std::vector<std::string>
result;
198 Entry type_translator(
"", value, trackiness);
199 char type_code = type_translator.
typeCode();
229 bool trackiness =
true)
const;
237 bool trackiness=
true)
const;
252 typedef std::map<std::string, Entry>
table;
255 typedef std::map<std::string, ParameterSetEntry>
psettable;
258 typedef std::map<std::string, VParameterSetEntry>
vpsettable;
266 bool isTracked =
false;
314 std::vector<std::string>&
output)
const;
354 ParameterSet::getParameter<std::vector<int> >(
std::string const&
name)
const;
364 std::vector<long long>
365 ParameterSet::getParameter<std::vector<long long> >(
std::string const&
name)
const;
372 ParameterSet::getParameter<unsigned int>(
std::string const&
name)
const;
375 std::vector<unsigned int>
376 ParameterSet::getParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
383 ParameterSet::getParameter<unsigned long long>(
std::string const&
name)
const;
386 std::vector<unsigned long long>
387 ParameterSet::getParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
398 ParameterSet::getParameter<std::vector<double> >(
std::string const&
name)
const;
405 ParameterSet::getParameter<std::string>(
std::string const&
name)
const;
408 std::vector<std::string>
409 ParameterSet::getParameter<std::vector<std::string> >(
std::string const&
name)
const;
421 std::vector<std::string>
422 ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const;
435 std::vector<InputTag>
436 ParameterSet::getParameter<std::vector<InputTag> >(
std::string const&
name)
const;
449 std::vector<ESInputTag>
450 ParameterSet::getParameter<std::vector<ESInputTag> >(
std::string const&
name)
const;
464 ParameterSet::getParameter<std::vector<EventID> >(
std::string const&
name)
const;
471 ParameterSet::getParameter<LuminosityBlockID>(
std::string const&
name)
const;
477 std::vector<LuminosityBlockID>
478 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
491 std::vector<EventRange>
492 ParameterSet::getParameter<std::vector<EventRange> >(
std::string const&
name)
const;
499 ParameterSet::getParameter<LuminosityBlockRange>(
std::string const&
name)
const;
505 std::vector<LuminosityBlockRange>
506 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
513 ParameterSet::getParameter<ParameterSet>(
std::string const&
name)
const;
517 ParameterSet::getParameter<VParameterSet>(
std::string const&
name)
const;
558 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const;
562 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name)
const;
569 ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const;
573 ParameterSet::getUntrackedParameter<int>(
std::string const&
name)
const;
577 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name, std::vector<int>
const& defaultValue)
const;
581 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name)
const;
588 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
unsigned int const& defaultValue)
const;
592 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name)
const;
595 std::vector<unsigned int>
596 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const;
599 std::vector<unsigned int>
600 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
607 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name,
unsigned long long const& defaultValue)
const;
611 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name)
const;
614 std::vector<unsigned long long>
615 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const;
618 std::vector<unsigned long long>
619 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
626 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
long long const& defaultValue)
const;
630 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name)
const;
633 std::vector<long long>
634 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name, std::vector<long long>
const& defaultValue)
const;
637 std::vector<long long>
638 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const;
645 ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const;
649 ParameterSet::getUntrackedParameter<double>(
std::string const&
name)
const;
653 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name, std::vector<double>
const& defaultValue)
const;
657 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const;
668 ParameterSet::getUntrackedParameter<std::string>(
std::string const&
name)
const;
671 std::vector<std::string>
672 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name, std::vector<std::string>
const& defaultValue)
const;
675 std::vector<std::string>
676 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name)
const;
687 ParameterSet::getUntrackedParameter<FileInPath>(
std::string const&
name)
const;
698 ParameterSet::getUntrackedParameter<InputTag>(
std::string const&
name)
const;
701 std::vector<InputTag>
702 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name,
703 std::vector<InputTag>
const& defaultValue)
const;
706 std::vector<InputTag>
707 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const;
714 ParameterSet::getUntrackedParameter<EventID>(
std::string const&
name, EventID
const& defaultValue)
const;
718 ParameterSet::getUntrackedParameter<EventID>(
std::string const&
name)
const;
722 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name,
723 std::vector<EventID>
const& defaultValue)
const;
726 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const;
733 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name, LuminosityBlockID
const& defaultValue)
const;
737 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name)
const;
740 std::vector<LuminosityBlockID>
741 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name,
742 std::vector<LuminosityBlockID>
const& defaultValue)
const;
744 std::vector<LuminosityBlockID>
745 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
752 ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name, EventRange
const& defaultValue)
const;
756 ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name)
const;
759 std::vector<EventRange>
760 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name,
761 std::vector<EventRange>
const& defaultValue)
const;
763 std::vector<EventRange>
764 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const;
775 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
std::string const&
name)
const;
778 std::vector<LuminosityBlockRange>
779 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name,
780 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
782 std::vector<LuminosityBlockRange>
783 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
791 ParameterSet::getParameter<bool>(
char const*
name)
const;
798 ParameterSet::getParameter<int>(
char const*
name)
const;
802 ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const;
809 ParameterSet::getParameter<long long>(
char const*
name)
const;
812 std::vector<long long>
813 ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const;
820 ParameterSet::getParameter<unsigned int>(
char const*
name)
const;
823 std::vector<unsigned int>
824 ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const;
831 ParameterSet::getParameter<unsigned long long>(
char const*
name)
const;
834 std::vector<unsigned long long>
835 ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const;
842 ParameterSet::getParameter<double>(
char const*
name)
const;
846 ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const;
853 ParameterSet::getParameter<std::string>(
char const*
name)
const;
856 std::vector<std::string>
857 ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const;
864 ParameterSet::getParameter<FileInPath>(
char const*
name)
const;
871 ParameterSet::getParameter<InputTag>(
char const*
name)
const;
877 std::vector<InputTag>
878 ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const;
885 ParameterSet::getParameter<EventID>(
char const*
name)
const;
892 ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const;
899 ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const;
905 std::vector<LuminosityBlockID>
906 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
913 ParameterSet::getParameter<EventRange>(
char const*
name)
const;
919 std::vector<EventRange>
920 ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const;
927 ParameterSet::getParameter<LuminosityBlockRange>(
char const*
name)
const;
933 std::vector<LuminosityBlockRange>
934 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
941 ParameterSet::getParameter<ParameterSet>(
char const*
name)
const;
945 ParameterSet::getParameter<VParameterSet>(
char const*
name)
const;
954 ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const;
958 ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const;
965 ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const;
969 ParameterSet::getUntrackedParameter<int>(
char const*
name)
const;
973 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name, std::vector<int>
const& defaultValue)
const;
977 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const;
984 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
unsigned int const& defaultValue)
const;
988 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const;
991 std::vector<unsigned int>
992 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name, std::vector<unsigned int>
const& defaultValue)
const;
995 std::vector<unsigned int>
996 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const;
1003 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name,
unsigned long long const& defaultValue)
const;
1007 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const;
1010 std::vector<unsigned long long>
1011 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name, std::vector<unsigned long long>
const& defaultValue)
const;
1014 std::vector<unsigned long long>
1015 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name)
const;
1022 ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const;
1026 ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const;
1029 std::vector<long long>
1030 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name, std::vector<long long>
const& defaultValue)
const;
1033 std::vector<long long>
1034 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const;
1041 ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const;
1045 ParameterSet::getUntrackedParameter<double>(
char const*
name)
const;
1049 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name, std::vector<double>
const& defaultValue)
const;
1053 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const;
1060 ParameterSet::getUntrackedParameter<std::string>(
char const*
name,
std::string const& defaultValue)
const;
1064 ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const;
1067 std::vector<std::string>
1068 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name, std::vector<std::string>
const& defaultValue)
const;
1071 std::vector<std::string>
1072 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const;
1079 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name,
FileInPath const& defaultValue)
const;
1083 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const;
1090 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name,
InputTag const& defaultValue)
const;
1094 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const;
1097 std::vector<InputTag>
1098 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name,
1099 std::vector<InputTag>
const& defaultValue)
const;
1102 std::vector<InputTag>
1103 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const;
1110 ParameterSet::getUntrackedParameter<EventID>(
char const*
name, EventID
const& defaultValue)
const;
1114 ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const;
1117 std::vector<EventID>
1118 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name,
1119 std::vector<EventID>
const& defaultValue)
const;
1121 std::vector<EventID>
1122 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const;
1129 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name, LuminosityBlockID
const& defaultValue)
const;
1133 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const;
1136 std::vector<LuminosityBlockID>
1137 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name,
1138 std::vector<LuminosityBlockID>
const& defaultValue)
const;
1140 std::vector<LuminosityBlockID>
1141 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
1148 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name, EventRange
const& defaultValue)
const;
1152 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const;
1155 std::vector<EventRange>
1156 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name,
1157 std::vector<EventRange>
const& defaultValue)
const;
1159 std::vector<EventRange>
1160 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const;
1167 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name,
LuminosityBlockRange const& defaultValue)
const;
1171 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name)
const;
1174 std::vector<LuminosityBlockRange>
1175 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name,
1176 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
1178 std::vector<LuminosityBlockRange>
1179 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
1186 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
ParameterSet const& defaultValue)
const;
1194 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const;
1198 ParameterSet::getUntrackedParameter<ParameterSet>(
std::string const&
name)
const;
1202 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name,
VParameterSet const& defaultValue)
const;
1206 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const;
1214 ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name)
const;
1217 std::vector<std::string>
1218 ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const;
1221 std::vector<std::string>
1222 ParameterSet::getParameterNamesForType<VParameterSet>(
bool trackiness)
const;
void setID(ParameterSetID const &id)
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
static const HistoName names[]
ParameterSetEntry const * retrieveUntrackedParameterSet(std::string const &) const
bool fromString(std::string const &)
std::string dump(unsigned int indent=0) 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)
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)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
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 augment(ParameterSet const &from)
void eraseOrSetUntrackedParameterSet(std::string const &name)
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)
void addParameter(std::string const &name, T const &value)
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)
std::auto_ptr< ParameterSet > popParameterSet(std::string const &name)
VParameterSetEntry const * retrieveUnknownVParameterSet(std::string const &) const
std::vector< std::string > getParameterNames() const
void eraseSimpleParameter(std::string const &name)
void copyForModify(ParameterSet const &other)
bool isRegistered() const
Hash< ParameterSetType > ParameterSetID
void invalidateRegistration(std::string const &nameOfTracked)
friend std::ostream & operator<<(std::ostream &os, ParameterSet const &pset)
static void registerFromString(std::string const &rep)
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)
std::auto_ptr< ParameterDescriptionNode > operator&&(ParameterDescriptionNode const &node_left, ParameterDescriptionNode const &node_right)
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
ParameterSetID trackedID() const
VParameterSetEntry const & retrieveVParameterSet(std::string const &) const
std::map< std::string, Entry > table
void allToString(std::string &result) const
ParameterSet & operator=(ParameterSet const &other)
std::map< std::string, VParameterSetEntry > vpsettable
vpsettable const & vpsetTable() const
VParameterSet getUntrackedParameterSetVector(std::string const &name, VParameterSet const &defaultValue) 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
table const & tbl() const
static ParameterSetID emptyParameterSetID()
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)