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 $Id: ModuleDescription.h,v 1.1 2007/03/04 04:48:09 wmtan Exp $ 00009 ----------------------------------------------------------------------*/ 00010 #include <string> 00011 #include <iosfwd> 00012 00013 #include "DataFormats/Provenance/interface/ParameterSetID.h" 00014 #include "DataFormats/Provenance/interface/ProcessConfiguration.h" 00015 #include "DataFormats/Provenance/interface/ProcessConfigurationID.h" 00016 #include "DataFormats/Provenance/interface/ModuleDescriptionID.h" 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 struct ModuleDescription { 00024 00025 ModuleDescription(); 00026 00027 void write(std::ostream& os) const; 00028 00029 ParameterSetID const& parameterSetID() const {return parameterSetID_;} 00030 std::string const& moduleName() const {return moduleName_;} 00031 std::string const& moduleLabel() const {return moduleLabel_;} 00032 ProcessConfiguration const& processConfiguration() const {return processConfiguration_;} 00033 ProcessConfigurationID const processConfigurationID() const {return processConfiguration().id();} 00034 std::string const& processName() const {return processConfiguration().processName();} 00035 std::string const& releaseVersion() const {return processConfiguration().releaseVersion();} 00036 std::string const& passID() const {return processConfiguration().passID();} 00037 ParameterSetID const& mainParameterSetID() const {return processConfiguration().parameterSetID();} 00038 00039 // compiler-written copy c'tor, assignment, and d'tor are correct. 00040 00041 bool operator<(ModuleDescription const& rh) const; 00042 00043 bool operator==(ModuleDescription const& rh) const; 00044 00045 bool operator!=(ModuleDescription const& rh) const; 00046 00047 ModuleDescriptionID id() const; 00048 00049 // ID of parameter set of the creator 00050 ParameterSetID parameterSetID_; 00051 00052 // The class name of the creator 00053 std::string moduleName_; 00054 00055 // A human friendly string that uniquely identifies the EDProducer 00056 // and becomes part of the identity of a product that it produces 00057 std::string moduleLabel_; 00058 00059 // The process configuration. 00060 ProcessConfiguration processConfiguration_; 00061 }; 00062 00063 inline 00064 std::ostream& 00065 operator<<(std::ostream& os, const ModuleDescription& p) { 00066 p.write(os); 00067 return os; 00068 } 00069 00070 } 00071 #endif