CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
edm::ProductHolderIndexAndSkipBit Class Reference

#include <ProductHolderIndexAndSkipBit.h>

Public Member Functions

bool operator== (ProductHolderIndexAndSkipBit const &r)
 
ProductHolderIndex productHolderIndex () const
 
 ProductHolderIndexAndSkipBit (ProductHolderIndex productHolderIndex, 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 ProductHolderIndex 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 ProductHolderIndexAndSkipBit.h.

Constructor & Destructor Documentation

edm::ProductHolderIndexAndSkipBit::ProductHolderIndexAndSkipBit ( ProductHolderIndex  productHolderIndex,
bool  skipCurrentProcess 
)
inline

Member Function Documentation

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

Definition at line 40 of file ProductHolderIndexAndSkipBit.h.

References value_.

40  {
41  return value_ == r.value_;
42  }
ProductHolderIndex edm::ProductHolderIndexAndSkipBit::productHolderIndex ( ) const
inline

Definition at line 33 of file ProductHolderIndexAndSkipBit.h.

References edm::ProductHolderIndexValuesBit, s_skipMask, and value_.

33  {
34  bool specialIndexValue = (value_ & ProductHolderIndexValuesBit) != 0;
35  return specialIndexValue ? value_ | s_skipMask :
36  value_ & ~s_skipMask;
37  }
bool edm::ProductHolderIndexAndSkipBit::skipCurrentProcess ( ) const
inline

Definition at line 38 of file ProductHolderIndexAndSkipBit.h.

References s_skipMask, and value_.

Member Data Documentation

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

Definition at line 45 of file ProductHolderIndexAndSkipBit.h.

Referenced by productHolderIndex(), and skipCurrentProcess().

unsigned int edm::ProductHolderIndexAndSkipBit::value_
private