CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
edm::ProductResolverIndexAndSkipBit Class Reference

#include <ProductResolverIndexAndSkipBit.h>

Public Member Functions

bool operator== (ProductResolverIndexAndSkipBit const &r)
 
ProductResolverIndex productResolverIndex () const
 
 ProductResolverIndexAndSkipBit (ProductResolverIndex productResolverIndex, bool skipCurrentProcess)
 
bool skipCurrentProcess () const
 

Private Attributes

unsigned int value_
 

Static Private Attributes

static const unsigned int s_skipMask = 1U << 31
 

Detailed Description

Description: This class holds a ProductIndexHolder and a boolean value to indicate whether the skipCurrentProcess option was set. Internally it bit packs them in an unsigned int. There is a little extra complexity in the implementation to hide the fact that some special values of ProductResolverIndex use the same bit we use for skipCurrentProcess.

Usage: EDConsumerBase use this and pass a container of them to the Workers to let them know what data will be consumed.

Definition at line 28 of file ProductResolverIndexAndSkipBit.h.

Constructor & Destructor Documentation

◆ ProductResolverIndexAndSkipBit()

edm::ProductResolverIndexAndSkipBit::ProductResolverIndexAndSkipBit ( ProductResolverIndex  productResolverIndex,
bool  skipCurrentProcess 
)
inline

Member Function Documentation

◆ operator==()

bool edm::ProductResolverIndexAndSkipBit::operator== ( ProductResolverIndexAndSkipBit const &  r)
inline

Definition at line 38 of file ProductResolverIndexAndSkipBit.h.

38 { return value_ == r.value_; }

References alignCSCRings::r, and value_.

◆ productResolverIndex()

ProductResolverIndex edm::ProductResolverIndexAndSkipBit::productResolverIndex ( ) const
inline

Definition at line 32 of file ProductResolverIndexAndSkipBit.h.

32  {
33  bool specialIndexValue = (value_ & ProductResolverIndexValuesBit) != 0;
34  return specialIndexValue ? value_ | s_skipMask : value_ & ~s_skipMask;
35  }

References edm::ProductResolverIndexValuesBit, s_skipMask, and value_.

Referenced by edm::PrincipalGetAdapter::getByToken_().

◆ skipCurrentProcess()

bool edm::ProductResolverIndexAndSkipBit::skipCurrentProcess ( ) const
inline

Definition at line 36 of file ProductResolverIndexAndSkipBit.h.

36 { return (value_ & s_skipMask) != 0; }

References s_skipMask, and value_.

Referenced by edm::PrincipalGetAdapter::getByToken_().

Member Data Documentation

◆ s_skipMask

const unsigned int edm::ProductResolverIndexAndSkipBit::s_skipMask = 1U << 31
staticprivate

Definition at line 41 of file ProductResolverIndexAndSkipBit.h.

Referenced by productResolverIndex(), and skipCurrentProcess().

◆ value_

unsigned int edm::ProductResolverIndexAndSkipBit::value_
private
edm::ProductResolverIndexAndSkipBit::productResolverIndex
ProductResolverIndex productResolverIndex() const
Definition: ProductResolverIndexAndSkipBit.h:32
alignCSCRings.r
r
Definition: alignCSCRings.py:93
edm::ProductResolverIndexAndSkipBit::value_
unsigned int value_
Definition: ProductResolverIndexAndSkipBit.h:43
edm::ProductResolverIndexValuesBit
Definition: ProductResolverIndex.h:14
edm::ProductResolverIndexAndSkipBit::skipCurrentProcess
bool skipCurrentProcess() const
Definition: ProductResolverIndexAndSkipBit.h:36
edm::ProductResolverIndexAndSkipBit::s_skipMask
static const unsigned int s_skipMask
Definition: ProductResolverIndexAndSkipBit.h:41