File indexing completed on 2024-07-24 04:44:52
0001 #ifndef FWCore_Framework_ProductResolverIndexAndSkipBit_h
0002 #define FWCore_Framework_ProductResolverIndexAndSkipBit_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "FWCore/Utilities/interface/ProductResolverIndex.h"
0025
0026 namespace edm {
0027
0028 class ProductResolverIndexAndSkipBit {
0029 public:
0030 ProductResolverIndexAndSkipBit(ProductResolverIndex productResolverIndex, bool skipCurrentProcess)
0031 : value_(skipCurrentProcess ? s_skipMask | productResolverIndex : ~s_skipMask & productResolverIndex) {}
0032 ProductResolverIndex productResolverIndex() const {
0033 bool specialIndexValue = (value_ & ProductResolverIndexValuesBit) != 0;
0034 return specialIndexValue ? value_ | s_skipMask : value_ & ~s_skipMask;
0035 }
0036 bool skipCurrentProcess() const { return (value_ & s_skipMask) != 0; }
0037
0038 bool operator==(ProductResolverIndexAndSkipBit const& r) const { return value_ == r.value_; }
0039
0040 private:
0041 static const unsigned int s_skipMask = 1U << 31;
0042
0043 unsigned int value_;
0044 };
0045 }
0046 #endif