ATLAS Offline Software
Public Member Functions | List of all members
IFilter< T > Class Template Referenceabstract

IFilter is the main interface to the filters. More...

#include <IFilter.h>

Inheritance diagram for IFilter< T >:
Collaboration diagram for IFilter< T >:

Public Member Functions

 IFilter ()
 Default constructor: More...
 
 IFilter (const IFilter< T > &rhs)
 Copy constructor: More...
 
virtual ~IFilter ()
 Destructor: More...
 
IFilter< T > & operator= (const IFilter< T > &rhs)
 Assignment operator: More...
 
virtual bool isAccepted (const T *element) const =0
 Main filter method. More...
 
bool operator() (const T *element) const
 
virtual void setFilter (const IFilterCuts *ifilter)=0
 Pure virtual function (to be overloaded by each of the children classes) to copy the cut properties of a given filter to another one. More...
 

Detailed Description

template<typename T>
class IFilter< T >

IFilter is the main interface to the filters.

It inherits from IFilterCuts to be able to copy a set of cut properties without explicitly knowing the concrete implementation of the derived filter.

Definition at line 30 of file IFilter.h.

Constructor & Destructor Documentation

◆ IFilter() [1/2]

template<typename T >
IFilter< T >::IFilter
inline

Default constructor:

Definition at line 78 of file IFilter.h.

78  :
79  IFilterCuts()
80 {}

◆ IFilter() [2/2]

template<typename T >
IFilter< T >::IFilter ( const IFilter< T > &  rhs)
inline

Copy constructor:

Definition at line 83 of file IFilter.h.

83  :
84  IFilterCuts(rhs)
85 {}

◆ ~IFilter()

template<typename T >
IFilter< T >::~IFilter
inlinevirtual

Destructor:

Definition at line 88 of file IFilter.h.

88 {}

Member Function Documentation

◆ isAccepted()

template<typename T >
virtual bool IFilter< T >::isAccepted ( const T *  element) const
pure virtual

Main filter method.

This method takes the decision whether or not the filter has to accept the element. It returns true or false accordingly.

Implemented in MomentumFilter< T >, PdgIdFilter< T >, and ChargeFilter< T >.

◆ operator()()

template<typename T >
bool IFilter< T >::operator() ( const T *  element) const
inline

Definition at line 101 of file IFilter.h.

102 {
103  return isAccepted(element);
104 }

◆ operator=()

template<typename T >
IFilter< T > & IFilter< T >::operator= ( const IFilter< T > &  rhs)
inline

Assignment operator:

Definition at line 91 of file IFilter.h.

92 {
93  if ( this != &rhs ) {
95  }
96  return *this;
97 }

◆ setFilter()

virtual void IFilterCuts::setFilter ( const IFilterCuts ifilter)
pure virtualinherited

Pure virtual function (to be overloaded by each of the children classes) to copy the cut properties of a given filter to another one.

It copies the properties of ifilter to the current IFilterCuts object.

Parameters
ifilterthe IFilterCuts which holds a set of properties one wants to copy to the current IFilterCuts object.

Implemented in AssocFilter< OBJ, ASSO >, AssocFilter< IParticle, IParticle >, MomentumFilter< T >, McVtxFilter, PdgIdFilter< T >, and ChargeFilter< T >.


The documentation for this class was generated from the following file:
IFilter::isAccepted
virtual bool isAccepted(const T *element) const =0
Main filter method.
IFilterCuts::IFilterCuts
IFilterCuts()
Default constructor:
Definition: IFilterCuts.h:69
IFilterCuts::operator=
IFilterCuts & operator=(const IFilterCuts &rhs)
Assignment operator:
Definition: IFilterCuts.h:78