Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JTRIGGER::JMatch< JHit_t > Class Template Referenceabstract

Function object interface for hit matching. More...

#include <JMatch.hh>

Inheritance diagram for JTRIGGER::JMatch< JHit_t >:
JLANG::JClonable< JClonable_t, JDerived_t >

Public Types

typedef JClonable< JClonable_t >::clone_type clone_type
 

Public Member Functions

virtual ~JMatch ()
 Virtual destructor.
 
virtual bool operator() (const JHit_t &first, const JHit_t &second) const =0
 Match operator.
 
template<class T >
int count (const JHit_t &hit, T __begin, T __end) const
 Get number of matches between given hit and data.
 
virtual clone_type clone () const override
 Get clone of this object.
 

Detailed Description

template<class JHit_t>
class JTRIGGER::JMatch< JHit_t >

Function object interface for hit matching.

Definition at line 25 of file JMatch.hh.

Member Typedef Documentation

◆ clone_type

template<class JClonable_t , class JDerived_t >
JClonable<JClonable_t>::clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone_type
inherited

Definition at line 61 of file JClonable.hh.

Constructor & Destructor Documentation

◆ ~JMatch()

template<class JHit_t >
virtual JTRIGGER::JMatch< JHit_t >::~JMatch ( )
inlinevirtual

Virtual destructor.

Definition at line 32 of file JMatch.hh.

33 {}

Member Function Documentation

◆ operator()()

template<class JHit_t >
virtual bool JTRIGGER::JMatch< JHit_t >::operator() ( const JHit_t & first,
const JHit_t & second ) const
pure virtual

Match operator.

Parameters
firsthit
secondhit
Returns
match result

◆ count()

template<class JHit_t >
template<class T >
int JTRIGGER::JMatch< JHit_t >::count ( const JHit_t & hit,
T __begin,
T __end ) const
inline

Get number of matches between given hit and data.

Parameters
hithit
__beginbegin of data
__endend of data
Returns
number of matches

Definition at line 55 of file JMatch.hh.

56 {
57 int n = 0;
58
59 for (T i = __begin; i != __end; ++i) {
60 if ((*this)(hit,*i)) {
61 ++n;
62 }
63 }
64
65 return n;
66 }
const int n
Definition JPolint.hh:791

◆ clone()

template<class JClonable_t , class JDerived_t >
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlineoverridevirtualinherited

The documentation for this class was generated from the following file: