CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/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 
00024 // system include files
00025 #include <string>
00026 
00027 // forward declarations
00028 namespace edm {
00029    namespace eventsetup {
00030       struct ComponentDescription {
00031          std::string label_; // A human friendly string that uniquely identifies the label
00032          std::string type_;  // A human friendly string that uniquely identifies the name
00033          bool isSource_;
00034          bool isLooper_;
00035 
00036          // ID of parameter set of the creator
00037          ParameterSetID pid_;
00038 
00039          /* ----------- end of provenance information ------------- */
00040 
00041          ComponentDescription() :
00042              label_(),
00043              type_(),
00044              isSource_(false),
00045              isLooper_(false),
00046              pid_() {}
00047 
00048          ComponentDescription(std::string const& iType,
00049                               std::string const& iLabel,
00050                               bool iIsSource,
00051                               bool iIsLooper = false) :
00052                                 label_(iLabel),
00053                                 type_(iType),
00054                                 isSource_(iIsSource),
00055                                 isLooper_(iIsLooper),
00056                                 pid_() {}
00057 
00058          bool operator<(ComponentDescription const& iRHS) const {
00059             return (type_ == iRHS.type_) ? (label_ < iRHS.label_) : (type_<iRHS.type_);
00060          }
00061          bool operator==(ComponentDescription const& iRHS) const {
00062             return label_ == iRHS.label_ &&
00063             type_ == iRHS.type_ &&
00064             isSource_ == iRHS.isSource_;
00065          }
00066       };
00067    }
00068 }
00069 #endif