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 funct::abs().

24 {return static_cast<ElectrodNoise> (std::abs(Data)/10.0);}
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float ElectrodNoise
void ClusterNoiseFP420::ElectrodData::setData ( short  data)
inline

Definition at line 26 of file ClusterNoiseFP420.h.

References data.

Referenced by FP420ClusterMain::run().

26 {Data=data;}
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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:121

Member Data Documentation

short ClusterNoiseFP420::ElectrodData::Data
private

Definition at line 39 of file ClusterNoiseFP420.h.