PmtData Class Reference

#include <TofData.h>

List of all members.

Public Member Functions

 PmtData ()
 ~PmtData ()
PmtDataoperator= (const PmtData &source)
unsigned int iden () const
unsigned int times () const
int adcChannel ()
double qtc ()
double adc ()
int qclock ()
int tdcChannel ()
double tdc ()
int tclock ()
unsigned int quality () const
void timespp ()
void timesmm ()
int qtimes ()
void qtimespp ()
void qtimesmm ()
int ttimes ()
void ttimespp ()
void ttimesmm ()
int qnumber ()
int tnumber ()
bool qused ()
bool tused ()
bool used ()
void setIdentify (unsigned int iden)
void setAdc (Adc *adc)
void setTdc (Tdc *tdc)
void setUsed ()
void clear ()

Private Attributes

unsigned int m_iden_value
unsigned int m_times
unsigned int m_quality
Adcm_adc
Tdcm_tdc


Detailed Description

Definition at line 67 of file TofData.h.


Constructor & Destructor Documentation

PmtData::PmtData (  ) 

Definition at line 246 of file TofData.cxx.

References m_adc, m_iden_value, m_quality, m_tdc, and m_times.

00246                  {
00247   m_iden_value = 0;
00248   m_times      = 0;
00249   m_quality    = 0;
00250   m_adc        = 0;
00251   m_tdc        = 0;
00252 }

PmtData::~PmtData (  ) 

Definition at line 255 of file TofData.cxx.

References clear().

00255                   {
00256   PmtData::clear();
00257 }


Member Function Documentation

double PmtData::adc (  ) 

Definition at line 293 of file TofData.cxx.

References TofID::cell_id(), TofValue::channel(), TofID::is_mrpc(), m_adc, m_iden_value, m_tdc, Adc::qtc(), and TofValue::value().

Referenced by TofData::adc(), TofData::adc1(), TofData::adc2(), TofData::data(), setAdc(), and TofRawDataProvider::tofDataMapFull().

00293                     {
00294   double value = -999.0;
00295   if( m_adc ) {
00296 
00297     if( TofID::is_mrpc( TofID::cell_id( m_iden_value ) ) ) {
00298       if( m_tdc ) {
00299         double tleading = m_tdc->value();
00300         if( tleading>0.0 ) {
00301           int qchannel = m_adc->channel();
00302           if( qchannel!=10000 && qchannel!=-999 ) {
00303             double ttrailing = m_adc->qtc();
00304             value = ttrailing - tleading;
00305           }
00306         }
00307       }
00308     }
00309     else {
00310       value = m_adc->value();
00311     }
00312   }
00313   else {
00314     if( m_tdc ) {
00315       value = 10000.0;
00316     }
00317   }
00318   return value;
00319 }

int PmtData::adcChannel (  ) 

Definition at line 270 of file TofData.cxx.

References TofValue::channel(), and m_adc.

Referenced by TofData::adcChannel(), TofData::adcChannelEast(), and TofData::adcChannelWest().

00270                         {
00271   int channel = -999;
00272   if( m_adc ) {
00273     channel = m_adc->channel();
00274   }
00275   return channel;
00276 }

void PmtData::clear (  ) 

Definition at line 499 of file TofData.cxx.

References m_adc, m_tdc, TofValue::times(), and TofValue::timesmm().

Referenced by ~PmtData().

00499                     {
00500   if( m_adc ) {
00501     if( m_adc->times() <= 1 ) {
00502       delete m_adc;
00503       m_adc = 0;
00504     }
00505     else {
00506       m_adc->timesmm();
00507     }
00508   }
00509   if( m_tdc ) {
00510     if( m_tdc->times() <= 1 ) {
00511       delete m_tdc;
00512       m_tdc = 0;
00513     }
00514     else {
00515       m_tdc->timesmm();
00516     }
00517   }
00518   return;
00519 }

unsigned int PmtData::iden (  )  const [inline]

Definition at line 75 of file TofData.h.

References m_iden_value.

00075 { return  m_iden_value;        }

PmtData & PmtData::operator= ( const PmtData source  ) 

Definition at line 260 of file TofData.cxx.

References m_adc, m_iden_value, m_quality, m_tdc, and m_times.

00260                                                 {
00261   m_iden_value = source.m_iden_value;
00262   m_times      = source.m_times;
00263   m_quality    = source.m_quality;
00264   m_adc        = source.m_adc;
00265   m_tdc        = source.m_tdc;
00266   return *this;
00267 }

int PmtData::qclock (  ) 

Definition at line 322 of file TofData.cxx.

References TofValue::clock(), and m_adc.

Referenced by TofData::qclock(), TofData::qclock1(), and TofData::qclock2().

00322                     {
00323   int clock = -999;
00324   if( m_adc ) {
00325     clock = m_adc->clock();
00326   }
00327   return clock;
00328 }

int PmtData::qnumber (  ) 

Definition at line 420 of file TofData.cxx.

References m_adc, and TofValue::number().

Referenced by TofData::qnumber1(), and TofData::qnumber2().

00420                      {
00421   int number = 0;
00422   if( m_adc ) {
00423     number = m_adc->number();
00424   }
00425   return number;
00426 }

double PmtData::qtc (  ) 

Definition at line 279 of file TofData.cxx.

References m_adc, m_tdc, and Adc::qtc().

Referenced by TofData::qtc(), TofData::qtc1(), and TofData::qtc2().

00279                     {
00280   double value = -999.0;
00281   if( m_adc ) {
00282     value = m_adc->qtc();
00283   }
00284   else {
00285     if( m_tdc ) {
00286       value = 10000.0;
00287     }
00288   }
00289   return value;
00290 }

int PmtData::qtimes (  ) 

Definition at line 402 of file TofData.cxx.

References m_adc, TofValue::times(), and times().

Referenced by TofData::qtimes1(), and TofData::qtimes2().

00402                     {
00403   int times = -1;
00404   if( m_adc ) {
00405     times = m_adc->times();
00406   }
00407   return times;
00408 }

void PmtData::qtimesmm (  ) 

Definition at line 378 of file TofData.cxx.

References m_adc, and TofValue::timesmm().

Referenced by TofRawDataProvider::tofDataMapFull().

00378                        {
00379   if( m_adc ) {
00380     m_adc->timesmm();
00381   }
00382   return;
00383 }

void PmtData::qtimespp (  ) 

Definition at line 370 of file TofData.cxx.

References m_adc, and TofValue::timespp().

Referenced by TofData::setBackward(), and TofData::setForward().

00370                        {
00371   if( m_adc ) {
00372     m_adc->timespp();
00373   }
00374   return;
00375 }

unsigned int PmtData::quality (  )  const [inline]

Definition at line 84 of file TofData.h.

References m_quality.

Referenced by TofData::setBackward(), TofData::setForward(), and TofRawDataProvider::tofDataMapFull().

00084 { return  m_quality;           }

bool PmtData::qused (  ) 

Definition at line 438 of file TofData.cxx.

References m_adc, TofValue::used(), and used().

Referenced by TofData::qused1(), and TofData::qused2().

00438                     {
00439   bool used = false;
00440   if( m_adc ) {
00441     used = m_adc->used();
00442   }
00443   return used;
00444 }

void PmtData::setAdc ( Adc adc  ) 

Definition at line 468 of file TofData.cxx.

References adc(), m_adc, m_quality, TofValue::times(), and TofValue::timespp().

Referenced by TofRawDataProvider::tofDataMapFull().

00468                                {
00469   m_adc = adc;
00470   if( adc->channel() != -999 ) {
00471     if( m_adc->times() == -1 ) { m_adc->timespp(); }
00472     m_quality = ( m_quality | 0x2 );
00473   }
00474   return;
00475 }

void PmtData::setIdentify ( unsigned int  iden  )  [inline]

Definition at line 102 of file TofData.h.

References m_iden_value.

Referenced by TofRawDataProvider::tofDataMapFull().

00102 { m_iden_value = iden; }

void PmtData::setTdc ( Tdc tdc  ) 

Definition at line 478 of file TofData.cxx.

References m_quality, m_tdc, tdc(), TofValue::times(), and TofValue::timespp().

Referenced by TofRawDataProvider::tofDataMapFull(), and TofRawDataProvider::tofDataMapOnlineMode().

00478                                {
00479   m_tdc = tdc;
00480   if( tdc->channel() != -999 ) {
00481     if( m_tdc->times() == -1 ) { m_tdc->timespp(); }
00482     m_quality = ( m_quality | 0x1 );
00483   }
00484   return;
00485 }

void PmtData::setUsed (  ) 

Definition at line 488 of file TofData.cxx.

References m_adc, m_tdc, and TofValue::setUsed().

Referenced by TofData::setUsed().

00488                       {
00489   if( m_adc ) {
00490     m_adc->setUsed( true );
00491   }
00492   if( m_tdc ) {
00493     m_tdc->setUsed( true );
00494   }
00495   return;
00496 }

int PmtData::tclock (  ) 

Definition at line 349 of file TofData.cxx.

References TofValue::clock(), and m_tdc.

Referenced by TofData::tclock(), TofData::tclock1(), and TofData::tclock2().

00349                     {
00350   int clock = -999;
00351   if( m_tdc ) {
00352     clock = m_tdc->clock();
00353   }
00354   return clock;
00355 }

double PmtData::tdc (  ) 

Definition at line 340 of file TofData.cxx.

References m_tdc, and TofValue::value().

Referenced by TofData::data(), setTdc(), TofData::tdc(), TofData::tdc1(), TofData::tdc2(), and TofRawDataProvider::tofDataMapOnlineMode().

00340                     {
00341   double value = -999.;
00342   if( m_tdc ) {
00343     value = m_tdc->value();
00344   }
00345   return value;
00346 }

int PmtData::tdcChannel (  ) 

Definition at line 331 of file TofData.cxx.

References TofValue::channel(), and m_tdc.

Referenced by TofData::tdcChannel(), TofData::tdcChannelEast(), and TofData::tdcChannelWest().

00331                         {
00332   int channel = -999;
00333   if( m_tdc ) {
00334     channel = m_tdc->channel();
00335   }
00336   return channel;
00337 }

unsigned int PmtData::times (  )  const [inline]

Definition at line 76 of file TofData.h.

References m_times.

Referenced by TofData::clear(), TofData::eastTimes(), qtimes(), ttimes(), and TofData::westTimes().

00076 { return  m_times;             }

void PmtData::timesmm (  ) 

Definition at line 364 of file TofData.cxx.

References m_times.

Referenced by TofData::clear().

00364                       {
00365   m_times = m_times - 1;
00366   return;
00367 }

void PmtData::timespp (  ) 

Definition at line 358 of file TofData.cxx.

References m_times.

Referenced by TofData::setBackward(), and TofData::setForward().

00358                       {
00359   m_times = m_times + 1;
00360   return;
00361 }

int PmtData::tnumber (  ) 

Definition at line 429 of file TofData.cxx.

References m_tdc, and TofValue::number().

Referenced by TofData::tnumber1(), and TofData::tnumber2().

00429                      {
00430   int number = 0;
00431   if( m_tdc ) {
00432     number = m_tdc->number();
00433   }
00434   return number;
00435 }

int PmtData::ttimes (  ) 

Definition at line 411 of file TofData.cxx.

References m_tdc, TofValue::times(), and times().

Referenced by TofData::ttimes1(), and TofData::ttimes2().

00411                     {
00412   int times = -1;
00413   if( m_tdc ) {
00414     times = m_tdc->times();
00415   }
00416   return times;
00417 }

void PmtData::ttimesmm (  ) 

Definition at line 394 of file TofData.cxx.

References m_tdc, and TofValue::timesmm().

00394                        {
00395   if( m_tdc ) {
00396     m_tdc->timesmm();
00397   }
00398   return;
00399 }

void PmtData::ttimespp (  ) 

Definition at line 386 of file TofData.cxx.

References m_tdc, and TofValue::timespp().

Referenced by TofData::setBackward(), and TofData::setForward().

00386                        {
00387   if( m_tdc ) {
00388     m_tdc->timespp();
00389   }
00390   return;
00391 }

bool PmtData::tused (  ) 

Definition at line 447 of file TofData.cxx.

References m_tdc, TofValue::used(), and used().

Referenced by TofData::tused1(), and TofData::tused2().

00447                     {
00448   bool used = false;
00449   if( m_tdc ) {
00450     used = m_tdc->used();
00451   }
00452   return used;
00453 }

bool PmtData::used (  ) 

Definition at line 456 of file TofData.cxx.

References m_adc, m_tdc, and TofValue::used().

Referenced by qused(), tused(), TofData::used(), TofData::used1(), and TofData::used2().

00456                    {
00457   bool used = false;
00458   if( m_adc ) {
00459     used = ( used || m_adc->used() );
00460   }
00461   if( m_tdc ) {
00462     used = ( used || m_tdc->used() );
00463   }
00464   return used;
00465 }


Member Data Documentation

Adc* PmtData::m_adc [private]

Definition at line 113 of file TofData.h.

Referenced by adc(), adcChannel(), clear(), operator=(), PmtData(), qclock(), qnumber(), qtc(), qtimes(), qtimesmm(), qtimespp(), qused(), setAdc(), setUsed(), and used().

unsigned int PmtData::m_iden_value [private]

Definition at line 110 of file TofData.h.

Referenced by adc(), iden(), operator=(), PmtData(), and setIdentify().

unsigned int PmtData::m_quality [private]

Definition at line 112 of file TofData.h.

Referenced by operator=(), PmtData(), quality(), setAdc(), and setTdc().

Tdc* PmtData::m_tdc [private]

Definition at line 114 of file TofData.h.

Referenced by adc(), clear(), operator=(), PmtData(), qtc(), setTdc(), setUsed(), tclock(), tdc(), tdcChannel(), tnumber(), ttimes(), ttimesmm(), ttimespp(), tused(), and used().

unsigned int PmtData::m_times [private]

Definition at line 111 of file TofData.h.

Referenced by operator=(), PmtData(), times(), timesmm(), and timespp().


Generated on Tue Nov 29 23:20:42 2016 for BOSS_7.0.2 by  doxygen 1.4.7