Public Member Functions | Private Attributes | List of all members
arttest::TrackEfficiency Class Reference

#include <TrackEfficiency.h>

Public Member Functions

 TrackEfficiency ()=default
 
 TrackEfficiency (unsigned const num, unsigned const denom)
 
auto efficiency () const
 
auto num () const
 
auto denom () const
 
void aggregate (TrackEfficiency const &other)
 

Private Attributes

unsigned num_
 
unsigned denom_
 

Detailed Description

Definition at line 8 of file TrackEfficiency.h.

Constructor & Destructor Documentation

arttest::TrackEfficiency::TrackEfficiency ( )
explicitdefault
arttest::TrackEfficiency::TrackEfficiency ( unsigned const  num,
unsigned const  denom 
)
inlineexplicit

Definition at line 11 of file TrackEfficiency.h.

Member Function Documentation

void arttest::TrackEfficiency::aggregate ( TrackEfficiency const &  other)
inline

Definition at line 33 of file TrackEfficiency.h.

34  {
35  num_ += other.num_;
36  denom_ += other.denom_;
37  }
auto arttest::TrackEfficiency::denom ( ) const
inline

Definition at line 27 of file TrackEfficiency.h.

28  {
29  return denom_;
30  }
auto arttest::TrackEfficiency::efficiency ( ) const
inline

Definition at line 16 of file TrackEfficiency.h.

17  {
18  return static_cast<double>(num_) / denom_;
19  }
auto arttest::TrackEfficiency::num ( ) const
inline

Definition at line 22 of file TrackEfficiency.h.

23  {
24  return num_;
25  }

Member Data Documentation

unsigned arttest::TrackEfficiency::denom_
private

Definition at line 41 of file TrackEfficiency.h.

unsigned arttest::TrackEfficiency::num_
private

Definition at line 40 of file TrackEfficiency.h.


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