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

SimDigit Class Reference

#include <SimDigit.h>

List of all members.

Public Member Functions

 SimDigit ()
 SimDigit (PlexPixelSpotId psid, RawChannelId rcid, Int_t adc=0, Int_t tdc=0, DigiSignal *signalPtr=NULL, Int_t errors=0)
void SetPixelSpotId (const PlexPixelSpotId &in)
void SetRawChannelId (const RawChannelId &in)
void SetADC (Int_t in)
void SetTDC (Int_t in)
void SetSignal (DigiSignal *in)
void SetErrors (Int_t in)
PlexPixelSpotId GetPixelSpotId (void) const
RawChannelId GetRawChannelId (void) const
Int_t GetADC (void) const
Int_t GetTDC (void) const
DigiSignalGetSignal (void) const
Int_t GetErrors (void) const
Double_t GetTime (void) const
const char * AsString (void) const
void ComputeTime (void)
const SimDigitoperator= (const SimDigit &rhs)

Private Attributes

PlexPixelSpotId fPsid
RawChannelId fRcid
Int_t fADC
Int_t fTDC
Int_t fErrors
DigiSignalfSignal
Double_t fTime


Constructor & Destructor Documentation

SimDigit::SimDigit  )  [inline]
 

Definition at line 26 of file SimDigit.h.

00026 {};

SimDigit::SimDigit PlexPixelSpotId  psid,
RawChannelId  rcid,
Int_t  adc = 0,
Int_t  tdc = 0,
DigiSignal signalPtr = NULL,
Int_t  errors = 0
[inline]
 

Definition at line 27 of file SimDigit.h.

00033               :
00034     fPsid(psid),
00035     fRcid(rcid),
00036     fADC(adc),
00037     fTDC(tdc),
00038     fErrors(errors),
00039     fSignal(signalPtr),
00040     fTime(0)
00041     { ComputeTime(); };


Member Function Documentation

const char * SimDigit::AsString void   )  const
 

Definition at line 26 of file SimDigit.cxx.

References RawChannelId::AsString(), PlexPixelSpotId::AsString(), Form(), fPsid, fRcid, fSignal, fTime, and DigiSignal::GetTruth().

Referenced by SimElectronics::AddDigit(), and SimQieElectronics::ReadoutPmt().

00027 {
00028   return Form("%s %s (%4d ADC) (%4d TDC = %2.1f ns) (%2d Errors) (0x%02x Truth)",
00029               fPsid.AsString(),
00030               fRcid.AsString(),
00031               fADC,
00032               fTDC,
00033               fTime/Munits::ns,
00034               fErrors,
00035               fSignal?(fSignal->GetTruth()):0
00036               );
00037 }

void SimDigit::ComputeTime void   ) 
 

Definition at line 39 of file SimDigit.cxx.

References fRcid, fTDC, fTime, Calibrator::GetTimeFromTDC(), and Calibrator::Instance().

00040 {
00041   // Convert TDC to Munits time.
00042 
00043   fTime = Calibrator::Instance().GetTimeFromTDC(fTDC,fRcid);
00044 }

Int_t SimDigit::GetADC void   )  const [inline]
 

Definition at line 54 of file SimDigit.h.

Referenced by SimDetector::CompileStats(), DetSim::Get(), and SimQieElectronics::ReadoutPmt().

00054 { return fADC; };

Int_t SimDigit::GetErrors void   )  const [inline]
 

Definition at line 57 of file SimDigit.h.

Referenced by DetSim::Get(), and compareDigits::operator()().

00057 { return fErrors; };

PlexPixelSpotId SimDigit::GetPixelSpotId void   )  const [inline]
 

Definition at line 52 of file SimDigit.h.

00052 { return fPsid; };

RawChannelId SimDigit::GetRawChannelId void   )  const [inline]
 

Definition at line 53 of file SimDigit.h.

Referenced by DetSim::Get().

00053 { return fRcid; };

DigiSignal* SimDigit::GetSignal void   )  const [inline]
 

Definition at line 56 of file SimDigit.h.

Referenced by DetSim::Get().

00056 { return fSignal; };

Int_t SimDigit::GetTDC void   )  const [inline]
 

Definition at line 55 of file SimDigit.h.

Referenced by DetSim::Get().

00055 { return fTDC; };

Double_t SimDigit::GetTime void   )  const [inline]
 

Definition at line 58 of file SimDigit.h.

Referenced by compareDigits::operator()().

00058 { return fTime; };

const SimDigit & SimDigit::operator= const SimDigit rhs  ) 
 

Definition at line 14 of file SimDigit.cxx.

References fADC, fErrors, fPsid, fRcid, fSignal, fTDC, and fTime.

00015 {
00016   fPsid = rhs.fPsid;
00017   fRcid = rhs.fRcid;
00018   fADC = rhs.fADC;
00019   fTDC = rhs.fTDC;
00020   fErrors = rhs.fErrors;
00021   fSignal = rhs.fSignal;
00022   fTime   = rhs.fTime;
00023   return *this;
00024 }

void SimDigit::SetADC Int_t  in  )  [inline]
 

Definition at line 46 of file SimDigit.h.

00046 { fADC = in; };

void SimDigit::SetErrors Int_t  in  )  [inline]
 

Definition at line 49 of file SimDigit.h.

00049 { fErrors = in; };

void SimDigit::SetPixelSpotId const PlexPixelSpotId in  )  [inline]
 

Definition at line 44 of file SimDigit.h.

00044 { fPsid = in; };

void SimDigit::SetRawChannelId const RawChannelId in  )  [inline]
 

Definition at line 45 of file SimDigit.h.

00045 { fRcid = in; };

void SimDigit::SetSignal DigiSignal in  )  [inline]
 

Definition at line 48 of file SimDigit.h.

00048 { fSignal = in; };

void SimDigit::SetTDC Int_t  in  )  [inline]
 

Definition at line 47 of file SimDigit.h.

00047 { fTDC = in; ComputeTime(); };


Member Data Documentation

Int_t SimDigit::fADC [private]
 

Definition at line 70 of file SimDigit.h.

Referenced by operator=().

Int_t SimDigit::fErrors [private]
 

Definition at line 72 of file SimDigit.h.

Referenced by operator=().

PlexPixelSpotId SimDigit::fPsid [private]
 

Definition at line 68 of file SimDigit.h.

Referenced by AsString(), and operator=().

RawChannelId SimDigit::fRcid [private]
 

Definition at line 69 of file SimDigit.h.

Referenced by AsString(), ComputeTime(), and operator=().

DigiSignal* SimDigit::fSignal [private]
 

Definition at line 73 of file SimDigit.h.

Referenced by AsString(), and operator=().

Int_t SimDigit::fTDC [private]
 

Definition at line 71 of file SimDigit.h.

Referenced by ComputeTime(), and operator=().

Double_t SimDigit::fTime [private]
 

Definition at line 74 of file SimDigit.h.

Referenced by AsString(), ComputeTime(), and operator=().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:18 2010 for loon by  doxygen 1.3.9.1