CMS 3D CMS Logo

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=default
 

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

◆ Obj

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

Definition at line 86 of file BPHMultiSelect.h.

Constructor & Destructor Documentation

◆ BPHMultiSelectBase() [1/2]

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

◆ BPHMultiSelectBase() [2/2]

template<class T>
BPHMultiSelectBase< T >::BPHMultiSelectBase ( const BPHMultiSelectBase< T > &  x)
delete

◆ ~BPHMultiSelectBase()

template<class T>
BPHMultiSelectBase< T >::~BPHMultiSelectBase ( )
overridedefault

Destructor

Member Function Documentation

◆ count()

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

◆ include()

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

◆ operator=()

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

◆ select() [1/2]

template<class T>
bool BPHMultiSelectBase< T >::select ( const Obj cand) const
inlineprotected

Definition at line 87 of file BPHMultiSelect.h.

References BPHMultiSelectBase< T >::breakValue, MillePedeFileConverter_cfg::e, BPHMultiSelectBase< T >::finalValue, mps_fire::i, dqmiodumpmetadata::n, and BPHMultiSelectBase< T >::selectList.

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

◆ select() [2/2]

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, newFWLiteAna::build, MillePedeFileConverter_cfg::e, BPHMultiSelectBase< T >::finalValue, mps_fire::i, dqmiodumpmetadata::n, and BPHMultiSelectBase< T >::selectList.

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

◆ breakValue

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

◆ finalValue

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

◆ selectList

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