Belle II Software development
compFirst Struct Reference

small helper functor to find a pair in a container of pairs, where .first matches the passed integer COULDDO: make this templated to take any arguments to the pair, instead of only ints and shorts More...

Public Member Functions

 compFirst (int j)
 explicit constructor for use as functor with argument
 
bool operator() (const pair< int, short > &p)
 comparison operator returning true if .first is j (from ctor)
 

Private Attributes

int i
 only member holding the value that has to be matched by the .first element of a pair
 

Detailed Description

small helper functor to find a pair in a container of pairs, where .first matches the passed integer COULDDO: make this templated to take any arguments to the pair, instead of only ints and shorts

Definition at line 104 of file purityCalculatorTools.cc.

Constructor & Destructor Documentation

◆ compFirst()

compFirst ( int  j)
inlineexplicit

explicit constructor for use as functor with argument

Definition at line 105 of file purityCalculatorTools.cc.

Member Function Documentation

◆ operator()()

bool operator() ( const pair< int, short > &  p)
inline

comparison operator returning true if .first is j (from ctor)

Definition at line 106 of file purityCalculatorTools.cc.

Member Data Documentation

◆ i

int i
private

only member holding the value that has to be matched by the .first element of a pair

Definition at line 111 of file purityCalculatorTools.cc.


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