CMS 3D CMS Logo

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 50 of file BPHMultiSelect.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 55 of file BPHMultiSelect.h.

55  {
56  switch ( op ) {
58  breakValue = true;
59  finalValue = false;
60  break;
62  breakValue = false;
63  finalValue = true;
64  break;
65  }
66  }
template<class T>
BPHMultiSelectBase< T >::~BPHMultiSelectBase ( )
inlineoverride

Destructor

Definition at line 70 of file BPHMultiSelect.h.

70 {}
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 75 of file BPHMultiSelect.h.

Referenced by BPHOniaToMuMuBuilder::build().

75  {
76  SelectElement e;
77  e.selector = &s;
78  e.mode = m;
79  selectList.push_back( e );
80  return;
81  }
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 84 of file BPHMultiSelect.h.

84  {
85  int i;
86  int n = selectList.size();
87  for ( i = 0; i < n; ++i ) {
88  const SelectElement& e = selectList[i];
89  if ( ( e.selector->accept( cand ) == e.mode ) == breakValue )
90  return breakValue;
91  }
92  return finalValue;
93  }
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 94 of file BPHMultiSelect.h.

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

Member Data Documentation

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

Definition at line 117 of file BPHMultiSelect.h.

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

Definition at line 118 of file BPHMultiSelect.h.

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

Definition at line 119 of file BPHMultiSelect.h.