Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Adc Class Reference

#include <TofData.h>

Inheritance diagram for Adc:

TofValue TofValue List of all members.

Public Member Functions

 Adc ()
 Adc ()
void calculate (bool barrel, int tofid, bool east)
void calculate (bool barrel, int tofid, bool east)
int channel () const
int channel () const
int clock () const
int clock () const
int number () const
int number () const
double qtc () const
double qtc () const
void setCorr ()
void setCorr ()
void setElec ()
void setElec ()
void setNumber (int number)
void setNumber (int number)
void setUsed (bool used)
void setUsed (bool used)
void setValue (int value)
void setValue (int value)
int times () const
int times () const
void timesmm ()
void timesmm ()
void timespp ()
void timespp ()
bool used () const
bool used () const
double value () const
double value () const

Protected Attributes

int m_channel
int m_clock
double m_value

Private Attributes

bool m_calculated
bool m_corr
bool m_elec
double m_qtc

Constructor & Destructor Documentation

Adc::Adc  ) 
 

00068          {
00069   m_corr = false;
00070   m_elec = false;
00071   m_calculated = false;
00072   m_qtc  = -999.0;
00073 }

Adc::Adc  ) 
 


Member Function Documentation

void Adc::calculate bool  barrel,
int  tofid,
bool  east
 

void Adc::calculate bool  barrel,
int  tofid,
bool  east
 

00110                                                        {
00111   if( m_calculated ) return;
00112   if( m_corr ) {
00113     if( barrel ) {
00114       if( east ) {
00115         m_qtc = tofQCorrSvc->BQRaw1( tofid, m_channel*1.0 );
00116       }
00117       else {
00118         m_qtc = tofQCorrSvc->BQRaw2( tofid, m_channel*1.0 );
00119       }
00120     }
00121     else {
00122       m_qtc = tofQCorrSvc->EQRaw( tofid, m_channel*1.0 );
00123     }
00124   }
00125   else {
00126     m_qtc = m_channel*1.0;
00127   }
00128   if( m_elec ) {
00129     if( barrel ) {
00130       if( east ) {
00131         m_value = tofQElecSvc->BQTC1( tofid, m_qtc );
00132       }
00133       else {
00134         m_value = tofQElecSvc->BQTC2( tofid, m_qtc );
00135       }
00136     }
00137     else {
00138       m_value = tofQElecSvc->EQTC( tofid, m_qtc );
00139     }
00140   }
00141   else {
00142     m_value = m_qtc*1.0;
00143   }
00144   m_calculated = true;
00145   return;
00146 }

int TofValue::channel  )  const [inline, inherited]
 

00017 { return  m_channel;     }

int TofValue::channel  )  const [inline, inherited]
 

00017 { return  m_channel;     }

int TofValue::clock  )  const [inline, inherited]
 

00020 { return  m_clock;       }

int TofValue::clock  )  const [inline, inherited]
 

00020 { return  m_clock;       }

int TofValue::number  )  const [inline, inherited]
 

00019 { return  m_number;      }

int TofValue::number  )  const [inline, inherited]
 

00019 { return  m_number;      }

double Adc::qtc  )  const [inline]
 

00053 { return  m_qtc;        }

double Adc::qtc  )  const [inline]
 

00053 { return  m_qtc;        }

void Adc::setCorr  )  [inline]
 

00047 { m_corr   = true;       }

void Adc::setCorr  )  [inline]
 

00047 { m_corr   = true;       }

void Adc::setElec  )  [inline]
 

00048 { m_elec   = true;       }

void Adc::setElec  )  [inline]
 

00048 { m_elec   = true;       }

void TofValue::setNumber int  number  )  [inline, inherited]
 

00026 { m_number = number;     }

void TofValue::setNumber int  number  )  [inline, inherited]
 

00026 { m_number = number;     }

void TofValue::setUsed bool  used  )  [inline, inherited]
 

00028 { m_used   = used;       }

void TofValue::setUsed bool  used  )  [inline, inherited]
 

00028 { m_used   = used;       }

void Adc::setValue int  value  )  [virtual]
 

Implements TofValue.

void Adc::setValue int  value  )  [virtual]
 

Implements TofValue.

00076                               {
00077   m_clock = ( ( value & 0x7e000 ) >> 13 );
00078   if( value == 0x7fffffff ) {
00079     m_clock = 100;
00080     m_channel = 10000;
00081     m_qtc      = 10000.0;
00082     m_value    = 10000.0;
00083     m_calculated = true;
00084   }
00085   else if( value == -999 ) {
00086     m_channel = -999;
00087     m_qtc      = -999.0;
00088     m_value    = -999.0;
00089     m_calculated = true;
00090   }
00091   else {
00092     if( m_corr ) {
00093       m_channel = ( value & 0x1fff );
00094       if( ( ( value & 0x80000 ) != 0 ) && ( m_channel < 4000 ) ) {
00095         m_channel += 0x2000;
00096       }
00097     }
00098     else {
00099       m_channel = ( value & 0x1fff );
00100       if( ( value & 0x80000 ) != 0  ) {
00101         m_channel += 0x2000;
00102       }
00103     }
00104   }
00105 
00106   return;
00107 }

int TofValue::times  )  const [inline, inherited]
 

00018 { return  m_times;       }

int TofValue::times  )  const [inline, inherited]
 

00018 { return  m_times;       }

void TofValue::timesmm  )  [inherited]
 

void TofValue::timesmm  )  [inherited]
 

00042                        {
00043   m_times = m_times - 1;
00044   return;
00045 }

void TofValue::timespp  )  [inherited]
 

void TofValue::timespp  )  [inherited]
 

00036                        {
00037   m_times = m_times + 1;
00038   return;
00039 }

bool TofValue::used  )  const [inline, inherited]
 

00022 { return  m_used;        }

bool TofValue::used  )  const [inline, inherited]
 

00022 { return  m_used;        }

double TofValue::value  )  const [inline, inherited]
 

00021 { return  m_value;       }

double TofValue::value  )  const [inline, inherited]
 

00021 { return  m_value;       }


Member Data Documentation

bool Adc::m_calculated [private]
 

int TofValue::m_channel [protected, inherited]
 

int TofValue::m_clock [protected, inherited]
 

bool Adc::m_corr [private]
 

bool Adc::m_elec [private]
 

double Adc::m_qtc [private]
 

double TofValue::m_value [protected, inherited]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 15:51:47 2011 for BOSS6.5.5 by  doxygen 1.3.9.1