ATLAS Offline Software
Public Member Functions | List of all members
LArSamples::IndexRange Class Referenceabstract

storage of the time histories of all the cells More...

#include <IndexRange.h>

Inheritance diagram for LArSamples::IndexRange:
Collaboration diagram for LArSamples::IndexRange:

Public Member Functions

virtual ~IndexRange ()
 
virtual int lwb () const =0
 
virtual int upb () const =0
 
bool isInRange (int i) const
 
bool hasSameRange (int lw, int up) const
 
bool hasSameRange (const IndexRange &other) const
 
bool hasSameRange (const TVectorD &v) const
 
bool providesRange (int lw, int up) const
 
bool providesRange (const IndexRange &other) const
 
bool providesRange (const TVectorD &v) const
 
TString rangeStr () const
 
int commonLwb (const IndexRange &other) const
 
int commonUpb (const IndexRange &other) const
 
bool checkRange (int &l, int &h) const
 

Detailed Description

storage of the time histories of all the cells

Definition at line 18 of file IndexRange.h.

Constructor & Destructor Documentation

◆ ~IndexRange()

virtual LArSamples::IndexRange::~IndexRange ( )
inlinevirtual

Definition at line 22 of file IndexRange.h.

22 { }

Member Function Documentation

◆ checkRange()

bool IndexRange::checkRange ( int &  l,
int &  h 
) const

Definition at line 14 of file IndexRange.cxx.

15 {
16  if (l < 0)
17  l = lwb();
18  else if (!isInRange(l)) {
19  cout << "IndexRange::checkRange : lower bound " << l << " is out of bounds" << endl;
20  return false;
21  }
22 
23  if (h < 0)
24  h = upb();
25  else if (!isInRange(h)) {
26  cout << "IndexRange::checkRange : upper bound " << h << " is out of bounds" << endl;
27  return false;
28  }
29 
30  return true;
31 }

◆ commonLwb()

int LArSamples::IndexRange::commonLwb ( const IndexRange other) const
inline

Definition at line 39 of file IndexRange.h.

39 { return (other.lwb() > lwb() ? other.lwb() : lwb()); }

◆ commonUpb()

int LArSamples::IndexRange::commonUpb ( const IndexRange other) const
inline

Definition at line 40 of file IndexRange.h.

40 { return (other.upb() < upb() ? other.upb() : upb()); }

◆ hasSameRange() [1/3]

bool LArSamples::IndexRange::hasSameRange ( const IndexRange other) const
inline

Definition at line 30 of file IndexRange.h.

30 { return hasSameRange(other.lwb(), other.upb()); }

◆ hasSameRange() [2/3]

bool LArSamples::IndexRange::hasSameRange ( const TVectorD &  v) const
inline

Definition at line 31 of file IndexRange.h.

31 { return hasSameRange(v.GetLwb(), v.GetUpb()); }

◆ hasSameRange() [3/3]

bool LArSamples::IndexRange::hasSameRange ( int  lw,
int  up 
) const
inline

Definition at line 29 of file IndexRange.h.

29 { return (lwb() == lw && upb() == up); }

◆ isInRange()

bool LArSamples::IndexRange::isInRange ( int  i) const
inline

Definition at line 27 of file IndexRange.h.

27 { return (i >= lwb() && i <= upb()); }

◆ lwb()

virtual int LArSamples::IndexRange::lwb ( ) const
pure virtual

◆ providesRange() [1/3]

bool LArSamples::IndexRange::providesRange ( const IndexRange other) const
inline

Definition at line 34 of file IndexRange.h.

34 { return providesRange(other.lwb(), other.upb()); }

◆ providesRange() [2/3]

bool LArSamples::IndexRange::providesRange ( const TVectorD &  v) const
inline

Definition at line 35 of file IndexRange.h.

35 { return providesRange(v.GetLwb(), v.GetUpb()); }

◆ providesRange() [3/3]

bool LArSamples::IndexRange::providesRange ( int  lw,
int  up 
) const
inline

Definition at line 33 of file IndexRange.h.

33 { return (lwb() <= lw && upb() >= up); }

◆ rangeStr()

TString LArSamples::IndexRange::rangeStr ( ) const
inline

Definition at line 37 of file IndexRange.h.

37 { return Form("[%d, %d]", lwb(), upb()); }

◆ upb()

virtual int LArSamples::IndexRange::upb ( ) const
pure virtual

The documentation for this class was generated from the following files:
LArSamples::IndexRange::upb
virtual int upb() const =0
python.LumiCalcWorking.lw
lw
Definition: LumiCalcWorking.py:112
LArSamples::IndexRange::hasSameRange
bool hasSameRange(int lw, int up) const
Definition: IndexRange.h:29
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
LArSamples::IndexRange::isInRange
bool isInRange(int i) const
Definition: IndexRange.h:27
lumiFormat.i
int i
Definition: lumiFormat.py:85
h
CalibCoolCompareRT.up
up
Definition: CalibCoolCompareRT.py:109
LArSamples::IndexRange::lwb
virtual int lwb() const =0
python.PyAthena.v
v
Definition: PyAthena.py:154
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
LArSamples::IndexRange::providesRange
bool providesRange(int lw, int up) const
Definition: IndexRange.h:33