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
ClusterNoiseFP420::ElectrodData Class Reference

#include <ClusterNoiseFP420.h>

Public Member Functions

ElectrodDisable getDisable () const
 
ElectrodNoise getNoise () const
 
void setData (short data)
 
void setData (float noise_, bool disable_)
 

Private Attributes

short Data
 

Detailed Description

Definition at line 21 of file ClusterNoiseFP420.h.

Member Function Documentation

ElectrodDisable ClusterNoiseFP420::ElectrodData::getDisable ( ) const
inline

Definition at line 25 of file ClusterNoiseFP420.h.

25 {return ( (Data>0) ? false : true );}// if Data <=0 then electrode is disable
ElectrodNoise ClusterNoiseFP420::ElectrodData::getNoise ( ) const
inline

Definition at line 24 of file ClusterNoiseFP420.h.

References abs.

24 {return static_cast<ElectrodNoise> (std::abs(Data)/10.0);}
#define abs(x)
Definition: mlp_lapack.h:159
float ElectrodNoise
void ClusterNoiseFP420::ElectrodData::setData ( short  data)
inline

Definition at line 26 of file ClusterNoiseFP420.h.

References runTheMatrix::data.

Referenced by FP420ClusterMain::run().

void ClusterNoiseFP420::ElectrodData::setData ( float  noise_,
bool  disable_ 
)
inline

Definition at line 27 of file ClusterNoiseFP420.h.

References gather_cfg::cout.

27  {
28  short noise = static_cast<short> (noise_*10.0 + 0.5) & 0x01FF;
29  Data = ( disable_ ? -1 : 1 ) * noise; // Data = sign(+/-1) * Noise(Adc count). if Data <=0 then electrode is disable
30 
31 #ifdef mynsdebug0
32  std::cout
33  << std::fixed <<"ClusterNoiseFP420.h:: ElectrodData: noise= " << noise_ << " \t"
34  <<": disable= " << disable_ << " \t"
35  <<"sign Data(=noise*10.0 + 0.5)= " << Data << " \t"
36  <<"in getNoise we do: abs(Data)/10.0, so it is OK" << " \t"
37  << std::endl;
38 #endif
39  };
static const char noise_[]
tuple cout
Definition: gather_cfg.py:41

Member Data Documentation

short ClusterNoiseFP420::ElectrodData::Data
private

Definition at line 39 of file ClusterNoiseFP420.h.