CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FWCore/ParameterSet/interface/ParameterSet.h

Go to the documentation of this file.
00001 #ifndef FWCore_ParameterSet_ParameterSet_h
00002 #define FWCore_ParameterSet_ParameterSet_h
00003 
00004 // ----------------------------------------------------------------------
00005 // Declaration for ParameterSet(parameter set) and related types
00006 // ----------------------------------------------------------------------
00007 
00008 // ----------------------------------------------------------------------
00009 // prolog
00010 
00011 // ----------------------------------------------------------------------
00012 // prerequisite source files and headers
00013 
00014 #include "DataFormats/Provenance/interface/ParameterSetID.h"
00015 #include "FWCore/ParameterSet/interface/Entry.h"
00016 #include "FWCore/ParameterSet/interface/FileInPath.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSetEntry.h"
00018 #include "FWCore/ParameterSet/interface/VParameterSetEntry.h"
00019 
00020 #include <iosfwd>
00021 #include <map>
00022 #include <memory>
00023 #include <string>
00024 #include <vector>
00025 
00026 // ----------------------------------------------------------------------
00027 // contents
00028 namespace cms {
00029   class Digest;
00030 }
00031 
00032 namespace edm {
00033   typedef std::vector<ParameterSet> VParameterSet;
00034 
00035   class ParameterSet {
00036   public:
00037     enum Bool {
00038       False = 0,
00039       True = 1,
00040       Unknown = 2
00041     };
00042 
00043     // default-construct
00044     ParameterSet();
00045 
00046     // construct from coded string.
00047     explicit ParameterSet(std::string const& rep);
00048 
00049     // construct from coded string and id.  Will cause registration
00050     ParameterSet(std::string const& rep, ParameterSetID const& id);
00051 
00052     ~ParameterSet();
00053 
00054     // instantiate in this library, so these methods don't cause code bloat
00055     ParameterSet(ParameterSet const& other);
00056 
00057     ParameterSet& operator=(ParameterSet const& other);
00058 
00059     void swap(ParameterSet& other);
00060 
00061     void copyForModify(ParameterSet const& other);
00062 
00063     // identification
00064     ParameterSetID id() const;
00065     void setID(ParameterSetID const& id) const;
00066     bool isRegistered() const {return id_.isValid();}
00067     ParameterSetID trackedID() const {return id();} // to be phased out.
00068 
00069     // Entry-handling
00070     Entry const& retrieve(char const*) const;
00071     Entry const& retrieve(std::string const&) const;
00072     Entry const* retrieveUntracked(char const*) const;
00073     Entry const* retrieveUntracked(std::string const&) const;
00074     Entry const* retrieveUnknown(char const*) const;
00075     Entry const* retrieveUnknown(std::string const&) const;
00076     ParameterSetEntry const& retrieveParameterSet(std::string const&) const;
00077     ParameterSetEntry const* retrieveUntrackedParameterSet(std::string const&) const;
00078     ParameterSetEntry const* retrieveUnknownParameterSet(std::string const&) const;
00079     VParameterSetEntry const& retrieveVParameterSet(std::string const&) const;
00080     VParameterSetEntry const* retrieveUntrackedVParameterSet(std::string const&) const;
00081     VParameterSetEntry const* retrieveUnknownVParameterSet(std::string const&) const;
00082 
00083     void insertParameterSet(bool okay_to_replace, std::string const& name, ParameterSetEntry const& entry);
00084     void insertVParameterSet(bool okay_to_replace, std::string const& name, VParameterSetEntry const& entry);
00085     void insert(bool ok_to_replace, char const* , Entry const&);
00086     void insert(bool ok_to_replace, std::string const&, Entry const&);
00087     void augment(ParameterSet const& from);
00088     void copyFrom(ParameterSet const& from, std::string const& name);
00089     std::string getParameterAsString(std::string const& name) const;
00090 
00091     // encode only tracked parameters
00092     std::string toString() const;
00093     void toString(std::string& result) const;
00094     void toDigest(cms::Digest &digest) const;
00095 
00096     //encode tracked and untracked parameters
00097     void allToString(std::string& result) const;
00098 
00099     template<typename T>
00100     T
00101     getParameter(std::string const&) const;
00102 
00103     template<typename T>
00104     T
00105     getParameter(char const*) const;
00106 
00107     ParameterSet const&
00108     getParameterSet(std::string const&) const;
00109 
00110     ParameterSet const&
00111     getParameterSet(char const*) const;
00112 
00113     ParameterSet const&
00114     getUntrackedParameterSet(std::string const& name, ParameterSet const& defaultValue) const;
00115 
00116     ParameterSet const&
00117     getUntrackedParameterSet(char const* name, ParameterSet const& defaultValue) const;
00118 
00119     ParameterSet const&
00120     getUntrackedParameterSet(std::string const& name) const;
00121 
00122     ParameterSet const&
00123     getUntrackedParameterSet(char const* name) const;
00124 
00125     VParameterSet const&
00126     getParameterSetVector(std::string const& name) const;
00127 
00128     VParameterSet const&
00129     getParameterSetVector(char const* name) const;
00130 
00131     VParameterSet const&
00132     getUntrackedParameterSetVector(std::string const& name, VParameterSet const& defaultValue) const;
00133 
00134     VParameterSet const&
00135     getUntrackedParameterSetVector(char const* name, VParameterSet const& defaultValue) const;
00136 
00137     VParameterSet const&
00138     getUntrackedParameterSetVector(std::string const& name) const;
00139 
00140     VParameterSet const&
00141     getUntrackedParameterSetVector(char const* name) const;
00142 
00143     template<typename T>
00144     void
00145     addParameter(std::string const& name, T const& value) {
00146       invalidateRegistration(name);
00147       insert(true, name, Entry(name, value, true));
00148     }
00149 
00150     template<typename T>
00151     void
00152     addParameter(char const* name, T const& value) {
00153       invalidateRegistration(name);
00154       insert(true, name, Entry(name, value, true));
00155     }
00156 
00157     template<typename T>
00158     T
00159     getUntrackedParameter(std::string const&, T const&) const;
00160 
00161     template<typename T>
00162     T
00163     getUntrackedParameter(char const*, T const&) const;
00164 
00165     template<typename T>
00166     T
00167     getUntrackedParameter(std::string const&) const;
00168 
00169     template<typename T>
00170     T
00171     getUntrackedParameter(char const*) const;
00172 
00177     std::vector<FileInPath>::size_type
00178     getAllFileInPaths(std::vector<FileInPath>& output) const;
00179 
00180     std::vector<std::string> getParameterNames() const;
00181 
00183     bool exists(std::string const& parameterName) const;
00184 
00186     template<typename T>
00187     bool existsAs(std::string const& parameterName, bool trackiness=true) const {
00188        std::vector<std::string> names = getParameterNamesForType<T>(trackiness);
00189        return std::find(names.begin(), names.end(), parameterName) != names.end();
00190     }
00191 
00192     void deprecatedInputTagWarning(std::string const& name, std::string const& label) const;
00193 
00194     template<typename T>
00195     std::vector<std::string> getParameterNamesForType(bool trackiness = true) const {
00196       std::vector<std::string> result;
00197       // This is icky, but I don't know of another way in the current
00198       // code to get at the character code that denotes type T.
00199       T value = T();
00200       Entry type_translator("", value, trackiness);
00201       char type_code = type_translator.typeCode();
00202 
00203       (void)getNamesByCode_(type_code, trackiness, result);
00204       return result;
00205     }
00206 
00207     template<typename T>
00208     void
00209     addUntrackedParameter(std::string const& name, T const& value) {
00210       insert(true, name, Entry(name, value, false));
00211     }
00212 
00213     template<typename T>
00214     void
00215     addUntrackedParameter(char const* name, T const& value) {
00216       insert(true, name, Entry(name, value, false));
00217     }
00218 
00219     bool empty() const {
00220       return tbl_.empty() && psetTable_.empty() && vpsetTable_.empty();
00221     }
00222 
00223     ParameterSet trackedPart() const;
00224 
00225     // Return the names of all parameters of type ParameterSet,
00226     // pushing the names into the argument 'output'. Return the number
00227     // of names pushed into the vector. If 'trackiness' is true, we
00228     // return tracked parameters; if 'trackiness' is false, w return
00229     // untracked parameters.
00230     size_t getParameterSetNames(std::vector<std::string>& output,
00231                                 bool trackiness = true) const;
00232     size_t getParameterSetNames(std::vector<std::string>& output);
00233     // Return the names of all parameters of type
00234     // vector<ParameterSet>, pushing the names into the argument
00235     // 'output'. Return the number of names pushed into the vector. If
00236     // 'trackiness' is true, we return tracked parameters; if
00237     // 'trackiness' is false, w return untracked parameters.
00238     size_t getParameterSetVectorNames(std::vector<std::string>& output,
00239                                       bool trackiness=true) const;
00240 
00241     // need a simple interface for python
00242     std::string dump() const;
00243 
00244     friend std::ostream& operator << (std::ostream& os, ParameterSet const& pset);
00245 
00246     ParameterSet const& registerIt();
00247 
00248     std::auto_ptr<ParameterSet> popParameterSet(std::string const& name);
00249     void eraseSimpleParameter(std::string const& name);
00250     void eraseOrSetUntrackedParameterSet(std::string const& name);
00251 
00252     std::auto_ptr<std::vector<ParameterSet> > popVParameterSet(std::string const& name);
00253 
00254     typedef std::map<std::string, Entry> table;
00255     table const& tbl() const {return tbl_;}
00256 
00257     typedef std::map<std::string, ParameterSetEntry> psettable;
00258     psettable const& psetTable() const {return psetTable_;}
00259 
00260     typedef std::map<std::string, VParameterSetEntry> vpsettable;
00261     vpsettable const& vpsetTable() const {return vpsetTable_;}
00262 
00263     ParameterSet*
00264     getPSetForUpdate(std::string const& name, bool& isTracked);
00265 
00266     ParameterSet*
00267     getPSetForUpdate(std::string const& name) {
00268       bool isTracked = false;
00269       return getPSetForUpdate(name, isTracked);
00270     }
00271 
00272     VParameterSetEntry*
00273     getPSetVectorForUpdate(std::string const& name);
00274 
00275   private:
00276     // decode
00277     bool fromString(std::string const&);
00278 
00279     void toStringImp(std::string&, bool useAll) const;
00280 
00281     table tbl_;
00282     psettable psetTable_;
00283     vpsettable vpsetTable_;
00284 
00285     // If the id_ is invalid, that means a new value should be
00286     // calculated before the value is returned. Upon registration, the
00287     // id_ is made valid. Updating any tracked parameter invalidates the id_.
00288     mutable ParameterSetID id_;
00289 
00290     void invalidateRegistration(std::string const& nameOfTracked) const;
00291 
00292     void calculateID();
00293 
00294     // get the untracked Entry object, throwing an exception if it is
00295     // not found.
00296     Entry const* getEntryPointerOrThrow_(std::string const& name) const;
00297     Entry const* getEntryPointerOrThrow_(char const* name) const;
00298 
00299     // Return the names of all the entries with the given typecode and
00300     // given status (trackiness)
00301     size_t getNamesByCode_(char code,
00302                            bool trackiness,
00303                            std::vector<std::string>& output) const;
00304 
00305 
00306   };  // ParameterSet
00307 
00308   inline
00309   void swap (ParameterSet& a, ParameterSet& b) {
00310     a.swap(b);
00311   }
00312 
00313   bool operator==(ParameterSet const& a, ParameterSet const& b);
00314 
00315   bool isTransientEqual(ParameterSet const& a, ParameterSet const& b);
00316 
00317   inline
00318   bool
00319   operator!=(ParameterSet const& a, ParameterSet const& b) {
00320     return !(a == b);
00321   }
00322 
00323   // Free function to retrieve a parameter set, given the parameter set ID.
00324   ParameterSet const&
00325   getParameterSet(ParameterSetID const& id);
00326 
00327   // specializations
00328   // ----------------------------------------------------------------------
00329 
00330   template<>
00331   bool
00332   ParameterSet::getParameter<bool>(std::string const& name) const;
00333 
00334   // ----------------------------------------------------------------------
00335   // Int32, vInt32
00336 
00337   template<>
00338   int
00339   ParameterSet::getParameter<int>(std::string const& name) const;
00340 
00341   template<>
00342   std::vector<int>
00343   ParameterSet::getParameter<std::vector<int> >(std::string const& name) const;
00344 
00345  // ----------------------------------------------------------------------
00346   // Int64, vInt64
00347 
00348   template<>
00349   long long
00350   ParameterSet::getParameter<long long>(std::string const& name) const;
00351 
00352   template<>
00353   std::vector<long long>
00354   ParameterSet::getParameter<std::vector<long long> >(std::string const& name) const;
00355 
00356   // ----------------------------------------------------------------------
00357   // Uint32, vUint32
00358 
00359   template<>
00360   unsigned int
00361   ParameterSet::getParameter<unsigned int>(std::string const& name) const;
00362 
00363   template<>
00364   std::vector<unsigned int>
00365   ParameterSet::getParameter<std::vector<unsigned int> >(std::string const& name) const;
00366 
00367   // ----------------------------------------------------------------------
00368   // Uint64, vUint64
00369 
00370   template<>
00371   unsigned long long
00372   ParameterSet::getParameter<unsigned long long>(std::string const& name) const;
00373 
00374   template<>
00375   std::vector<unsigned long long>
00376   ParameterSet::getParameter<std::vector<unsigned long long> >(std::string const& name) const;
00377 
00378   // ----------------------------------------------------------------------
00379   // Double, vDouble
00380 
00381   template<>
00382   double
00383   ParameterSet::getParameter<double>(std::string const& name) const;
00384 
00385   template<>
00386   std::vector<double>
00387   ParameterSet::getParameter<std::vector<double> >(std::string const& name) const;
00388 
00389   // ----------------------------------------------------------------------
00390   // String, vString
00391 
00392   template<>
00393   std::string
00394   ParameterSet::getParameter<std::string>(std::string const& name) const;
00395 
00396   template<>
00397   std::vector<std::string>
00398   ParameterSet::getParameter<std::vector<std::string> >(std::string const& name) const;
00399 
00400   // ----------------------------------------------------------------------
00401   // FileInPath
00402 
00403   template<>
00404   FileInPath
00405   ParameterSet::getParameter<FileInPath>(std::string const& name) const;
00406 
00407   // FileInPath can't default-construct something useful, so we specialize
00408   // this template
00409   template<>
00410   std::vector<std::string>
00411   ParameterSet::getParameterNamesForType<FileInPath>(bool trackiness) const;
00412 
00413   // ----------------------------------------------------------------------
00414   // InputTag
00415 
00416   template<>
00417   InputTag
00418   ParameterSet::getParameter<InputTag>(std::string const& name) const;
00419 
00420   // ----------------------------------------------------------------------
00421   // VInputTag
00422 
00423   template<>
00424   std::vector<InputTag>
00425   ParameterSet::getParameter<std::vector<InputTag> >(std::string const& name) const;
00426 
00427    // ----------------------------------------------------------------------
00428    // ESInputTag
00429 
00430    template<>
00431    ESInputTag
00432    ParameterSet::getParameter<ESInputTag>(std::string const& name) const;
00433 
00434    // ----------------------------------------------------------------------
00435    // VESInputTag
00436 
00437    template<>
00438    std::vector<ESInputTag>
00439    ParameterSet::getParameter<std::vector<ESInputTag> >(std::string const& name) const;
00440 
00441   // ----------------------------------------------------------------------
00442   // EventID
00443 
00444   template<>
00445   EventID
00446   ParameterSet::getParameter<EventID>(std::string const& name) const;
00447 
00448   // ----------------------------------------------------------------------
00449   // VEventID
00450 
00451   template<>
00452   std::vector<EventID>
00453   ParameterSet::getParameter<std::vector<EventID> >(std::string const& name) const;
00454 
00455   // ----------------------------------------------------------------------
00456   // LuminosityBlockID
00457 
00458   template<>
00459   LuminosityBlockID
00460   ParameterSet::getParameter<LuminosityBlockID>(std::string const& name) const;
00461 
00462   // ----------------------------------------------------------------------
00463   // VLuminosityBlockID
00464 
00465   template<>
00466   std::vector<LuminosityBlockID>
00467   ParameterSet::getParameter<std::vector<LuminosityBlockID> >(std::string const& name) const;
00468 
00469   // ----------------------------------------------------------------------
00470   // EventRange
00471 
00472   template<>
00473   EventRange
00474   ParameterSet::getParameter<EventRange>(std::string const& name) const;
00475 
00476   // ----------------------------------------------------------------------
00477   // VEventRange
00478 
00479   template<>
00480   std::vector<EventRange>
00481   ParameterSet::getParameter<std::vector<EventRange> >(std::string const& name) const;
00482 
00483   // ----------------------------------------------------------------------
00484   // LuminosityBlockRange
00485 
00486   template<>
00487   LuminosityBlockRange
00488   ParameterSet::getParameter<LuminosityBlockRange>(std::string const& name) const;
00489 
00490   // ----------------------------------------------------------------------
00491   // VLuminosityBlockRange
00492 
00493   template<>
00494   std::vector<LuminosityBlockRange>
00495   ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(std::string const& name) const;
00496 
00497   // ----------------------------------------------------------------------
00498   // PSet, vPSet
00499 
00500   template<>
00501   ParameterSet
00502   ParameterSet::getParameter<ParameterSet>(std::string const& name) const;
00503 
00504   template<>
00505   VParameterSet
00506   ParameterSet::getParameter<VParameterSet>(std::string const& name) const;
00507 
00508   template<>
00509   void
00510   ParameterSet::addParameter<ParameterSet>(std::string const& name, ParameterSet const& value);
00511 
00512   template<>
00513   void
00514   ParameterSet::addParameter<ParameterSet>(char const* name, ParameterSet const& value);
00515 
00516   template<>
00517   void
00518   ParameterSet::addUntrackedParameter<ParameterSet>(std::string const& name, ParameterSet const& value);
00519 
00520   template<>
00521   void
00522   ParameterSet::addUntrackedParameter<ParameterSet>(char const* name, ParameterSet const& value);
00523 
00524   template<>
00525   void
00526   ParameterSet::addParameter<VParameterSet>(std::string const& name, VParameterSet const& value);
00527 
00528   template<>
00529   void
00530   ParameterSet::addParameter<VParameterSet>(char const* name, VParameterSet const& value);
00531 
00532   template<>
00533   void
00534   ParameterSet::addUntrackedParameter<VParameterSet>(std::string const& name, VParameterSet const& value);
00535 
00536   template<>
00537   void
00538   ParameterSet::addUntrackedParameter<VParameterSet>(char const* name, VParameterSet const& value);
00539 
00540   // untracked parameters
00541 
00542   // ----------------------------------------------------------------------
00543   // Bool, vBool
00544 
00545   template<>
00546   bool
00547   ParameterSet::getUntrackedParameter<bool>(std::string const& name, bool const& defaultValue) const;
00548 
00549   template<>
00550   bool
00551   ParameterSet::getUntrackedParameter<bool>(std::string const& name) const;
00552 
00553   // ----------------------------------------------------------------------
00554   // Int32, vInt32
00555 
00556   template<>
00557   int
00558   ParameterSet::getUntrackedParameter<int>(std::string const& name, int const& defaultValue) const;
00559 
00560   template<>
00561   int
00562   ParameterSet::getUntrackedParameter<int>(std::string const& name) const;
00563 
00564   template<>
00565   std::vector<int>
00566   ParameterSet::getUntrackedParameter<std::vector<int> >(std::string const& name, std::vector<int> const& defaultValue) const;
00567 
00568   template<>
00569   std::vector<int>
00570   ParameterSet::getUntrackedParameter<std::vector<int> >(std::string const& name) const;
00571 
00572   // ----------------------------------------------------------------------
00573   // Uint32, vUint32
00574 
00575   template<>
00576   unsigned int
00577   ParameterSet::getUntrackedParameter<unsigned int>(std::string const& name, unsigned int const& defaultValue) const;
00578 
00579   template<>
00580   unsigned int
00581   ParameterSet::getUntrackedParameter<unsigned int>(std::string const& name) const;
00582 
00583   template<>
00584   std::vector<unsigned int>
00585   ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(std::string const& name, std::vector<unsigned int> const& defaultValue) const;
00586 
00587   template<>
00588   std::vector<unsigned int>
00589   ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(std::string const& name) const;
00590 
00591   // ----------------------------------------------------------------------
00592   // Uint64, vUint64
00593 
00594   template<>
00595   unsigned long long
00596   ParameterSet::getUntrackedParameter<unsigned long long>(std::string const& name, unsigned long long const& defaultValue) const;
00597 
00598   template<>
00599   unsigned long long
00600   ParameterSet::getUntrackedParameter<unsigned long long>(std::string const& name) const;
00601 
00602   template<>
00603   std::vector<unsigned long long>
00604   ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(std::string const& name, std::vector<unsigned long long> const& defaultValue) const;
00605 
00606   template<>
00607   std::vector<unsigned long long>
00608   ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(std::string const& name) const;
00609 
00610   // ----------------------------------------------------------------------
00611   // Int64, Vint64
00612 
00613   template<>
00614   long long
00615   ParameterSet::getUntrackedParameter<long long>(std::string const& name, long long const& defaultValue) const;
00616 
00617   template<>
00618   long long
00619   ParameterSet::getUntrackedParameter<long long>(std::string const& name) const;
00620 
00621   template<>
00622   std::vector<long long>
00623   ParameterSet::getUntrackedParameter<std::vector<long long> >(std::string const& name, std::vector<long long> const& defaultValue) const;
00624 
00625   template<>
00626   std::vector<long long>
00627   ParameterSet::getUntrackedParameter<std::vector<long long> >(std::string const& name) const;
00628 
00629   // ----------------------------------------------------------------------
00630   // Double, vDouble
00631 
00632   template<>
00633   double
00634   ParameterSet::getUntrackedParameter<double>(std::string const& name, double const& defaultValue) const;
00635 
00636   template<>
00637   double
00638   ParameterSet::getUntrackedParameter<double>(std::string const& name) const;
00639 
00640   template<>
00641   std::vector<double>
00642   ParameterSet::getUntrackedParameter<std::vector<double> >(std::string const& name, std::vector<double> const& defaultValue) const;
00643 
00644   template<>
00645   std::vector<double>
00646   ParameterSet::getUntrackedParameter<std::vector<double> >(std::string const& name) const;
00647 
00648   // ----------------------------------------------------------------------
00649   // String, vString
00650 
00651   template<>
00652   std::string
00653   ParameterSet::getUntrackedParameter<std::string>(std::string const& name, std::string const& defaultValue) const;
00654 
00655   template<>
00656   std::string
00657   ParameterSet::getUntrackedParameter<std::string>(std::string const& name) const;
00658 
00659   template<>
00660   std::vector<std::string>
00661   ParameterSet::getUntrackedParameter<std::vector<std::string> >(std::string const& name, std::vector<std::string> const& defaultValue) const;
00662 
00663   template<>
00664   std::vector<std::string>
00665   ParameterSet::getUntrackedParameter<std::vector<std::string> >(std::string const& name) const;
00666 
00667   // ----------------------------------------------------------------------
00668   //  FileInPath
00669 
00670   template<>
00671   FileInPath
00672   ParameterSet::getUntrackedParameter<FileInPath>(std::string const& name, FileInPath const& defaultValue) const;
00673 
00674   template<>
00675   FileInPath
00676   ParameterSet::getUntrackedParameter<FileInPath>(std::string const& name) const;
00677 
00678   // ----------------------------------------------------------------------
00679   // InputTag, VInputTag
00680 
00681   template<>
00682   InputTag
00683   ParameterSet::getUntrackedParameter<InputTag>(std::string const& name, InputTag const& defaultValue) const;
00684 
00685   template<>
00686   InputTag
00687   ParameterSet::getUntrackedParameter<InputTag>(std::string const& name) const;
00688 
00689   template<>
00690   std::vector<InputTag>
00691   ParameterSet::getUntrackedParameter<std::vector<InputTag> >(std::string const& name,
00692                                       std::vector<InputTag> const& defaultValue) const;
00693 
00694   template<>
00695   std::vector<InputTag>
00696   ParameterSet::getUntrackedParameter<std::vector<InputTag> >(std::string const& name) const;
00697 
00698   // ----------------------------------------------------------------------
00699   // EventID, VEventID
00700 
00701   template<>
00702   EventID
00703   ParameterSet::getUntrackedParameter<EventID>(std::string const& name, EventID const& defaultValue) const;
00704 
00705   template<>
00706   EventID
00707   ParameterSet::getUntrackedParameter<EventID>(std::string const& name) const;
00708 
00709   template<>
00710   std::vector<EventID>
00711   ParameterSet::getUntrackedParameter<std::vector<EventID> >(std::string const& name,
00712                                       std::vector<EventID> const& defaultValue) const;
00713   template<>
00714   std::vector<EventID>
00715   ParameterSet::getUntrackedParameter<std::vector<EventID> >(std::string const& name) const;
00716 
00717   // ----------------------------------------------------------------------
00718   // LuminosityBlockID, VLuminosityBlockID
00719 
00720   template<>
00721   LuminosityBlockID
00722   ParameterSet::getUntrackedParameter<LuminosityBlockID>(std::string const& name, LuminosityBlockID const& defaultValue) const;
00723 
00724   template<>
00725   LuminosityBlockID
00726   ParameterSet::getUntrackedParameter<LuminosityBlockID>(std::string const& name) const;
00727 
00728   template<>
00729   std::vector<LuminosityBlockID>
00730   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(std::string const& name,
00731                                       std::vector<LuminosityBlockID> const& defaultValue) const;
00732   template<>
00733   std::vector<LuminosityBlockID>
00734   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(std::string const& name) const;
00735 
00736   // ----------------------------------------------------------------------
00737   // EventRange, VEventRange
00738 
00739   template<>
00740   EventRange
00741   ParameterSet::getUntrackedParameter<EventRange>(std::string const& name, EventRange const& defaultValue) const;
00742 
00743   template<>
00744   EventRange
00745   ParameterSet::getUntrackedParameter<EventRange>(std::string const& name) const;
00746 
00747   template<>
00748   std::vector<EventRange>
00749   ParameterSet::getUntrackedParameter<std::vector<EventRange> >(std::string const& name,
00750                                       std::vector<EventRange> const& defaultValue) const;
00751   template<>
00752   std::vector<EventRange>
00753   ParameterSet::getUntrackedParameter<std::vector<EventRange> >(std::string const& name) const;
00754 
00755   // ----------------------------------------------------------------------
00756   // LuminosityBlockRange, VLuminosityBlockRange
00757 
00758   template<>
00759   LuminosityBlockRange
00760   ParameterSet::getUntrackedParameter<LuminosityBlockRange>(std::string const& name, LuminosityBlockRange const& defaultValue) const;
00761 
00762   template<>
00763   LuminosityBlockRange
00764   ParameterSet::getUntrackedParameter<LuminosityBlockRange>(std::string const& name) const;
00765 
00766   template<>
00767   std::vector<LuminosityBlockRange>
00768   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(std::string const& name,
00769                                       std::vector<LuminosityBlockRange> const& defaultValue) const;
00770   template<>
00771   std::vector<LuminosityBlockRange>
00772   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(std::string const& name) const;
00773 
00774   // specializations
00775   // ----------------------------------------------------------------------
00776   // Bool, vBool
00777 
00778   template<>
00779   bool
00780   ParameterSet::getParameter<bool>(char const* name) const;
00781 
00782   // ----------------------------------------------------------------------
00783   // Int32, vInt32
00784 
00785   template<>
00786   int
00787   ParameterSet::getParameter<int>(char const* name) const;
00788 
00789   template<>
00790   std::vector<int>
00791   ParameterSet::getParameter<std::vector<int> >(char const* name) const;
00792 
00793  // ----------------------------------------------------------------------
00794   // Int64, vInt64
00795 
00796   template<>
00797   long long
00798   ParameterSet::getParameter<long long>(char const* name) const;
00799 
00800   template<>
00801   std::vector<long long>
00802   ParameterSet::getParameter<std::vector<long long> >(char const* name) const;
00803 
00804   // ----------------------------------------------------------------------
00805   // Uint32, vUint32
00806 
00807   template<>
00808   unsigned int
00809   ParameterSet::getParameter<unsigned int>(char const* name) const;
00810 
00811   template<>
00812   std::vector<unsigned int>
00813   ParameterSet::getParameter<std::vector<unsigned int> >(char const* name) const;
00814 
00815   // ----------------------------------------------------------------------
00816   // Uint64, vUint64
00817 
00818   template<>
00819   unsigned long long
00820   ParameterSet::getParameter<unsigned long long>(char const* name) const;
00821 
00822   template<>
00823   std::vector<unsigned long long>
00824   ParameterSet::getParameter<std::vector<unsigned long long> >(char const* name) const;
00825 
00826   // ----------------------------------------------------------------------
00827   // Double, vDouble
00828 
00829   template<>
00830   double
00831   ParameterSet::getParameter<double>(char const* name) const;
00832 
00833   template<>
00834   std::vector<double>
00835   ParameterSet::getParameter<std::vector<double> >(char const* name) const;
00836 
00837   // ----------------------------------------------------------------------
00838   // String, vString
00839 
00840   template<>
00841   std::string
00842   ParameterSet::getParameter<std::string>(char const* name) const;
00843 
00844   template<>
00845   std::vector<std::string>
00846   ParameterSet::getParameter<std::vector<std::string> >(char const* name) const;
00847 
00848   // ----------------------------------------------------------------------
00849   // FileInPath
00850 
00851   template<>
00852   FileInPath
00853   ParameterSet::getParameter<FileInPath>(char const* name) const;
00854 
00855   // ----------------------------------------------------------------------
00856   // InputTag
00857 
00858   template<>
00859   InputTag
00860   ParameterSet::getParameter<InputTag>(char const* name) const;
00861 
00862   // ----------------------------------------------------------------------
00863   // VInputTag
00864 
00865   template<>
00866   std::vector<InputTag>
00867   ParameterSet::getParameter<std::vector<InputTag> >(char const* name) const;
00868 
00869   // ----------------------------------------------------------------------
00870   // EventID
00871 
00872   template<>
00873   EventID
00874   ParameterSet::getParameter<EventID>(char const* name) const;
00875 
00876   // ----------------------------------------------------------------------
00877   // VEventID
00878 
00879   template<>
00880   std::vector<EventID>
00881   ParameterSet::getParameter<std::vector<EventID> >(char const* name) const;
00882 
00883   // ----------------------------------------------------------------------
00884   // LuminosityBlockID
00885 
00886   template<>
00887   LuminosityBlockID
00888   ParameterSet::getParameter<LuminosityBlockID>(char const* name) const;
00889 
00890   // ----------------------------------------------------------------------
00891   // VLuminosityBlockID
00892 
00893   template<>
00894   std::vector<LuminosityBlockID>
00895   ParameterSet::getParameter<std::vector<LuminosityBlockID> >(char const* name) const;
00896 
00897   // ----------------------------------------------------------------------
00898   // EventRange
00899 
00900   template<>
00901   EventRange
00902   ParameterSet::getParameter<EventRange>(char const* name) const;
00903 
00904   // ----------------------------------------------------------------------
00905   // VEventRange
00906 
00907   template<>
00908   std::vector<EventRange>
00909   ParameterSet::getParameter<std::vector<EventRange> >(char const* name) const;
00910 
00911   // ----------------------------------------------------------------------
00912   // LuminosityBlockRange
00913 
00914   template<>
00915   LuminosityBlockRange
00916   ParameterSet::getParameter<LuminosityBlockRange>(char const* name) const;
00917 
00918   // ----------------------------------------------------------------------
00919   // VLuminosityBlockRange
00920 
00921   template<>
00922   std::vector<LuminosityBlockRange>
00923   ParameterSet::getParameter<std::vector<LuminosityBlockRange> >(char const* name) const;
00924 
00925   // ----------------------------------------------------------------------
00926   // PSet, vPSet
00927 
00928   template<>
00929   ParameterSet
00930   ParameterSet::getParameter<ParameterSet>(char const* name) const;
00931 
00932   template<>
00933   VParameterSet
00934   ParameterSet::getParameter<VParameterSet>(char const* name) const;
00935 
00936   // untracked parameters
00937 
00938   // ----------------------------------------------------------------------
00939   // Bool, vBool
00940 
00941   template<>
00942   bool
00943   ParameterSet::getUntrackedParameter<bool>(char const* name, bool const& defaultValue) const;
00944 
00945   template<>
00946   bool
00947   ParameterSet::getUntrackedParameter<bool>(char const* name) const;
00948 
00949   // ----------------------------------------------------------------------
00950   // Int32, vInt32
00951 
00952   template<>
00953   int
00954   ParameterSet::getUntrackedParameter<int>(char const* name, int const& defaultValue) const;
00955 
00956   template<>
00957   int
00958   ParameterSet::getUntrackedParameter<int>(char const* name) const;
00959 
00960   template<>
00961   std::vector<int>
00962   ParameterSet::getUntrackedParameter<std::vector<int> >(char const* name, std::vector<int> const& defaultValue) const;
00963 
00964   template<>
00965   std::vector<int>
00966   ParameterSet::getUntrackedParameter<std::vector<int> >(char const* name) const;
00967 
00968   // ----------------------------------------------------------------------
00969   // Uint32, vUint32
00970 
00971   template<>
00972   unsigned int
00973   ParameterSet::getUntrackedParameter<unsigned int>(char const* name, unsigned int const& defaultValue) const;
00974 
00975   template<>
00976   unsigned int
00977   ParameterSet::getUntrackedParameter<unsigned int>(char const* name) const;
00978 
00979   template<>
00980   std::vector<unsigned int>
00981   ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(char const* name, std::vector<unsigned int> const& defaultValue) const;
00982 
00983   template<>
00984   std::vector<unsigned int>
00985   ParameterSet::getUntrackedParameter<std::vector<unsigned int> >(char const* name) const;
00986 
00987   // ----------------------------------------------------------------------
00988   // Uint64, vUint64
00989 
00990   template<>
00991   unsigned long long
00992   ParameterSet::getUntrackedParameter<unsigned long long>(char const* name, unsigned long long const& defaultValue) const;
00993 
00994   template<>
00995   unsigned long long
00996   ParameterSet::getUntrackedParameter<unsigned long long>(char const* name) const;
00997 
00998   template<>
00999   std::vector<unsigned long long>
01000   ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(char const* name, std::vector<unsigned long long> const& defaultValue) const;
01001 
01002   template<>
01003   std::vector<unsigned long long>
01004   ParameterSet::getUntrackedParameter<std::vector<unsigned long long> >(char const* name) const;
01005 
01006   // ----------------------------------------------------------------------
01007   // Int64, Vint64
01008 
01009   template<>
01010   long long
01011   ParameterSet::getUntrackedParameter<long long>(char const* name, long long const& defaultValue) const;
01012 
01013   template<>
01014   long long
01015   ParameterSet::getUntrackedParameter<long long>(char const* name) const;
01016 
01017   template<>
01018   std::vector<long long>
01019   ParameterSet::getUntrackedParameter<std::vector<long long> >(char const* name, std::vector<long long> const& defaultValue) const;
01020 
01021   template<>
01022   std::vector<long long>
01023   ParameterSet::getUntrackedParameter<std::vector<long long> >(char const* name) const;
01024 
01025   // ----------------------------------------------------------------------
01026   // Double, vDouble
01027 
01028   template<>
01029   double
01030   ParameterSet::getUntrackedParameter<double>(char const* name, double const& defaultValue) const;
01031 
01032   template<>
01033   double
01034   ParameterSet::getUntrackedParameter<double>(char const* name) const;
01035 
01036   template<>
01037   std::vector<double>
01038   ParameterSet::getUntrackedParameter<std::vector<double> >(char const* name, std::vector<double> const& defaultValue) const;
01039 
01040   template<>
01041   std::vector<double>
01042   ParameterSet::getUntrackedParameter<std::vector<double> >(char const* name) const;
01043 
01044   // ----------------------------------------------------------------------
01045   // String, vString
01046 
01047   template<>
01048   std::string
01049   ParameterSet::getUntrackedParameter<std::string>(char const* name, std::string const& defaultValue) const;
01050 
01051   template<>
01052   std::string
01053   ParameterSet::getUntrackedParameter<std::string>(char const* name) const;
01054 
01055   template<>
01056   std::vector<std::string>
01057   ParameterSet::getUntrackedParameter<std::vector<std::string> >(char const* name, std::vector<std::string> const& defaultValue) const;
01058 
01059   template<>
01060   std::vector<std::string>
01061   ParameterSet::getUntrackedParameter<std::vector<std::string> >(char const* name) const;
01062 
01063   // ----------------------------------------------------------------------
01064   //  FileInPath
01065 
01066   template<>
01067   FileInPath
01068   ParameterSet::getUntrackedParameter<FileInPath>(char const* name, FileInPath const& defaultValue) const;
01069 
01070   template<>
01071   FileInPath
01072   ParameterSet::getUntrackedParameter<FileInPath>(char const* name) const;
01073 
01074   // ----------------------------------------------------------------------
01075   // InputTag, VInputTag
01076 
01077   template<>
01078   InputTag
01079   ParameterSet::getUntrackedParameter<InputTag>(char const* name, InputTag const& defaultValue) const;
01080 
01081   template<>
01082   InputTag
01083   ParameterSet::getUntrackedParameter<InputTag>(char const* name) const;
01084 
01085   template<>
01086   std::vector<InputTag>
01087   ParameterSet::getUntrackedParameter<std::vector<InputTag> >(char const* name,
01088                                       std::vector<InputTag> const& defaultValue) const;
01089 
01090   template<>
01091   std::vector<InputTag>
01092   ParameterSet::getUntrackedParameter<std::vector<InputTag> >(char const* name) const;
01093 
01094   // ----------------------------------------------------------------------
01095   // EventID, VEventID
01096 
01097   template<>
01098   EventID
01099   ParameterSet::getUntrackedParameter<EventID>(char const* name, EventID const& defaultValue) const;
01100 
01101   template<>
01102   EventID
01103   ParameterSet::getUntrackedParameter<EventID>(char const* name) const;
01104 
01105   template<>
01106   std::vector<EventID>
01107   ParameterSet::getUntrackedParameter<std::vector<EventID> >(char const* name,
01108                                       std::vector<EventID> const& defaultValue) const;
01109   template<>
01110   std::vector<EventID>
01111   ParameterSet::getUntrackedParameter<std::vector<EventID> >(char const* name) const;
01112 
01113   // ----------------------------------------------------------------------
01114   // LuminosityBlockID, VLuminosityBlockID
01115 
01116   template<>
01117   LuminosityBlockID
01118   ParameterSet::getUntrackedParameter<LuminosityBlockID>(char const* name, LuminosityBlockID const& defaultValue) const;
01119 
01120   template<>
01121   LuminosityBlockID
01122   ParameterSet::getUntrackedParameter<LuminosityBlockID>(char const* name) const;
01123 
01124   template<>
01125   std::vector<LuminosityBlockID>
01126   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(char const* name,
01127                                       std::vector<LuminosityBlockID> const& defaultValue) const;
01128   template<>
01129   std::vector<LuminosityBlockID>
01130   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockID> >(char const* name) const;
01131 
01132   // ----------------------------------------------------------------------
01133   // EventRange, VEventRange
01134 
01135   template<>
01136   EventRange
01137   ParameterSet::getUntrackedParameter<EventRange>(char const* name, EventRange const& defaultValue) const;
01138 
01139   template<>
01140   EventRange
01141   ParameterSet::getUntrackedParameter<EventRange>(char const* name) const;
01142 
01143   template<>
01144   std::vector<EventRange>
01145   ParameterSet::getUntrackedParameter<std::vector<EventRange> >(char const* name,
01146                                       std::vector<EventRange> const& defaultValue) const;
01147   template<>
01148   std::vector<EventRange>
01149   ParameterSet::getUntrackedParameter<std::vector<EventRange> >(char const* name) const;
01150 
01151   // ----------------------------------------------------------------------
01152   // LuminosityBlockRange, VLuminosityBlockRange
01153 
01154   template<>
01155   LuminosityBlockRange
01156   ParameterSet::getUntrackedParameter<LuminosityBlockRange>(char const* name, LuminosityBlockRange const& defaultValue) const;
01157 
01158   template<>
01159   LuminosityBlockRange
01160   ParameterSet::getUntrackedParameter<LuminosityBlockRange>(char const* name) const;
01161 
01162   template<>
01163   std::vector<LuminosityBlockRange>
01164   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(char const* name,
01165                                       std::vector<LuminosityBlockRange> const& defaultValue) const;
01166   template<>
01167   std::vector<LuminosityBlockRange>
01168   ParameterSet::getUntrackedParameter<std::vector<LuminosityBlockRange> >(char const* name) const;
01169 
01170   // ----------------------------------------------------------------------
01171   // PSet, vPSet
01172 
01173   template<>
01174   ParameterSet
01175   ParameterSet::getUntrackedParameter<ParameterSet>(char const* name, ParameterSet const& defaultValue) const;
01176 
01177   template<>
01178   ParameterSet
01179   ParameterSet::getUntrackedParameter<ParameterSet>(std::string const& name, ParameterSet const& defaultValue) const;
01180 
01181   template<>
01182   ParameterSet
01183   ParameterSet::getUntrackedParameter<ParameterSet>(char const* name) const;
01184 
01185   template<>
01186   ParameterSet
01187   ParameterSet::getUntrackedParameter<ParameterSet>(std::string const& name) const;
01188 
01189   template<>
01190   VParameterSet
01191   ParameterSet::getUntrackedParameter<VParameterSet>(char const* name, VParameterSet const& defaultValue) const;
01192 
01193   template<>
01194   VParameterSet
01195   ParameterSet::getUntrackedParameter<VParameterSet>(char const* name) const;
01196 
01197   template<>
01198   VParameterSet
01199   ParameterSet::getUntrackedParameter<VParameterSet>(std::string const& name, VParameterSet const& defaultValue) const;
01200 
01201   template<>
01202   VParameterSet
01203   ParameterSet::getUntrackedParameter<VParameterSet>(std::string const& name) const;
01204 
01205   template<>
01206   std::vector<std::string>
01207   ParameterSet::getParameterNamesForType<ParameterSet>(bool trackiness) const;
01208 
01209   template<>
01210   std::vector<std::string>
01211   ParameterSet::getParameterNamesForType<VParameterSet>(bool trackiness) const;
01212 
01213   ParameterSet::Bool
01214   operator&&(ParameterSet::Bool a, ParameterSet::Bool b);
01215 
01216 }  // namespace edm
01217 #endif