BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Range.cxx
Go to the documentation of this file.
1//-----------------------------------------------------------fmt version 0.00--
2// $Id: Range.cxx,v 1.2 2005/09/09 07:47:07 zangsl Exp $
3//-----------------------------------------------------------------------------
4// Header file for Multi-TDC data
5//-----------------------------------------------------------------------------
6// Filename : MultiTDC.h
7// Section : CDC TSF
8// Owner : Yoshi Iwasaki
9// Email : [email protected]
10//-----------------------------------------------------------------------------
11
12#include <iostream>
13//#include "cdc/Range.h"
14#include "TrkReco/Range.h"
15
17 _low = -999.;
18 _high = -999.;
19}
20
21Range::Range(const Range & ib) {
22 _low = ib.low();
23 _high = ib.high();
24}
25
26Range::Range(const float iLow, const float iHigh) {
27 if (iHigh > iLow) {
28 _low = iLow;
29 _high = iHigh;
30 }
31 else {
32 _low = iHigh;
33 _high = iLow;
34 }
35}
36
37bool
38Range::operator == (const Range & a) const {
39 if (_low != a.low()) return false;
40 if (_high != a.high()) return false;
41 return true;
42}
43
44int
45Range::dump(void) const {
46 std::cout << _low << "~" << _high;
47 return 0;
48}
49
to specify 1-dim region or range by two floats
virtual float high(void) const
returns higher limit.
virtual float low(void) const
returns lower limit.
Range()
Constructor.
Definition: Range.cxx:16
virtual int dump(void) const
displays debug information.
Definition: Range.cxx:45
bool operator==(const Range &) const
returns true if range is the same.
Definition: Range.cxx:38