Jpp  16.0.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
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. More...
 
virtual bool operator() (const JHit_t &first, const JHit_t &second) const =0
 Match operator. More...
 
template<class T >
int count (const JHit_t &hit, T __begin, T __end) const
 Get number of matches between given hit and data. More...
 
virtual clone_type clone () const override
 Get clone of this object. More...
 

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

template<class JClonable_t, class JDerived_t = JNullType>
typedef 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

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

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
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:676
do set_variable OUTPUT_DIRECTORY $WORKDIR T
template<class JClonable_t, class JDerived_t = JNullType>
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlineoverridevirtualinherited

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