CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/FWCore/Framework/interface/ComponentDescription.h

Go to the documentation of this file.
00001 #ifndef FWCore_Framework_ComponentDescription_h
00002 #define FWCore_Framework_ComponentDescription_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Class  :     ComponentDescription
00007 //
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Thu Dec 15 14:07:57 EST 2005
00019 //
00020 
00021 // user include files
00022 #include "DataFormats/Provenance/interface/ParameterSetID.h"
00023 #include "DataFormats/Provenance/interface/PassID.h"
00024 #include "DataFormats/Provenance/interface/ReleaseVersion.h"
00025 
00026 // system include files
00027 #include <string>
00028 
00029 // forward declarations
00030 namespace edm {
00031    namespace eventsetup {
00032       struct ComponentDescription {
00033          std::string label_; // A human friendly string that uniquely identifies the label
00034          std::string type_;  // A human friendly string that uniquely identifies the name
00035          bool isSource_;
00036          bool isLooper_;
00037 
00038          // The following set of parameters comes from
00039          // DataFormats/Provenance/interface/ModuleDescription.h
00040          // to match and have identical provenance information
00041 
00042          // ID of parameter set of the creator
00043          ParameterSetID pid_;
00044 
00045          // the release tag of the executable
00046          ReleaseVersion releaseVersion_;
00047 
00048          // the physical process that this program was part of (e.g. production)
00049          std::string processName_;
00050 
00051          // what the heck is this? I think its the version of the processName_
00052          // e.g. second production pass
00053          PassID passID_;
00054          /* ----------- end of provenance information ------------- */
00055 
00056          ComponentDescription() :
00057              label_(),
00058              type_(),
00059              isSource_(false),
00060              isLooper_(false),
00061              pid_(),
00062              releaseVersion_(),
00063              processName_(),
00064              passID_() {}
00065 
00066          ComponentDescription(std::string const& iType,
00067                               std::string const& iLabel,
00068                               bool iIsSource,
00069                               bool iIsLooper = false) :
00070                                 label_(iLabel),
00071                                 type_(iType),
00072                                 isSource_(iIsSource),
00073                                 isLooper_(iIsLooper),
00074                                 pid_(),
00075                                 releaseVersion_(),
00076                                 processName_(),
00077                                 passID_() {}
00078 
00079          bool operator<(ComponentDescription const& iRHS) const {
00080             return (type_ == iRHS.type_) ? (label_ < iRHS.label_) : (type_<iRHS.type_);
00081          }
00082          bool operator==(ComponentDescription const& iRHS) const {
00083             return label_ == iRHS.label_ &&
00084             type_ == iRHS.type_ &&
00085             isSource_ == iRHS.isSource_;
00086          }
00087       };
00088    }
00089 }
00090 #endif