src
CondFormats
SiPixelObjects
interface
LinearConversion.h
Go to the documentation of this file.
1
#ifndef SiPixelObjects_LinearConversion_H
2
#define SiPixelObjects_LinearConversion_H
3
4
namespace
sipixelobjects
{
5
6
class
LinearConversion
{
7
public
:
8
LinearConversion
(
int
offset
= 0,
int
slope
= 1) :
theOffset
(
offset
),
theSlope
(
slope
) {}
9
int
convert
(
int
item
)
const
{
return
theOffset
+
theSlope
*
item
; }
10
int
inverse
(
int
item
)
const
{
return
(
item
-
theOffset
) /
theSlope
; }
11
int
offset
()
const
{
return
theOffset
; }
12
int
slope
()
const
{
return
theSlope
; }
13
14
private
:
15
int
theOffset
,
theSlope
;
16
};
17
18
}
// namespace sipixelobjects
19
#endif
sipixelobjects::LinearConversion::theSlope
int theSlope
Definition:
LinearConversion.h:15
sipixelobjects::LinearConversion::convert
int convert(int item) const
Definition:
LinearConversion.h:9
sipixelobjects::LinearConversion
Definition:
LinearConversion.h:6
B2GTnPMonitor_cfi.item
item
Definition:
B2GTnPMonitor_cfi.py:148
sipixelobjects::LinearConversion::inverse
int inverse(int item) const
Definition:
LinearConversion.h:10
sipixelobjects::LinearConversion::offset
int offset() const
Definition:
LinearConversion.h:11
sipixelobjects::LinearConversion::LinearConversion
LinearConversion(int offset=0, int slope=1)
Definition:
LinearConversion.h:8
sipixelobjects
Definition:
CablingPathToDetUnit.h:4
sipixelobjects::LinearConversion::slope
int slope() const
Definition:
LinearConversion.h:12
sipixelobjects::LinearConversion::theOffset
int theOffset
Definition:
LinearConversion.h:15
Generated for CMSSW Reference Manual by
1.8.14