CMS 3D CMS Logo

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

#include <BPHMultiSelect.h>

Inheritance diagram for BPHMultiSelectBase< T >:
BPHMultiSelect< T >

Classes

struct  SelectElement
 

Public Member Functions

 BPHMultiSelectBase (BPHSelectOperation::mode op)
 
void include (T &s, bool m=true)
 include selection More...
 
 ~BPHMultiSelectBase () override
 

Protected Member Functions

template<class Obj >
bool select (const Obj &cand) const
 
template<class Obj >
bool select (const Obj &cand, const BPHRecoBuilder *build) const
 

Private Member Functions

 BPHMultiSelectBase (const BPHMultiSelectBase< T > &x)=delete
 
BPHMultiSelectBase< T > & operator= (const BPHMultiSelectBase< T > &x)=delete
 

Private Attributes

bool breakValue
 
bool finalValue
 
std::vector< SelectElementselectList
 

Detailed Description

template<class T>
class BPHMultiSelectBase< T >

Definition at line 48 of file BPHMultiSelect.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 52 of file BPHMultiSelect.h.

52  {
53  switch (op) {
55  breakValue = true;
56  finalValue = false;
57  break;
59  breakValue = false;
60  finalValue = true;
61  break;
62  }
63  }
template<class T>
BPHMultiSelectBase< T >::~BPHMultiSelectBase ( )
inlineoverride

Destructor

Definition at line 67 of file BPHMultiSelect.h.

67 {}
template<class T>
BPHMultiSelectBase< T >::BPHMultiSelectBase ( const BPHMultiSelectBase< T > &  x)
privatedelete

Member Function Documentation

template<class T>
void BPHMultiSelectBase< T >::include ( T s,
bool  m = true 
)
inline

include selection

Operations

Definition at line 72 of file BPHMultiSelect.h.

Referenced by BPHOniaToMuMuBuilder::build().

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

Definition at line 82 of file BPHMultiSelect.h.

Referenced by BPHMultiSelect< T >::accept(), and BPHMultiSelect< BPHRecoSelect >::accept().

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

Definition at line 93 of file BPHMultiSelect.h.

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

Member Data Documentation

template<class T>
bool BPHMultiSelectBase< T >::breakValue
private

Definition at line 114 of file BPHMultiSelect.h.

template<class T>
bool BPHMultiSelectBase< T >::finalValue
private

Definition at line 115 of file BPHMultiSelect.h.

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

Definition at line 116 of file BPHMultiSelect.h.