File indexing completed on 2024-04-06 12:12:01
0001 #ifndef FWCore_Framework_ComponentDescription_h
0002 #define FWCore_Framework_ComponentDescription_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include "DataFormats/Provenance/interface/ParameterSetID.h"
0023
0024
0025 #include <string>
0026
0027
0028 namespace edm {
0029 namespace eventsetup {
0030 struct ComponentDescription {
0031 std::string label_;
0032 std::string type_;
0033
0034
0035 ParameterSetID pid_;
0036
0037 unsigned int id_;
0038
0039 bool isSource_;
0040 bool isLooper_;
0041
0042
0043
0044 ComponentDescription() : label_(), type_(), pid_(), id_(unknownID()), isSource_(false), isLooper_(false) {}
0045
0046 ComponentDescription(
0047 std::string const& iType, std::string const& iLabel, unsigned int iId, bool iIsSource, bool iIsLooper = false)
0048 : label_(iLabel), type_(iType), pid_(), id_(iId), isSource_(iIsSource), isLooper_(iIsLooper) {}
0049
0050 [[nodiscard]] static constexpr unsigned int unknownID() noexcept { return 0xFFFFFFFF; }
0051
0052 bool operator<(ComponentDescription const& iRHS) const {
0053 return (type_ == iRHS.type_) ? (label_ < iRHS.label_) : (type_ < iRHS.type_);
0054 }
0055 bool operator==(ComponentDescription const& iRHS) const {
0056 return label_ == iRHS.label_ && type_ == iRHS.type_ && isSource_ == iRHS.isSource_;
0057 }
0058 };
0059 }
0060 }
0061 #endif