CMS 3D CMS Logo

Public Member Functions | Private Attributes

sipixelobjects::LinearConversion Class Reference

#include <LinearConversion.h>

List of all members.

Public Member Functions

int convert (int item) const
int inverse (int item) const
 LinearConversion (int offset=0, int slope=1)
int offset () const
int slope () const

Private Attributes

int theOffset
int theSlope

Detailed Description

Definition at line 6 of file LinearConversion.h.


Constructor & Destructor Documentation

sipixelobjects::LinearConversion::LinearConversion ( int  offset = 0,
int  slope = 1 
) [inline]

Definition at line 9 of file LinearConversion.h.


Member Function Documentation

int sipixelobjects::LinearConversion::convert ( int  item) const [inline]

Definition at line 10 of file LinearConversion.h.

References theOffset, and theSlope.

Referenced by sipixelobjects::PixelROC::toGlobal().

{ return theOffset+theSlope*item; }
int sipixelobjects::LinearConversion::inverse ( int  item) const [inline]

Definition at line 11 of file LinearConversion.h.

References theOffset, and theSlope.

Referenced by sipixelobjects::PixelROC::toLocal().

{ return (item - theOffset)/theSlope; } 
int sipixelobjects::LinearConversion::offset ( ) const [inline]

Definition at line 12 of file LinearConversion.h.

References theOffset.

{ return theOffset; }
int sipixelobjects::LinearConversion::slope ( ) const [inline]

Definition at line 13 of file LinearConversion.h.

References theSlope.

{ return theSlope; }

Member Data Documentation

Definition at line 16 of file LinearConversion.h.

Referenced by convert(), inverse(), and offset().

Definition at line 16 of file LinearConversion.h.

Referenced by convert(), inverse(), and slope().