CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DataFormats/Provenance/interface/ModuleDescription.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_ModuleDescription_h
00002 #define DataFormats_Provenance_ModuleDescription_h
00003 
00004 /*----------------------------------------------------------------------
00005 
00006 ModuleDescription: The description of a producer module.
00007 
00008 ----------------------------------------------------------------------*/
00009 #include "DataFormats/Provenance/interface/ParameterSetID.h"
00010 #include "DataFormats/Provenance/interface/ProcessConfiguration.h"
00011 #include "DataFormats/Provenance/interface/ProcessConfigurationID.h"
00012 
00013 #include "boost/shared_ptr.hpp"
00014 
00015 #include <iosfwd>
00016 #include <string>
00017 
00018 namespace edm {
00019 
00020   // once a module is born, these parts of the module's product provenance
00021   // are constant   (change to ModuleDescription)
00022 
00023   class ModuleDescription {
00024   public:
00025 
00026     ModuleDescription();
00027 
00028     ModuleDescription(std::string const& modName,
00029                       std::string const& modLabel);
00030 
00031     ModuleDescription(std::string const& modName,
00032                       std::string const& modLabel,
00033                       ProcessConfiguration const* procConfig);
00034 
00035     ModuleDescription(ParameterSetID const& pid,
00036                       std::string const& modName,
00037                       std::string const& modLabel);
00038 
00039     ModuleDescription(ParameterSetID const& pid,
00040                       std::string const& modName,
00041                       std::string const& modLabel,
00042                       ProcessConfiguration const* procConfig);
00043 
00044     ~ModuleDescription();
00045 
00046     void write(std::ostream& os) const;
00047 
00048     ParameterSetID const& parameterSetID() const {return parameterSetID_;}
00049     std::string const& moduleName() const {return moduleName_;}
00050     std::string const& moduleLabel() const {return moduleLabel_;}
00051     ProcessConfiguration const& processConfiguration() const;
00052     ProcessConfigurationID processConfigurationID() const;
00053     std::string const& processName() const;
00054     std::string const& releaseVersion() const;
00055     std::string const& passID() const;
00056     ParameterSetID const& mainParameterSetID() const;
00057 
00058     // compiler-written copy c'tor, assignment, and d'tor are correct.
00059 
00060     bool operator<(ModuleDescription const& rh) const;
00061 
00062     bool operator==(ModuleDescription const& rh) const;
00063 
00064     bool operator!=(ModuleDescription const& rh) const;
00065 
00066   private:
00067 
00068     // ID of parameter set of the creator
00069     ParameterSetID parameterSetID_;
00070 
00071     // The class name of the creator
00072     std::string moduleName_;
00073 
00074     // A human friendly string that uniquely identifies the EDProducer
00075     // and becomes part of the identity of a product that it produces
00076     std::string moduleLabel_;
00077 
00078     // The process configuration.
00079     ProcessConfiguration const* processConfigurationPtr_;
00080   };
00081 
00082   inline
00083   std::ostream&
00084   operator<<(std::ostream& os, ModuleDescription const& p) {
00085     p.write(os);
00086     return os;
00087   }
00088 
00089 }
00090 #endif