Public Member Functions | Protected Member Functions | List of all members
TGraphAligned Class Reference

#include <TGraphAligned.h>

Public Member Functions

 TGraphAligned ()
 
 TGraphAligned (Int_t n)
 
TGraphAlignedoperator= (const TGraphAligned &)
 
 TGraphAligned (Int_t n, const Double_t *x, const Double_t *y)
 
 TGraphAligned (const TGraph &)
 
double * getMoments (int i, double origin, double *moments=0) const
 
void dBize (double mindB=-200)
 
void undBize ()
 
void zeroMean ()
 
void adopt (const TGraphAligned *g)
 
void shift (int nsamples, bool zero=true)
 
void getMeanAndRMS (Double_t *mean, Double_t *rms, Int_t istart=0, Int_t iend=-1) const
 
Double_t getSumV2 (Int_t istart=0, Int_t iend=-1) const
 
Double_t peakVal (Int_t *location=0, Int_t istart=0, Int_t iend=-1, bool abs=false) const
 
Double_t pk2pk (Int_t nthMax=0, Int_t nthMin=0, Int_t *location_max=0, Int_t *location_min=0, Int_t istart=0, Int_t iend=-1) const
 
TH1 * valueHist (int nbins=100, const double *weights=0, TH1 *out=0) const
 
void setPlottingLimits (double mult=1.1, bool sym=true, double dt_from_peak=-1)
 
aligned_double_v GetX () const
 
aligned_double_v GetY () const
 
void setBelow (double val, bool abso=true, double to=0)
 
virtual ~TGraphAligned ()
 

Protected Member Functions

virtual Double_t ** AllocateAlignedArrays (Int_t Narrays, Int_t arraySize)
 
Double_t ** Allocate (Int_t newsize)
 
virtual Bool_t CtorAllocate (void)
 
virtual void CopyAndRelease (Double_t **newarrays, Int_t ibegin, Int_t iend, Int_t obegin)
 
 ClassDef (TGraphAligned, 1)
 

Detailed Description

Slight modification of TGraph where the arrays are guaranteed to be aligned properly. The wisdom of this class is questionable; in principle it might help the compiler autovectorize, but that seems like a fool's errand. For manual vectorization, it can make loads faster in certain cases (depending on the processor).

I also added a few convenience methods...

Definition at line 18 of file TGraphAligned.h.

Inheritance diagram for TGraphAligned:
Inheritance graph
[legend]
Collaboration diagram for TGraphAligned:
Collaboration graph
[legend]

Constructor & Destructor Documentation

TGraphAligned::TGraphAligned ( )

Empty TGraphAligned

Definition at line 18 of file TGraphAligned.cc.

TGraphAligned::TGraphAligned ( Int_t  n)

Zero'd TGraphAligned of size n

Definition at line 25 of file TGraphAligned.cc.

TGraphAligned::TGraphAligned ( Int_t  n,
const Double_t *  x,
const Double_t *  y 
)

Create from arrays, which are copied

Definition at line 114 of file TGraphAligned.cc.

TGraphAligned::TGraphAligned ( const TGraph &  gr)

Create a TGraphAligned from a TGraph. Use this in case I haven't yet implemented the TGraph constructor you want; it's just an extra copy. I think this should fire also for TGraphAligned, but not sure

Definition at line 196 of file TGraphAligned.cc.

TGraphAligned::~TGraphAligned ( )
virtual

Destructor

Definition at line 171 of file TGraphAligned.cc.

Member Function Documentation

TH1 * TGraphAligned::valueHist ( int  nbins = 100,
const double *  weights = 0,
TH1 *  out = 0 
) const

Makes a histogram of the Y-values

Definition at line 462 of file TGraphAligned.cc.


The documentation for this class was generated from the following files: