CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
edm::ContainerMask< T > Class Template Reference

#include <ContainerMask.h>

Public Member Functions

void applyOrTo (std::vector< bool > &) const
 
 ContainerMask ()
 
 ContainerMask (const edm::RefProd< T > &iProd, const std::vector< bool > &iMask)
 
void copyMaskTo (std::vector< bool > &) const
 
bool mask (const typename ContainerMaskTraits< T >::value_type *)
 
bool mask (unsigned int iIndex) const
 
const edm::RefProd< T > & refProd () const
 
size_t size () const
 
void swap (ContainerMask< T > &iOther)
 

Static Public Member Functions

static short Class_Version ()
 

Private Attributes

std::vector< bool > m_mask
 
edm::RefProd< Tm_prod
 

Detailed Description

template<typename T>
class edm::ContainerMask< T >

Definition at line 36 of file ContainerMask.h.

Constructor & Destructor Documentation

◆ ContainerMask() [1/2]

template<typename T>
edm::ContainerMask< T >::ContainerMask ( )
inline

Definition at line 38 of file ContainerMask.h.

38 {}

◆ ContainerMask() [2/2]

template<typename T >
ContainerMask::ContainerMask ( const edm::RefProd< T > &  iProd,
const std::vector< bool > &  iMask 
)

Member Function Documentation

◆ applyOrTo()

template<typename T >
void ContainerMask::applyOrTo ( std::vector< bool > &  iTo) const

Definition at line 92 of file ContainerMask.h.

92  {
93  assert(iTo.size() == m_mask.size());
94  std::transform(m_mask.begin(), m_mask.end(), iTo.begin(), iTo.begin(), std::logical_or<bool>());
95  }

References cms::cuda::assert(), edm::ContainerMask< T >::m_mask, and HcalDetIdTransform::transform().

◆ Class_Version()

template<typename T>
static short edm::ContainerMask< T >::Class_Version ( )
inlinestatic

Definition at line 62 of file ContainerMask.h.

64 :
65  //ContainerMask(const ContainerMask&); // stop default

◆ copyMaskTo()

template<typename T >
void ContainerMask::copyMaskTo ( std::vector< bool > &  iTo) const

◆ mask() [1/2]

template<typename T >
bool ContainerMask::mask ( const typename ContainerMaskTraits< T >::value_type *  iElement)

◆ mask() [2/2]

template<typename T>
bool edm::ContainerMask< T >::mask ( unsigned int  iIndex) const
inline

Definition at line 43 of file ContainerMask.h.

43  {
44  if (iIndex < m_mask.size()) {
45  return m_mask[iIndex];
46  }
47  return false;
48  }

References edm::ContainerMask< T >::m_mask.

Referenced by ctfseeding::HitExtractorSTRP::cleanedOfClusters(), ctfseeding::HitExtractorPIX::hits(), and edm::ContainerMask< T >::mask().

◆ refProd()

template<typename T>
const edm::RefProd<T>& edm::ContainerMask< T >::refProd ( ) const
inline

Definition at line 55 of file ContainerMask.h.

55 { return m_prod; }

References edm::ContainerMask< T >::m_prod.

Referenced by ctfseeding::HitExtractorPIX::hits().

◆ size()

template<typename T>
size_t edm::ContainerMask< T >::size ( void  ) const
inline

◆ swap()

template<typename T >
void ContainerMask::swap ( ContainerMask< T > &  iOther)

Definition at line 98 of file ContainerMask.h.

98  {
99  m_prod.swap(iOther.m_prod);
100  std::swap(m_mask, iOther.m_mask);
101  }

References edm::ContainerMask< T >::m_mask, edm::ContainerMask< T >::m_prod, edm::RefProd< C >::swap(), and std::swap().

Member Data Documentation

◆ m_mask

template<typename T>
std::vector<bool> edm::ContainerMask< T >::m_mask
private

◆ m_prod

template<typename T>
edm::RefProd<T> edm::ContainerMask< T >::m_prod
private
cms::cuda::assert
assert(be >=bs)
edm::ContainerMask::m_prod
edm::RefProd< T > m_prod
Definition: ContainerMask.h:70
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
edm::ContainerMaskTraits::indexFor
static unsigned int indexFor(const value_type *iElement, const T *iContainer)
Definition: ContainerMaskTraits.h:34
edm::ContainerMask::m_mask
std::vector< bool > m_mask
Definition: ContainerMask.h:71
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
edm::RefProd::product
product_type const * product() const
Definition: RefProd.h:110
edm::RefProd::swap
void swap(RefProd< C > &)
Definition: RefProd.h:173
edm::ContainerMaskTraits::size
static size_t size(const T *iContainer)
Definition: ContainerMaskTraits.h:33
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::ContainerMask::mask
bool mask(unsigned int iIndex) const
Definition: ContainerMask.h:43