CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/Provenance/interface/ProcessConfiguration.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_ProcessConfiguration_h
00002 #define DataFormats_Provenance_ProcessConfiguration_h
00003 
00004 #include <iosfwd>
00005 #include <string>
00006 
00007 #include "DataFormats/Provenance/interface/ParameterSetID.h"
00008 #include "DataFormats/Provenance/interface/PassID.h"
00009 #include "DataFormats/Provenance/interface/ReleaseVersion.h"
00010 #include "DataFormats/Provenance/interface/ProcessConfigurationID.h"
00011 #include "DataFormats/Provenance/interface/Transient.h"
00012 
00013 namespace edm {
00014   class ProcessConfiguration {
00015   public:
00016     ProcessConfiguration();
00017     ProcessConfiguration(std::string const& procName,
00018                          ReleaseVersion const& relVersion,
00019                          PassID const& pass);
00020 
00021     ProcessConfiguration(std::string const& procName,
00022                          ParameterSetID const& pSetID,
00023                          ReleaseVersion const& relVersion,
00024                          PassID const& pass);
00025     
00026     std::string const& processName() const {return processName_;}
00027     ParameterSetID const& parameterSetID() const;
00028     bool isParameterSetValid() const {return parameterSetID_.isValid();}
00029     ReleaseVersion const& releaseVersion() const {return releaseVersion_;}
00030     PassID const& passID() const {return passID_;}
00031     ProcessConfigurationID id() const;
00032 
00033     void setParameterSetID(ParameterSetID const& pSetID);
00034 
00035     struct Transients {
00036       Transients() : pcid_(), isCurrentProcess_(false) {}
00037       ProcessConfigurationID pcid_;
00038       bool isCurrentProcess_;
00039     };
00040 
00041   private:
00042     ProcessConfigurationID& pcid() const {return transients_.get().pcid_;}
00043     bool& isCurrentProcess() const {return transients_.get().isCurrentProcess_;}
00044 
00045     std::string processName_;
00046     ParameterSetID parameterSetID_;
00047     ReleaseVersion releaseVersion_; 
00048     PassID passID_;
00049     mutable Transient<Transients> transients_;
00050   };
00051 
00052   bool
00053   operator<(ProcessConfiguration const& a, ProcessConfiguration const& b);
00054 
00055   inline
00056   bool
00057   operator==(ProcessConfiguration const& a, ProcessConfiguration const& b) {
00058     return a.processName() == b.processName() &&
00059     a.parameterSetID() == b.parameterSetID() &&
00060     a.releaseVersion() == b.releaseVersion() &&
00061     a.passID() == b.passID();
00062   }
00063 
00064   inline
00065   bool
00066   operator!=(ProcessConfiguration const& a, ProcessConfiguration const& b) {
00067     return !(a == b);
00068   }
00069 
00070   std::ostream&
00071   operator<< (std::ostream& os, ProcessConfiguration const& pc);
00072 }
00073 
00074 #endif