Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

TDSPRating Class Reference

#include <TDSPRating.h>

Inheritance diagram for TDSPRating:

TDSPFilter TDSPFilterBank TDSPStochasticProcess TDSPCorrelationFilter TDSPStochasticScalar TDSPStochasticSignal TDSPJakes

Detailed Description

a class handles the rating of stochastic processes and interpolations etc.
Author:
Peter Jung

Definition at line 32 of file TDSPRating.h.

Public Member Functions

 TDSPRating ()
virtual ~TDSPRating ()
void SetRate (Double_t)
Double_t GetRate ()
Double_t GetRelativeRate ()
void SetRateSigma (Double_t s)
Double_t GetRateSigma () const
Double_t GetLastRelativeRate ()
void ResetRating ()
Bool_t IsRate ()
virtual void PrepareRate (Double_t r)

Protected Member Functions

void Next ()
Int_t NewRelativeRate ()

Protected Attributes

Double_t fRate
UInt_t fRelativeRate
Double_t fRelativeRateMean
Double_t fRelativeRateSigma
UInt_t fRateIndex


Constructor & Destructor Documentation

TDSPRating::TDSPRating  ) 
 

virtual TDSPRating::~TDSPRating  )  [virtual]
 


Member Function Documentation

Double_t TDSPRating::GetLastRelativeRate  )  [inline]
 

Definition at line 56 of file TDSPRating.h.

References fRelativeRate.

00056 { return fRelativeRate;}; // get the last relative rating

Double_t TDSPRating::GetRate  )  [inline]
 

Definition at line 52 of file TDSPRating.h.

References fRate.

Referenced by TDSPFifoFilter::GetRate().

00052 { return fRate;};                     // Get the Rate for the Stochastic Process

Double_t TDSPRating::GetRateSigma  )  const [inline]
 

Definition at line 55 of file TDSPRating.h.

References fRelativeRateSigma.

00055 { return fRelativeRateSigma;}; // Get the Sigma

Double_t TDSPRating::GetRelativeRate  )  [inline]
 

Definition at line 53 of file TDSPRating.h.

References fRelativeRateMean.

00053 { return fRelativeRateMean;}; // Get mean of the relative ratings

Bool_t TDSPRating::IsRate  )  [inline]
 

Definition at line 73 of file TDSPRating.h.

References fRateIndex.

Referenced by TDSPStochasticProcess::SetRepresentation().

00073                                  {
00074   return fRateIndex == 0;
00075 }

Int_t TDSPRating::NewRelativeRate  )  [inline, protected]
 

Definition at line 78 of file TDSPRating.h.

References fRelativeRate, fRelativeRateMean, fRelativeRateSigma, and ResetRating().

Referenced by Next(), and PrepareRate().

00078                                          { 
00079   ResetRating();
00080   return (fRelativeRate = TMath::Max(1,TMath::Nint(gRandom->Gaus(fRelativeRateMean,fRelativeRateSigma)))); 
00081 } 

void TDSPRating::Next  )  [inline, protected]
 

Definition at line 65 of file TDSPRating.h.

References fRateIndex, fRelativeRate, and NewRelativeRate().

Referenced by TDSPStochasticProcess::SetRepresentation().

00065                                {
00066   
00067   if (++fRateIndex>=fRelativeRate) {
00068     NewRelativeRate();
00069     fRateIndex=0;
00070   }
00071 }

void TDSPRating::PrepareRate Double_t  r  )  [inline, virtual]
 

Reimplemented in TDSPStochasticScalar.

Definition at line 85 of file TDSPRating.h.

References fRate, fRelativeRateMean, and NewRelativeRate().

Referenced by TDSPStochasticScalar::PrepareRate(), and TDSPStochasticProcess::SetRepresentation().

00085                                                   {
00086   
00087 
00088 #if defined(__OPTIMIZE__)&&defined(__GNUC__)
00089   // Workaround for wrong optimization in GCC 2.95.3
00090   //
00091   volatile Double_t Relative_Rate = rate/fRate;
00092 #else
00093   Double_t Relative_Rate = rate/fRate;
00094 #endif
00095   // The Relative Rates has been changed (this can only come from manual settings)
00096   //
00097   if (fRelativeRateMean != Relative_Rate) {
00098     if (Relative_Rate<1.0) 
00099       Error("TDSPRating::PrepareRate","Can not set relative Sampling Rates (input/response) of %f < 1.0 !!",Relative_Rate);
00100     else {
00101       
00102       fRelativeRateMean  = Relative_Rate;
00103       
00104       NewRelativeRate();
00105     }
00106   }
00107   
00108 }

void TDSPRating::ResetRating  )  [inline]
 

Definition at line 57 of file TDSPRating.h.

References fRateIndex.

Referenced by NewRelativeRate().

00057 { fRateIndex=0;};  // Reset the Rating

void TDSPRating::SetRate Double_t   ) 
 

void TDSPRating::SetRateSigma Double_t  s  )  [inline]
 

Definition at line 54 of file TDSPRating.h.

References fRelativeRateSigma.

00054 { fRelativeRateSigma = s;}; // Set the Sigma


Field Documentation

Double_t TDSPRating::fRate [protected]
 

Definition at line 36 of file TDSPRating.h.

Referenced by GetRate(), and PrepareRate().

UInt_t TDSPRating::fRateIndex [protected]
 

Definition at line 40 of file TDSPRating.h.

Referenced by IsRate(), Next(), and ResetRating().

UInt_t TDSPRating::fRelativeRate [protected]
 

Definition at line 37 of file TDSPRating.h.

Referenced by GetLastRelativeRate(), NewRelativeRate(), and Next().

Double_t TDSPRating::fRelativeRateMean [protected]
 

Definition at line 38 of file TDSPRating.h.

Referenced by GetRelativeRate(), NewRelativeRate(), and PrepareRate().

Double_t TDSPRating::fRelativeRateSigma [protected]
 

Definition at line 39 of file TDSPRating.h.

Referenced by GetRateSigma(), NewRelativeRate(), and SetRateSigma().


The documentation for this class was generated from the following file:
Generated on Fri Apr 23 16:24:07 2004 by doxygen 1.3.2