CMS 3D CMS Logo

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=false)
 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

Definition at line 10 of file CalibCoeff.h.

Constructor & Destructor Documentation

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

ctor

Definition at line 7 of file CalibCoeff.cc.

8  : m_value(value), m_isGood(isGood), m_difference(m_value) {}
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:36
Definition: value.py:1
bool m_isGood
if it is good
Definition: CalibCoeff.h:34
double m_value
the actual value
Definition: CalibCoeff.h:32
CalibCoeff::~CalibCoeff ( )

dtor

Definition at line 12 of file CalibCoeff.cc.

12 {}

Member Function Documentation

double CalibCoeff::difference ( ) const

the abs difference wrt prev value

Definition at line 20 of file CalibCoeff.cc.

References m_difference, and m_isGood.

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

update the value and turn into good the coefficient

Definition at line 44 of file CalibCoeff.cc.

References m_difference, m_isGood, m_value, and trigObjTnPSource_cfi::var.

44  {
45  double oldval = m_value;
46  m_value *= var;
47  m_difference = fabs(m_value - oldval);
48  m_isGood = true;
49  return m_value;
50 }
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:36
bool m_isGood
if it is good
Definition: CalibCoeff.h:34
double m_value
the actual value
Definition: CalibCoeff.h:32
void CalibCoeff::setStatus ( const bool &  stat)

set its value and turn into good the coefficient

Definition at line 37 of file CalibCoeff.cc.

References m_isGood, and hgcalPlots::stat.

37  {
38  m_isGood = stat;
39  return;
40 }
bool m_isGood
if it is good
Definition: CalibCoeff.h:34
void CalibCoeff::setValue ( const double &  val)

set its value and turn into good the coefficient

Definition at line 28 of file CalibCoeff.cc.

References m_difference, m_isGood, m_value, and heppy_batch::val.

Referenced by Vispa.Views.PropertyView.StringProperty::buttonClicked(), Vispa.Views.PropertyView.FileProperty::buttonClicked(), Vispa.Views.PropertyView.FileVectorProperty::buttonClicked(), Vispa.Views.PropertyView.TextEditWithButtonProperty::keyPressEvent(), and Vispa.Views.PropertyView.TextEditWithButtonProperty::setMultiline().

28  {
29  m_value = val;
31  m_isGood = true;
32  return;
33 }
double m_difference
the difference with the previous value
Definition: CalibCoeff.h:36
bool m_isGood
if it is good
Definition: CalibCoeff.h:34
double m_value
the actual value
Definition: CalibCoeff.h:32
bool CalibCoeff::status ( ) const

its status

Definition at line 24 of file CalibCoeff.cc.

References m_isGood.

24 { return m_isGood; }
bool m_isGood
if it is good
Definition: CalibCoeff.h:34
double CalibCoeff::value ( ) const

Member Data Documentation

double CalibCoeff::m_difference
private

the difference with the previous value

Definition at line 36 of file CalibCoeff.h.

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

bool CalibCoeff::m_isGood
private

if it is good

Definition at line 34 of file CalibCoeff.h.

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

double CalibCoeff::m_value
private

the actual value

Definition at line 32 of file CalibCoeff.h.

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