ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArSamplesMon
src
IndexRange.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
LArSamplesMon/IndexRange.h
"
6
7
#include <iostream>
8
using
std::cout;
9
using
std::endl;
10
11
using namespace
LArSamples
;
12
13
14
bool
IndexRange::checkRange
(
int
& l,
int
&
h
)
const
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
}
IndexRange.h
LArSamples::IndexRange::lwb
virtual int lwb() const =0
LArSamples::IndexRange::isInRange
bool isInRange(int i) const
Definition
IndexRange.h:27
LArSamples::IndexRange::checkRange
bool checkRange(int &l, int &h) const
Definition
IndexRange.cxx:14
LArSamples::IndexRange::upb
virtual int upb() const =0
h
LArSamples
Definition
AbsShape.h:24
Generated on
for ATLAS Offline Software by
1.17.0