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. | |
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.
Acclaim::FancyTTreeInterpolator::FancyTTreeInterpolator | ( | TTree * | t, |
TString | xAxisText | ||
) |
Constructor.
t | is a TTree |
xAxisText | is 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.
void Acclaim::FancyTTreeInterpolator::add | ( | TString | yAxisText | ) |
Adds a TGraph to the interally stored TGraphs.
yAxisText | is 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.
yAxisText | is defines the y-axis of the TGraph, drawn against fXaxisText |
cutString | defines 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.
yAxisText | is defines the y-axis of the TGraph, drawn against fXaxisText |
wrapValue | value 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.
yAxisText | is defines the y-axis of the TGraph, drawn against fXaxisText |
cutString | defines the cuts to padd to fTree->Draw(); |
wrapValue | value 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.
yAxisText | is defines the y-axis of the TGraph, drawn against fXaxisText |
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).
yAxisText | is defines the y-axis of the TGraph, drawn against fXaxisText |
xAxisValue | is the value of the fXaxisText branch to interpolate the yAxisText branch variable at. |
Definition at line 273 of file FancyTTreeInterpolator.cxx.
TGraph * Acclaim::FancyTTreeInterpolator::makeSortedTGraph | ( | TString | drawText | ) |
Makes a sorted TGraph from fTree->Draw() with no cuts.
drawText | is the text to pass to fTree::Draw(); |
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.
drawText | is the text to pass to fTree->Draw(); |
cutString | defines the cuts to padd to fTree->Draw(); |
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.
drawText | is the text to pass to fTree->Draw(); |
wrapValue | value to unwrap around. e.g. 360 for rotations in degrees. |
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.
drawText | is the text to pass to fTree->Draw(); |
cutString | defines the cuts to padd to fTree->Draw(); |
wrapValue | value to unwrap around. e.g. 360 for rotations in degrees. |
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.