CMS 3D CMS Logo

Registry.h

Go to the documentation of this file.
00001 #ifndef FWCore_ParameterSet_Registry_h
00002 #define FWCore_ParameterSet_Registry_h
00003 
00004 // ----------------------------------------------------------------------
00005 // $Id: Registry.h,v 1.12 2008/04/29 21:37:49 paterno Exp $
00006 //
00007 // Declaration for pset::Registry. This is an implementation detail of
00008 // the ParameterSet library.
00009 //
00010 // A Registry is used to keep track of the persistent form of all
00011 // ParameterSets used a given program, so that they may be retrieved by
00012 // ParameterSetID, and so they may be written to persistent storage.
00013 // ----------------------------------------------------------------------
00014 
00015 #include <map>
00016 
00017 #include "DataFormats/Provenance/interface/ParameterSetID.h"
00018 #include "DataFormats/Provenance/interface/ParameterSetBlob.h"
00019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00020 #include "FWCore/Utilities/interface/ThreadSafeRegistry.h"
00021 
00022 
00023 
00024 namespace edm
00025 {
00026   namespace pset
00027   {
00028 
00029     class ProcessParameterSetIDCache
00030     {
00031     public:
00032       ProcessParameterSetIDCache() : id_() { }
00033       edm::ParameterSetID id() const { return id_; }
00034       void setID(ParameterSetID const& id) { id_ = id; }
00035     private:
00036       edm::ParameterSetID id_;      
00037     };
00038 
00039     typedef edm::detail::ThreadSafeRegistry<edm::ParameterSetID,
00040                                             edm::ParameterSet,
00041                                             ProcessParameterSetIDCache>
00042                                             Registry;
00043 
00045 
00052 
00053     bool insertParameterSetIntoRegistry(Registry* reg,
00054                                         edm::ParameterSet const& p);
00055 
00056     void loadAllNestedParameterSets(Registry* reg,
00057                                     edm::ParameterSet const& main);
00058 
00059 
00064     edm::ParameterSetID getProcessParameterSetID(Registry const* reg);
00065 
00068     typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob> regmap_type;
00069     void fill(Registry* reg, regmap_type& fillme);
00070 
00071   }  // namespace pset
00072 
00073   ParameterSet getProcessParameterSet();
00074 
00075 }  // namespace edm
00076 
00077 
00078 #endif

Generated on Tue Jun 9 17:36:26 2009 for CMSSW by  doxygen 1.5.4