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
 

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

Constructor

Definition at line 50 of file BPHMultiSelect.h.

50  {
51  switch (op) {
53  breakValue = true;
54  finalValue = false;
55  break;
57  breakValue = false;
58  finalValue = true;
59  break;
60  }
61  }

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

◆ BPHMultiSelectBase() [2/2]

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

◆ ~BPHMultiSelectBase()

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

Destructor

Definition at line 69 of file BPHMultiSelect.h.

69 {}

Member Function Documentation

◆ count()

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

component count

Definition at line 83 of file BPHMultiSelect.h.

83 { return selectList.size(); }

References BPHMultiSelectBase< T >::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  }

◆ 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.

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  }

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

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  }

References BPHMultiSelectBase< T >::breakValue, newFWLiteAna::build, MillePedeFileConverter_cfg::e, BPHMultiSelectBase< T >::finalValue, mps_fire::i, dqmiodumpmetadata::n, and BPHMultiSelectBase< T >::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
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
newFWLiteAna.build
build
Definition: newFWLiteAna.py:126
alignCSCRings.s
s
Definition: alignCSCRings.py:92
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
BPHSelectOperation::and_mode
Definition: BPHMultiSelect.h:42
cand
Definition: decayParser.h:32
BPHMultiSelectBase::selectList
std::vector< SelectElement > selectList
Definition: BPHMultiSelect.h:116
BPHSelectOperation::or_mode
Definition: BPHMultiSelect.h:42
BPHMultiSelectBase::finalValue
bool finalValue
Definition: BPHMultiSelect.h:115
BPHMultiSelectBase::breakValue
bool breakValue
Definition: BPHMultiSelect.h:114
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37