CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/FWCore/ParameterSet/interface/Registry.h

Go to the documentation of this file.
00001 #ifndef FWCore_ParameterSet_Registry_h
00002 #define FWCore_ParameterSet_Registry_h
00003 
00004 // ----------------------------------------------------------------------
00005 // Declaration for pset::Registry. This is an implementation detail of
00006 // the ParameterSet library.
00007 //
00008 // A Registry is used to keep track of the persistent form of all
00009 // ParameterSets used a given program, so that they may be retrieved by
00010 // ParameterSetID, and so they may be written to persistent storage.
00011 // ----------------------------------------------------------------------
00012 
00013 #include <map>
00014 
00015 #include "DataFormats/Provenance/interface/ParameterSetID.h"
00016 #include "DataFormats/Provenance/interface/ParameterSetBlob.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 #include "FWCore/Utilities/interface/ThreadSafeRegistry.h"
00019 
00020 
00021 
00022 namespace edm {
00023   namespace pset {
00024 
00025     class ProcessParameterSetIDCache {
00026     public:
00027       ProcessParameterSetIDCache() : id_() { }
00028       ParameterSetID id() const { return id_; }
00029       void setID(ParameterSetID const& id) { id_ = id; }
00030     private:
00031       ParameterSetID id_;      
00032     };
00033 
00034     typedef detail::ThreadSafeRegistry<ParameterSetID,
00035                                         ParameterSet,
00036                                         ProcessParameterSetIDCache>
00037                                         Registry;
00038 
00040 
00045     ParameterSetID getProcessParameterSetID(Registry const* reg);
00046 
00049     typedef std::map<ParameterSetID, ParameterSetBlob> regmap_type;
00050     void fillMap(Registry* reg, regmap_type& fillme);
00051 
00052   }  // namespace pset
00053 
00054   ParameterSet const& getProcessParameterSet();
00055 
00056 }  // namespace edm
00057 
00058 
00059 #endif