CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Private Attributes
BPHMultiSelectBase< T > Class Template Reference

#include <BPHMultiSelect.h>

Inheritance diagram for BPHMultiSelectBase< T >:
BPHSlimSelect< T > BPHFullSelect< T >

Classes

struct  SelectElement
 

Public Member Functions

 BPHMultiSelectBase (BPHSelectOperation::mode op)
 
 BPHMultiSelectBase (const BPHMultiSelectBase< T > &x)=delete
 
unsigned int count ()
 component count More...
 
void include (T &s, bool m=true)
 include selection More...
 
BPHMultiSelectBaseoperator= (const BPHMultiSelectBase< T > &x)=delete
 
 ~BPHMultiSelectBase () override
 

Protected Types

using Obj = typename T::AcceptArg
 

Protected Member Functions

bool select (const Obj &cand) const
 
bool select (const Obj &cand, const BPHRecoBuilder *build) const
 

Private Attributes

bool breakValue
 
bool finalValue
 
std::vector< SelectElementselectList
 

Detailed Description

template<class T>
class BPHMultiSelectBase< T >

Definition at line 46 of file BPHMultiSelect.h.

Member Typedef Documentation

template<class T>
using BPHMultiSelectBase< T >::Obj = typename T::AcceptArg
protected

Definition at line 86 of file BPHMultiSelect.h.

Constructor & Destructor Documentation

template<class T>
BPHMultiSelectBase< T >::BPHMultiSelectBase ( BPHSelectOperation::mode  op)
inline

Constructor

Definition at line 50 of file BPHMultiSelect.h.

References BPHSelectOperation::and_mode, BPHMultiSelectBase< T >::breakValue, BPHMultiSelectBase< T >::finalValue, and BPHSelectOperation::or_mode.

50  {
51  switch (op) {
53  breakValue = true;
54  finalValue = false;
55  break;
57  breakValue = false;
58  finalValue = true;
59  break;
60  }
61  }
template<class T>
BPHMultiSelectBase< T >::BPHMultiSelectBase ( const BPHMultiSelectBase< T > &  x)
delete
template<class T>
BPHMultiSelectBase< T >::~BPHMultiSelectBase ( )
inlineoverride

Destructor

Definition at line 69 of file BPHMultiSelect.h.

69 {}

Member Function Documentation

template<class T>
unsigned int BPHMultiSelectBase< T >::count ( void  )
inline

component count

Definition at line 83 of file BPHMultiSelect.h.

References BPHMultiSelectBase< T >::selectList.

83 { return selectList.size(); }
std::vector< SelectElement > selectList
template<class T>
void BPHMultiSelectBase< T >::include ( T s,
bool  m = true 
)
inline

include selection

Operations

Definition at line 74 of file BPHMultiSelect.h.

74  {
75  SelectElement e;
76  e.selector = &s;
77  e.mode = m;
78  selectList.push_back(e);
79  return;
80  }
std::vector< SelectElement > selectList
template<class T>
BPHMultiSelectBase& BPHMultiSelectBase< T >::operator= ( const BPHMultiSelectBase< T > &  x)
delete
template<class T>
bool BPHMultiSelectBase< T >::select ( const Obj cand) const
inlineprotected

Definition at line 87 of file BPHMultiSelect.h.

References BPHMultiSelectBase< T >::breakValue, BPHMultiSelectBase< T >::finalValue, mps_fire::i, BPHMultiSelectBase< T >::SelectElement::mode, dqmiodumpmetadata::n, BPHMultiSelectBase< T >::selectList, and BPHMultiSelectBase< T >::SelectElement::selector.

87  {
88  int i;
89  int n = selectList.size();
90  for (i = 0; i < n; ++i) {
91  const SelectElement& e = selectList[i];
92  if ((e.selector->accept(cand) == e.mode) == breakValue)
93  return breakValue;
94  }
95  return finalValue;
96  }
std::vector< SelectElement > selectList
template<class T>
bool BPHMultiSelectBase< T >::select ( const Obj cand,
const BPHRecoBuilder build 
) const
inlineprotected

Definition at line 97 of file BPHMultiSelect.h.

References BPHMultiSelectBase< T >::breakValue, BPHMultiSelectBase< T >::finalValue, mps_fire::i, BPHMultiSelectBase< T >::SelectElement::mode, dqmiodumpmetadata::n, BPHMultiSelectBase< T >::selectList, and BPHMultiSelectBase< T >::SelectElement::selector.

97  {
98  int i;
99  int n = selectList.size();
100  for (i = 0; i < n; ++i) {
101  const SelectElement& e = selectList[i];
102  if ((e.selector->accept(cand, build) == e.mode) == breakValue)
103  return breakValue;
104  }
105  return finalValue;
106  }
std::vector< SelectElement > selectList

Member Data Documentation

template<class T>
bool BPHMultiSelectBase< T >::breakValue
private
template<class T>
bool BPHMultiSelectBase< T >::finalValue
private
template<class T>
std::vector<SelectElement> BPHMultiSelectBase< T >::selectList
private