CMS 3D CMS Logo

Public Member Functions | Private Attributes

edm::ContainerMask< T > Class Template Reference

#include <ContainerMask.h>

List of all members.

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)

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

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

Definition at line 39 of file ContainerMask.h.

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

Definition at line 75 of file ContainerMask.h.

References edm::ContainerMask< T >::size().

                                                                                          :
   m_prod(iProd), m_mask(iMask) {
      assert(iMask.size() == ContainerMaskTraits<T>::size(m_prod.product()));
   }

Member Function Documentation

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

Definition at line 94 of file ContainerMask.h.

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

                                                              {
      assert(iTo.size()==m_mask.size());
      std::transform(m_mask.begin(),m_mask.end(),iTo.begin(), iTo.begin(),std::logical_or<bool>());
   }
template<typename T >
void ContainerMask::copyMaskTo ( std::vector< bool > &  iTo) const

Definition at line 89 of file ContainerMask.h.

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

                                                               {
      iTo.assign(m_mask.begin(),m_mask.end());
   }
template<typename T >
bool ContainerMask::mask ( const typename ContainerMaskTraits< T >::value_type *  iElement)
template<typename T>
bool edm::ContainerMask< T >::mask ( unsigned int  iIndex) const [inline]

Definition at line 44 of file ContainerMask.h.

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

Referenced by edm::ContainerMask< T >::mask().

                                             {
         assert(iIndex<m_mask.size());
         return m_mask[iIndex];
        }
template<typename T>
const edm::RefProd<T>& edm::ContainerMask< T >::refProd ( ) const [inline]

Definition at line 55 of file ContainerMask.h.

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

{return m_prod;}
template<typename T>
size_t edm::ContainerMask< T >::size ( void  ) const [inline]

Definition at line 53 of file ContainerMask.h.

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

Referenced by edm::ContainerMask< T >::ContainerMask().

{ return m_mask.size();}
template<typename T >
void ContainerMask::swap ( ContainerMask< T > &  iOther)

Definition at line 100 of file ContainerMask.h.

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

                                                       {
      m_prod.swap(iOther.m_prod);
      std::swap(m_mask,iOther.m_mask);
   }

Member Data Documentation

template<typename T>
std::vector<bool> edm::ContainerMask< T >::m_mask [private]
template<typename T>
edm::RefProd<T> edm::ContainerMask< T >::m_prod [private]