ATLAS Offline Software
Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 /***************************************************************************
5  Range.cxx - description
6  -------------------
7  begin : 26/02/2002
8  email : e.moyse@qmul.ac.uk
9 ***************************************************************************/
10 
11 #include "TrigT1Interfaces/Range.h"
12 
13 namespace LVL1 {
14 
15  Range::Range()
16  : m_min( 0.0 ), m_max( 0.0 ) {
17 
18  }
19 
20  Range::Range( double min, double max )
21  : m_min( min ), m_max( max ) {
22 
23  checkValues();
24  }
25 
26  double Range::min() const {
27  return m_min;
28  }
29 
30  double Range::max() const {
31  return m_max;
32  }
33 
35  void Range::setRange( double min, double max ) {
36  m_min = min;
37  m_max = max;
38  checkValues();
39  }
40 
41 
43  bool Range::contains( double number ) const {
44  return ( ( m_min <= number ) && ( number <= m_max ) );
45  }
46 
49  if ( m_min >= m_max ) {
50  double temp = m_max;
51  m_max = m_min;
52  m_min = temp;
53  }
54  return;
55  }
56 
57 } // namepsace LVL1
LVL1::Range::checkValues
void checkValues()
This function makes sure m_min really is less than m_max.
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:53
LVL1::Range::Range
Range()
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:20
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
LVL1::Range::min
double min() const
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:31
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
LVL1::Range::m_max
double m_max
Definition: Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Range.h:45
Range.h
LVL1::Range::setRange
void setRange(double min, double max)
sets range
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:40
LVL1::Range::max
double max() const
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:35
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
Range::Range
Range()=default
python.selection.number
number
Definition: selection.py:20
LVL1::Range::m_min
double m_min
Definition: Trigger/TrigT1/TrigT1Interfaces/TrigT1Interfaces/Range.h:44
LVL1::Range::contains
bool contains(double number) const
returns true if the range contains the number (i.e.
Definition: Trigger/TrigT1/TrigT1Interfaces/src/Range.cxx:48