Public Member Functions | Public Attributes | List of all members
Acclaim::FancyTTreeInterpolator Class Reference

A class to interpolate sparse, but continuous data in a TTree. More...

#include <FancyTTreeInterpolator.h>

Public Member Functions

 FancyTTreeInterpolator (TTree *t, TString xAxisText)
 Constructor. More...
 
 ~FancyTTreeInterpolator ()
 Desonstructor. More...
 
void add (TString yAxisText)
 Adds a TGraph to the interally stored TGraphs. More...
 
void add (TString yAxisText, TString cut)
 Adds a TGraph to the interally stored TGraphs. More...
 
void add (TString yAxisText, Double_t wrapValue)
 Adds a TGraph to the interally stored TGraphs. More...
 
void add (TString yAxisText, TString cut, Double_t wrapValue)
 Adds a TGraph to the interally stored TGraphs. More...
 
Double_t interp (TString yAxisText, Double_t xAxisValue)
 Get interpolated yAxisText variable at xAxisValue (time). More...
 
TGraph * get (TString yAxisText)
 Access the interally stored TGraph via the yAxisText. More...
 
TGraph * makeSortedTGraph (TString yAxisText)
 Makes a sorted TGraph from fTree->Draw() with no cuts. More...
 
TGraph * makeSortedTGraph (TString yAxisText, TString cutString)
 Makes a sorted TGraph from fTree->Draw() with cuts. More...
 
TGraph * makeSortedTGraph (TString yAxisText, Double_t wrapValue)
 Makes a sorted TGraph from fTree->Draw() with no cuts. More...
 
TGraph * makeSortedTGraph (TString yAxisText, TString cutString, Double_t wrapValue)
 Makes a sorted TGraph from fTree->Draw() with cuts. More...
 

Public Attributes

TTree * fTree
 TTree with which the intepolater was initialized.
 
TString fXAxisText
 Branch name with which the intepolater was initialized.
 
std::map< TString, TGraph * > fStringToGraph
 Internally stored TGraphs, accessed by TTree branch name.
 
std::map< TString, Double_t > fStringToWrapValue
 Internally stored wrapValues, accessed by TTree branch name.
 
Double_t fXmin
 Stored x-axis lower limit.
 
Double_t fXmax
 Stored x-axis lower limit.
 

Detailed Description

A class to interpolate sparse, but continuous data in a TTree.

This was developed with adu5Pat variables like heading in mind. Not really necessary once full flight data is recovered.

Definition at line 41 of file FancyTTreeInterpolator.h.

Collaboration diagram for Acclaim::FancyTTreeInterpolator:
Collaboration graph
[legend]

Constructor & Destructor Documentation

Acclaim::FancyTTreeInterpolator::FancyTTreeInterpolator ( TTree *  t,
TString  xAxisText 
)

Constructor.

Parameters
tis a TTree
xAxisTextis the name of a time-like branch in the TTree. realTime would be a good choice.

Does not presume to own t. If t s deleted out from under it, this class will fall over.

Definition at line 17 of file FancyTTreeInterpolator.cxx.

Acclaim::FancyTTreeInterpolator::~FancyTTreeInterpolator ( )

Desonstructor.

Deletes interally stored TGraphs.

Definition at line 46 of file FancyTTreeInterpolator.cxx.

Member Function Documentation

void Acclaim::FancyTTreeInterpolator::add ( TString  yAxisText)

Adds a TGraph to the interally stored TGraphs.

Parameters
yAxisTextis defines the y-axis of the TGraph, drawn against fXaxisText

Definition at line 183 of file FancyTTreeInterpolator.cxx.

void Acclaim::FancyTTreeInterpolator::add ( TString  yAxisText,
TString  cutString 
)

Adds a TGraph to the interally stored TGraphs.

Parameters
yAxisTextis defines the y-axis of the TGraph, drawn against fXaxisText
cutStringdefines the cuts to padd to fTree->Draw();

Definition at line 197 of file FancyTTreeInterpolator.cxx.

void Acclaim::FancyTTreeInterpolator::add ( TString  yAxisText,
Double_t  wrapValue 
)

Adds a TGraph to the interally stored TGraphs.

Parameters
yAxisTextis defines the y-axis of the TGraph, drawn against fXaxisText
wrapValuevalue to unwrap around. e.g. 360 for rotations in degrees.

Definition at line 212 of file FancyTTreeInterpolator.cxx.

void Acclaim::FancyTTreeInterpolator::add ( TString  yAxisText,
TString  cutString,
Double_t  wrapValue 
)

Adds a TGraph to the interally stored TGraphs.

Parameters
yAxisTextis defines the y-axis of the TGraph, drawn against fXaxisText
cutStringdefines the cuts to padd to fTree->Draw();
wrapValuevalue to unwrap around. e.g. 360 for rotations in degrees.

Definition at line 228 of file FancyTTreeInterpolator.cxx.

TGraph * Acclaim::FancyTTreeInterpolator::get ( TString  yAxisText)

Access the interally stored TGraph via the yAxisText.

Parameters
yAxisTextis defines the y-axis of the TGraph, drawn against fXaxisText
Returns
A pointer to accessed TGraph, returns NULL if no match is found.

Definition at line 246 of file FancyTTreeInterpolator.cxx.

Double_t Acclaim::FancyTTreeInterpolator::interp ( TString  yAxisText,
Double_t  xAxisValue 
)

Get interpolated yAxisText variable at xAxisValue (time).

Parameters
yAxisTextis defines the y-axis of the TGraph, drawn against fXaxisText
xAxisValueis the value of the fXaxisText branch to interpolate the yAxisText branch variable at.
Returns
the interpolated value.

Definition at line 273 of file FancyTTreeInterpolator.cxx.

TGraph * Acclaim::FancyTTreeInterpolator::makeSortedTGraph ( TString  drawText)

Makes a sorted TGraph from fTree->Draw() with no cuts.

Parameters
drawTextis the text to pass to fTree::Draw();
Returns
a pointer to the created, sorted TGraph.

Definition at line 64 of file FancyTTreeInterpolator.cxx.

TGraph * Acclaim::FancyTTreeInterpolator::makeSortedTGraph ( TString  drawText,
TString  cutString 
)

Makes a sorted TGraph from fTree->Draw() with cuts.

Parameters
drawTextis the text to pass to fTree->Draw();
cutStringdefines the cuts to padd to fTree->Draw();
Returns
a pointer to the created, sorted TGraph.

Definition at line 79 of file FancyTTreeInterpolator.cxx.

TGraph * Acclaim::FancyTTreeInterpolator::makeSortedTGraph ( TString  drawText,
Double_t  wrapValue 
)

Makes a sorted TGraph from fTree->Draw() with no cuts.

Parameters
drawTextis the text to pass to fTree->Draw();
wrapValuevalue to unwrap around. e.g. 360 for rotations in degrees.
Returns
a pointer to the created, sorted TGraph.

For example if you want to interpolate between 359 and 1 degrees, these will be unwrapped as 259, 361. These values can then be interpolated between correctly.

Definition at line 98 of file FancyTTreeInterpolator.cxx.

TGraph * Acclaim::FancyTTreeInterpolator::makeSortedTGraph ( TString  drawText,
TString  cutString,
Double_t  wrapValue 
)

Makes a sorted TGraph from fTree->Draw() with cuts.

Parameters
drawTextis the text to pass to fTree->Draw();
cutStringdefines the cuts to padd to fTree->Draw();
wrapValuevalue to unwrap around. e.g. 360 for rotations in degrees.
Returns
a pointer to the created, sorted TGraph.

For example if you want to interpolate between 359 and 1 degrees, these will be unwrapped as 259, 361. These values can then be interpolated between correctly.

Definition at line 118 of file FancyTTreeInterpolator.cxx.


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