CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
CalibCoeff Class Reference

intercalibration coefficient More...

#include <CalibCoeff.h>

Public Member Functions

 CalibCoeff (const double &value=1., const bool &isGood=0)
 ctor More...
 
double difference () const
 the abs difference wrt prev value More...
 
double operator*= (const double &var)
 update the value and turn into good the coefficient More...
 
void setStatus (const bool &stat)
 set its value and turn into good the coefficient More...
 
void setValue (const double &val)
 set its value and turn into good the coefficient More...
 
bool status () const
 its status More...
 
double value () const
 its value More...
 
 ~CalibCoeff ()
 dtor More...
 

Private Attributes

double m_difference
 the difference with the previous value More...
 
bool m_isGood
 if it is good More...
 
double m_value
 the actual value More...
 

Detailed Description

intercalibration coefficient

Date:
2008/01/23 10:59:53
Revision:
1.1.2.1
Id:
CalibCoeff.h,v 1.1.2.1 2008/01/23 10:59:53 govoni Exp
Author
Author:
govoni

Definition at line 14 of file CalibCoeff.h.

Constructor & Destructor Documentation

CalibCoeff::CalibCoeff ( const double &  value = 1.,
const bool &  isGood = 0 
)

ctor

Date:
2008/01/23 10:59:54
Revision:
1.1.2.1
Id:
CalibCoeff.cc,v 1.1.2.1 2008/01/23 10:59:54 govoni Exp
Author
Author:
govoni

Definition at line 11 of file CalibCoeff.cc.

12  :
13  m_value (value),
14  m_isGood (isGood),
16  {}
double value() const
its value
Definition: CalibCoeff.cc:29
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:43
bool m_isGood
if it is good
Definition: CalibCoeff.h:41
double m_value
the actual value
Definition: CalibCoeff.h:39
CalibCoeff::~CalibCoeff ( )

dtor

Definition at line 22 of file CalibCoeff.cc.

22 {}

Member Function Documentation

double CalibCoeff::difference ( ) const

the abs difference wrt prev value

Definition at line 39 of file CalibCoeff.cc.

References m_difference, and m_isGood.

40 {
41  return m_isGood * m_difference - !m_isGood ;
42 }
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:43
bool m_isGood
if it is good
Definition: CalibCoeff.h:41
double CalibCoeff::operator*= ( const double &  var)

update the value and turn into good the coefficient

Definition at line 83 of file CalibCoeff.cc.

References m_difference, m_isGood, m_value, and funct::true.

84 {
85  double oldval = m_value ;
86  m_value *= var ;
87  m_difference = fabs (m_value - oldval) ;
88  m_isGood = true ;
89  return m_value ;
90 }
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:43
bool m_isGood
if it is good
Definition: CalibCoeff.h:41
double m_value
the actual value
Definition: CalibCoeff.h:39
void CalibCoeff::setStatus ( const bool &  stat)

set its value and turn into good the coefficient

Definition at line 72 of file CalibCoeff.cc.

References m_isGood, and mathSSE::return().

73 {
74  m_isGood = stat ;
75  return ;
76 }
return((rh^lh)&mask)
bool m_isGood
if it is good
Definition: CalibCoeff.h:41
void CalibCoeff::setValue ( const double &  val)
bool CalibCoeff::status ( ) const

its status

Definition at line 49 of file CalibCoeff.cc.

References m_isGood.

50 {
51  return m_isGood ;
52 }
bool m_isGood
if it is good
Definition: CalibCoeff.h:41
double CalibCoeff::value ( ) const

Member Data Documentation

double CalibCoeff::m_difference
private

the difference with the previous value

Definition at line 43 of file CalibCoeff.h.

Referenced by difference(), operator*=(), and setValue().

bool CalibCoeff::m_isGood
private

if it is good

Definition at line 41 of file CalibCoeff.h.

Referenced by difference(), operator*=(), setStatus(), setValue(), status(), and value().

double CalibCoeff::m_value
private

the actual value

Definition at line 39 of file CalibCoeff.h.

Referenced by operator*=(), setValue(), and value().