CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/ParameterSet/interface/ParameterSetEntry.h

Go to the documentation of this file.
00001 #ifndef ParameterSet_ParameterSetEntry_h
00002 #define ParameterSet_ParameterSetEntry_h
00003 
00010 #include "FWCore/Utilities/interface/value_ptr.h"
00011 #include "DataFormats/Provenance/interface/ParameterSetID.h"
00012 
00013 namespace edm {
00014 
00015   // forward declaration
00016   class ParameterSet;
00017 
00018   class ParameterSetEntry
00019   {
00020   public:
00021     // default ctor for serialization
00022     ParameterSetEntry();
00023     ParameterSetEntry(ParameterSet const& pset, bool isTracked);
00024     ParameterSetEntry(ParameterSetID const& id, bool isTracked);
00025     explicit ParameterSetEntry(std::string const& rep);
00026 
00027     ~ParameterSetEntry();
00028 
00029     std::string toString() const;
00030     void toString(std::string& result) const;
00031 
00032     bool isTracked() const {return isTracked_;}
00033 
00034     ParameterSetID id() const {return theID_;}
00035   
00038     ParameterSet const& pset() const;
00039     ParameterSet& pset();
00040 
00041     void updateID() const;
00042 
00043     friend std::ostream & operator<<(std::ostream & os, ParameterSetEntry const& psetEntry);
00044 
00045   private:
00046     
00047     bool isTracked_;
00048     // can be internally reconstituted from the ID, in an
00049     // ostensibly const function
00050     mutable value_ptr<ParameterSet> thePSet_;
00051 
00052     // mutable so save() can serialize it as late as possible
00053     mutable ParameterSetID theID_;
00054   };
00055 
00056 }
00057 
00058 #endif
00059