1 #ifndef FWCore_ParameterSet_ParameterSet_h
2 #define FWCore_ParameterSet_ParameterSet_h
84 void insert(
bool ok_to_replace,
char const* ,
Entry const&);
187 std::vector<std::string>
names = getParameterNamesForType<T>(trackiness);
188 return std::find(names.begin(), names.end(), parameterName) != names.end();
195 std::vector<std::string>
result;
199 Entry type_translator(
"", value, trackiness);
200 char type_code = type_translator.
typeCode();
230 bool trackiness =
true)
const;
238 bool trackiness=
true)
const;
253 typedef std::map<std::string, Entry>
table;
256 typedef std::map<std::string, ParameterSetEntry>
psettable;
259 typedef std::map<std::string, VParameterSetEntry>
vpsettable;
267 bool isTracked =
false;
315 std::vector<std::string>&
output)
const;
358 ParameterSet::getParameter<std::vector<int> >(
std::string const&
name)
const;
368 std::vector<long long>
369 ParameterSet::getParameter<std::vector<long long> >(
std::string const&
name)
const;
376 ParameterSet::getParameter<unsigned int>(
std::string const&
name)
const;
379 std::vector<unsigned int>
380 ParameterSet::getParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
387 ParameterSet::getParameter<unsigned long long>(
std::string const&
name)
const;
390 std::vector<unsigned long long>
391 ParameterSet::getParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
402 ParameterSet::getParameter<std::vector<double> >(
std::string const&
name)
const;
409 ParameterSet::getParameter<std::string>(
std::string const&
name)
const;
412 std::vector<std::string>
413 ParameterSet::getParameter<std::vector<std::string> >(
std::string const&
name)
const;
425 std::vector<std::string>
426 ParameterSet::getParameterNamesForType<FileInPath>(
bool trackiness)
const;
439 std::vector<InputTag>
440 ParameterSet::getParameter<std::vector<InputTag> >(
std::string const&
name)
const;
453 std::vector<ESInputTag>
454 ParameterSet::getParameter<std::vector<ESInputTag> >(
std::string const&
name)
const;
468 ParameterSet::getParameter<std::vector<EventID> >(
std::string const&
name)
const;
475 ParameterSet::getParameter<LuminosityBlockID>(
std::string const&
name)
const;
481 std::vector<LuminosityBlockID>
482 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
495 std::vector<EventRange>
496 ParameterSet::getParameter<std::vector<EventRange> >(
std::string const&
name)
const;
503 ParameterSet::getParameter<LuminosityBlockRange>(
std::string const&
name)
const;
509 std::vector<LuminosityBlockRange>
510 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
517 ParameterSet::getParameter<ParameterSet>(
std::string const&
name)
const;
521 ParameterSet::getParameter<VParameterSet>(
std::string const&
name)
const;
562 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name,
bool const& defaultValue)
const;
566 ParameterSet::getUntrackedParameter<bool>(
std::string const&
name)
const;
573 ParameterSet::getUntrackedParameter<int>(
std::string const&
name,
int const& defaultValue)
const;
577 ParameterSet::getUntrackedParameter<int>(
std::string const&
name)
const;
581 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name, std::vector<int>
const& defaultValue)
const;
585 ParameterSet::getUntrackedParameter<std::vector<int> >(
std::string const&
name)
const;
592 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name,
unsigned int const& defaultValue)
const;
596 ParameterSet::getUntrackedParameter<unsigned int>(
std::string const&
name)
const;
599 std::vector<unsigned int>
600 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name, std::vector<unsigned int>
const& defaultValue)
const;
603 std::vector<unsigned int>
604 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
std::string const&
name)
const;
611 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name,
unsigned long long const& defaultValue)
const;
615 ParameterSet::getUntrackedParameter<unsigned long long>(
std::string const&
name)
const;
618 std::vector<unsigned long long>
619 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name, std::vector<unsigned long long>
const& defaultValue)
const;
622 std::vector<unsigned long long>
623 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
std::string const&
name)
const;
630 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name,
long long const& defaultValue)
const;
634 ParameterSet::getUntrackedParameter<long long>(
std::string const&
name)
const;
637 std::vector<long long>
638 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name, std::vector<long long>
const& defaultValue)
const;
641 std::vector<long long>
642 ParameterSet::getUntrackedParameter<std::vector<long long> >(
std::string const&
name)
const;
649 ParameterSet::getUntrackedParameter<double>(
std::string const&
name,
double const& defaultValue)
const;
653 ParameterSet::getUntrackedParameter<double>(
std::string const&
name)
const;
657 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name, std::vector<double>
const& defaultValue)
const;
661 ParameterSet::getUntrackedParameter<std::vector<double> >(
std::string const&
name)
const;
672 ParameterSet::getUntrackedParameter<std::string>(
std::string const&
name)
const;
675 std::vector<std::string>
676 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name, std::vector<std::string>
const& defaultValue)
const;
679 std::vector<std::string>
680 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
std::string const&
name)
const;
691 ParameterSet::getUntrackedParameter<FileInPath>(
std::string const&
name)
const;
702 ParameterSet::getUntrackedParameter<InputTag>(
std::string const&
name)
const;
705 std::vector<InputTag>
706 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name,
707 std::vector<InputTag>
const& defaultValue)
const;
710 std::vector<InputTag>
711 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
std::string const&
name)
const;
718 ParameterSet::getUntrackedParameter<EventID>(
std::string const&
name, EventID
const& defaultValue)
const;
722 ParameterSet::getUntrackedParameter<EventID>(
std::string const&
name)
const;
726 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name,
727 std::vector<EventID>
const& defaultValue)
const;
730 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
std::string const&
name)
const;
737 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name, LuminosityBlockID
const& defaultValue)
const;
741 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
std::string const&
name)
const;
744 std::vector<LuminosityBlockID>
745 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name,
746 std::vector<LuminosityBlockID>
const& defaultValue)
const;
748 std::vector<LuminosityBlockID>
749 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
std::string const&
name)
const;
756 ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name, EventRange
const& defaultValue)
const;
760 ParameterSet::getUntrackedParameter<EventRange>(
std::string const&
name)
const;
763 std::vector<EventRange>
764 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name,
765 std::vector<EventRange>
const& defaultValue)
const;
767 std::vector<EventRange>
768 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
std::string const&
name)
const;
779 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
std::string const&
name)
const;
782 std::vector<LuminosityBlockRange>
783 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name,
784 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
786 std::vector<LuminosityBlockRange>
787 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
std::string const&
name)
const;
795 ParameterSet::getParameter<bool>(
char const*
name)
const;
802 ParameterSet::getParameter<int>(
char const*
name)
const;
806 ParameterSet::getParameter<std::vector<int> >(
char const*
name)
const;
813 ParameterSet::getParameter<long long>(
char const*
name)
const;
816 std::vector<long long>
817 ParameterSet::getParameter<std::vector<long long> >(
char const*
name)
const;
824 ParameterSet::getParameter<unsigned int>(
char const*
name)
const;
827 std::vector<unsigned int>
828 ParameterSet::getParameter<std::vector<unsigned int> >(
char const*
name)
const;
835 ParameterSet::getParameter<unsigned long long>(
char const*
name)
const;
838 std::vector<unsigned long long>
839 ParameterSet::getParameter<std::vector<unsigned long long> >(
char const*
name)
const;
846 ParameterSet::getParameter<double>(
char const*
name)
const;
850 ParameterSet::getParameter<std::vector<double> >(
char const*
name)
const;
857 ParameterSet::getParameter<std::string>(
char const*
name)
const;
860 std::vector<std::string>
861 ParameterSet::getParameter<std::vector<std::string> >(
char const*
name)
const;
868 ParameterSet::getParameter<FileInPath>(
char const*
name)
const;
875 ParameterSet::getParameter<InputTag>(
char const*
name)
const;
881 std::vector<InputTag>
882 ParameterSet::getParameter<std::vector<InputTag> >(
char const*
name)
const;
889 ParameterSet::getParameter<EventID>(
char const*
name)
const;
896 ParameterSet::getParameter<std::vector<EventID> >(
char const*
name)
const;
903 ParameterSet::getParameter<LuminosityBlockID>(
char const*
name)
const;
909 std::vector<LuminosityBlockID>
910 ParameterSet::getParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
917 ParameterSet::getParameter<EventRange>(
char const*
name)
const;
923 std::vector<EventRange>
924 ParameterSet::getParameter<std::vector<EventRange> >(
char const*
name)
const;
931 ParameterSet::getParameter<LuminosityBlockRange>(
char const*
name)
const;
937 std::vector<LuminosityBlockRange>
938 ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
945 ParameterSet::getParameter<ParameterSet>(
char const*
name)
const;
949 ParameterSet::getParameter<VParameterSet>(
char const*
name)
const;
958 ParameterSet::getUntrackedParameter<bool>(
char const*
name,
bool const& defaultValue)
const;
962 ParameterSet::getUntrackedParameter<bool>(
char const*
name)
const;
969 ParameterSet::getUntrackedParameter<int>(
char const*
name,
int const& defaultValue)
const;
973 ParameterSet::getUntrackedParameter<int>(
char const*
name)
const;
977 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name, std::vector<int>
const& defaultValue)
const;
981 ParameterSet::getUntrackedParameter<std::vector<int> >(
char const*
name)
const;
988 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name,
unsigned int const& defaultValue)
const;
992 ParameterSet::getUntrackedParameter<unsigned int>(
char const*
name)
const;
995 std::vector<unsigned int>
996 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name, std::vector<unsigned int>
const& defaultValue)
const;
999 std::vector<unsigned int>
1000 ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(
char const*
name)
const;
1007 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name,
unsigned long long const& defaultValue)
const;
1011 ParameterSet::getUntrackedParameter<unsigned long long>(
char const*
name)
const;
1014 std::vector<unsigned long long>
1015 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name, std::vector<unsigned long long>
const& defaultValue)
const;
1018 std::vector<unsigned long long>
1019 ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(
char const*
name)
const;
1026 ParameterSet::getUntrackedParameter<long long>(
char const*
name,
long long const& defaultValue)
const;
1030 ParameterSet::getUntrackedParameter<long long>(
char const*
name)
const;
1033 std::vector<long long>
1034 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name, std::vector<long long>
const& defaultValue)
const;
1037 std::vector<long long>
1038 ParameterSet::getUntrackedParameter<std::vector<long long> >(
char const*
name)
const;
1045 ParameterSet::getUntrackedParameter<double>(
char const*
name,
double const& defaultValue)
const;
1049 ParameterSet::getUntrackedParameter<double>(
char const*
name)
const;
1053 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name, std::vector<double>
const& defaultValue)
const;
1057 ParameterSet::getUntrackedParameter<std::vector<double> >(
char const*
name)
const;
1064 ParameterSet::getUntrackedParameter<std::string>(
char const*
name,
std::string const& defaultValue)
const;
1068 ParameterSet::getUntrackedParameter<std::string>(
char const*
name)
const;
1071 std::vector<std::string>
1072 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name, std::vector<std::string>
const& defaultValue)
const;
1075 std::vector<std::string>
1076 ParameterSet::getUntrackedParameter<std::vector<std::string> >(
char const*
name)
const;
1083 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name,
FileInPath const& defaultValue)
const;
1087 ParameterSet::getUntrackedParameter<FileInPath>(
char const*
name)
const;
1094 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name,
InputTag const& defaultValue)
const;
1098 ParameterSet::getUntrackedParameter<InputTag>(
char const*
name)
const;
1101 std::vector<InputTag>
1102 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name,
1103 std::vector<InputTag>
const& defaultValue)
const;
1106 std::vector<InputTag>
1107 ParameterSet::getUntrackedParameter<std::vector<InputTag> >(
char const*
name)
const;
1114 ParameterSet::getUntrackedParameter<EventID>(
char const*
name, EventID
const& defaultValue)
const;
1118 ParameterSet::getUntrackedParameter<EventID>(
char const*
name)
const;
1121 std::vector<EventID>
1122 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name,
1123 std::vector<EventID>
const& defaultValue)
const;
1125 std::vector<EventID>
1126 ParameterSet::getUntrackedParameter<std::vector<EventID> >(
char const*
name)
const;
1133 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name, LuminosityBlockID
const& defaultValue)
const;
1137 ParameterSet::getUntrackedParameter<LuminosityBlockID>(
char const*
name)
const;
1140 std::vector<LuminosityBlockID>
1141 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name,
1142 std::vector<LuminosityBlockID>
const& defaultValue)
const;
1144 std::vector<LuminosityBlockID>
1145 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(
char const*
name)
const;
1152 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name, EventRange
const& defaultValue)
const;
1156 ParameterSet::getUntrackedParameter<EventRange>(
char const*
name)
const;
1159 std::vector<EventRange>
1160 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name,
1161 std::vector<EventRange>
const& defaultValue)
const;
1163 std::vector<EventRange>
1164 ParameterSet::getUntrackedParameter<std::vector<EventRange> >(
char const*
name)
const;
1171 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name,
LuminosityBlockRange const& defaultValue)
const;
1175 ParameterSet::getUntrackedParameter<LuminosityBlockRange>(
char const*
name)
const;
1178 std::vector<LuminosityBlockRange>
1179 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name,
1180 std::vector<LuminosityBlockRange>
const& defaultValue)
const;
1182 std::vector<LuminosityBlockRange>
1183 ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(
char const*
name)
const;
1190 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name,
ParameterSet const& defaultValue)
const;
1198 ParameterSet::getUntrackedParameter<ParameterSet>(
char const*
name)
const;
1202 ParameterSet::getUntrackedParameter<ParameterSet>(
std::string const&
name)
const;
1206 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name,
VParameterSet const& defaultValue)
const;
1210 ParameterSet::getUntrackedParameter<VParameterSet>(
char const*
name)
const;
1218 ParameterSet::getUntrackedParameter<VParameterSet>(
std::string const&
name)
const;
1221 std::vector<std::string>
1222 ParameterSet::getParameterNamesForType<ParameterSet>(
bool trackiness)
const;
1225 std::vector<std::string>
1226 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 const & getProcessParameterSetContainingModule(ModuleDescription const &moduleDescription)
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)