ATLAS Offline Software
Loading...
Searching...
No Matches
LVL1::Range Class Reference

Range class declaration. More...

#include <Range.h>

Collaboration diagram for LVL1::Range:

Public Member Functions

 Range ()
 Range (double min, double max)
 ~Range ()=default
double min () const
double max () const
void setRange (double min, double max)
 sets range
bool contains (double number) const
 returns true if the range contains the number (i.e.

Private Member Functions

void checkValues ()
 This function makes sure m_min really is less than m_max.

Private Attributes

double m_min
double m_max

Detailed Description

Range class declaration.

Definition at line 17 of file Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Range.h.

Constructor & Destructor Documentation

◆ Range() [1/2]

◆ Range() [2/2]

Range::Range ( double min,
double max )

Definition at line 20 of file Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx.

21 : m_min( min ), m_max( max ) {
22
24 }
void checkValues()
This function makes sure m_min really is less than m_max.

◆ ~Range()

LVL1::Range::~Range ( )
default

Member Function Documentation

◆ checkValues()

void Range::checkValues ( )
private

This function makes sure m_min really is less than m_max.

Definition at line 48 of file Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx.

48 {
49 if ( m_min >= m_max ) {
50 double temp = m_max;
51 m_max = m_min;
52 m_min = temp;
53 }
54 return;
55 }

◆ contains()

bool Range::contains ( double number) const

returns true if the range contains the number (i.e.

if min<=number<=max)

Definition at line 43 of file Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx.

43 {
44 return ( ( m_min <= number ) && ( number <= m_max ) );
45 }
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186

◆ max()

double Range::max ( ) const

Definition at line 30 of file Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx.

30 {
31 return m_max;
32 }

◆ min()

double Range::min ( ) const

Definition at line 26 of file Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx.

26 {
27 return m_min;
28 }

◆ setRange()

void Range::setRange ( double min,
double max )

sets range

Definition at line 35 of file Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx.

35 {
36 m_min = min;
37 m_max = max;
39 }

Member Data Documentation

◆ m_max

double LVL1::Range::m_max
private

◆ m_min

double LVL1::Range::m_min
private

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