#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) |
Private Attributes | |
std::vector< bool > | m_mask |
edm::RefProd< T > | m_prod |
Definition at line 36 of file ContainerMask.h.
edm::ContainerMask< T >::ContainerMask | ( | ) | [inline] |
Definition at line 39 of file ContainerMask.h.
{}
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())); }
void ContainerMask::applyOrTo | ( | std::vector< bool > & | iTo | ) | const |
Definition at line 94 of file ContainerMask.h.
References edm::ContainerMask< T >::m_mask, and create_public_pileup_plots::transform.
{ assert(iTo.size()==m_mask.size()); std::transform(m_mask.begin(),m_mask.end(),iTo.begin(), iTo.begin(),std::logical_or<bool>()); }
void ContainerMask::copyMaskTo | ( | std::vector< bool > & | iTo | ) | const |
Definition at line 89 of file ContainerMask.h.
References edm::ContainerMask< T >::m_mask.
bool ContainerMask::mask | ( | const typename ContainerMaskTraits< T >::value_type * | iElement | ) |
Definition at line 82 of file ContainerMask.h.
References getHLTprescales::index, edm::ContainerMask< T >::m_prod, edm::ContainerMask< T >::mask(), and edm::RefProd< C >::product().
{ unsigned int index = ContainerMaskTraits<T>::indexFor(iElement,m_prod.product()); return this->mask(index); }
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().
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;}
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();}
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().
std::vector<bool> edm::ContainerMask< T >::m_mask [private] |
Definition at line 71 of file ContainerMask.h.
Referenced by edm::ContainerMask< T >::applyOrTo(), edm::ContainerMask< T >::copyMaskTo(), edm::ContainerMask< T >::mask(), edm::ContainerMask< T >::size(), and edm::ContainerMask< T >::swap().
edm::RefProd<T> edm::ContainerMask< T >::m_prod [private] |
Definition at line 70 of file ContainerMask.h.
Referenced by edm::ContainerMask< T >::mask(), edm::ContainerMask< T >::refProd(), and edm::ContainerMask< T >::swap().