Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
|
Holds pointers to all Histograms. More...
#include <Plots.hpp>
Public Member Functions | |
Plots (int offset, int range, std::string name) | |
int | GetOffset () |
void | PrintNonEmpty (std::ofstream &hislog) |
bool | CheckRange (int id) const |
bool | Exists (int id) const |
bool | Exists (const std::string &mne) const |
bool | DeclareHistogram1D (int dammId, int xSize, const char *title, int halfWordsPerChan, int xHistLength, int xLow, int xHigh, const std::string &mne="") |
Declares a 1D histogram calls the C++ wrapper for DAMM. More... | |
bool | DeclareHistogram1D (int dammId, int xSize, const char *title, int halfWordsPerChan=2, const std::string &mne="") |
Declares a 1D histogram calls the C++ wrapper for DAMM. More... | |
bool | DeclareHistogram1D (int dammId, int xSize, const char *title, int halfWordsPerChan, int contraction, const std::string &mne="") |
Declares a 1D histogram calls the C++ wrapper for DAMM. More... | |
bool | DeclareHistogram2D (int dammId, int xSize, int ySize, const char *title, int halfWordsPerChan, int xHistLength, int xLow, int xHigh, int yHistLength, int yLow, int yHigh, const std::string &mne="") |
Declares a 2D histogram calls the C++ wrapper for DAMM. More... | |
bool | DeclareHistogram2D (int dammId, int xSize, int ySize, const char *title, int halfWordPerChan=1, const std::string &mne="") |
Declares a 2D histogram calls the C++ wrapper for DAMM. More... | |
bool | DeclareHistogram2D (int dammId, int xSize, int ySize, const char *title, int halfWordsPerChan, int xContraction, int yContraction, const std::string &mne="") |
Declares a 2D histogram calls the C++ wrapper for DAMM. More... | |
bool | Plot (int dammId, double val1, double val2=-1, double val3=-1, const char *name="h") |
Plots into histogram defined by dammId. More... | |
bool | Plot (const std::string &mne, double val1, double val2=-1, double val3=-1, const char *name="h") |
Plots into histogram defined by mne. More... | |
bool | BananaTest (const int &id, const double &x, const double &y) |
Private Member Functions | |
int | Round (double val) const |
Private Attributes | |
int | offset_ |
int | range_ |
std::string | name_ |
std::set< int > | idList |
std::map< std::string, int > | mneList |
std::map< int, std::string > | titleList |
Static Private Attributes | |
static PlotsRegister * | plots_register_ |
Instance of the plots register. | |
Holds pointers to all Histograms.
Plots::Plots | ( | int | offset, |
int | range, | ||
std::string | name | ||
) |
Default constructor that takes the offset, range, and name of processor
[in] | offset | : the offset for the processor |
[in] | range | : the range for the processor |
[in] | name | : the name of the processor |
bool Plots::BananaTest | ( | const int & | id, |
const double & | x, | ||
const double & | y | ||
) |
Method to test if a parameter is inside of a loaded banana
Will not help you defend against a man wielding a pointed stick.
[in] | id | : the banana id to look at |
[in] | x | : the x value to check |
[in] | y | : the y value to check |
bool Plots::CheckRange | ( | int | id | ) | const |
[in] | id | : the id to check |
bool Plots::DeclareHistogram1D | ( | int | dammId, |
int | xSize, | ||
const char * | title, | ||
int | halfWordsPerChan, | ||
int | xHistLength, | ||
int | xLow, | ||
int | xHigh, | ||
const std::string & | mne = "" |
||
) |
Declares a 1D histogram calls the C++ wrapper for DAMM.
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | title | : The title for the histogram |
[in] | halfWordsPerChan | : the half words per channel in the his |
[in] | xHistLength | : length of the histogram in the x axis |
[in] | xLow | : the Low range of the histogram |
[in] | xHigh | : the High range of the histogram |
[in] | mne | : the mnemonic for the histogram |
bool Plots::DeclareHistogram1D | ( | int | dammId, |
int | xSize, | ||
const char * | title, | ||
int | halfWordsPerChan = 2 , |
||
const std::string & | mne = "" |
||
) |
Declares a 1D histogram calls the C++ wrapper for DAMM.
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | title | : The title for the histogram |
[in] | halfWordsPerChan | : the half words per channel in the his |
[in] | mne | : the mnemonic for the histogram |
bool Plots::DeclareHistogram1D | ( | int | dammId, |
int | xSize, | ||
const char * | title, | ||
int | halfWordsPerChan, | ||
int | contraction, | ||
const std::string & | mne = "" |
||
) |
Declares a 1D histogram calls the C++ wrapper for DAMM.
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | title | : The title for the histogram |
[in] | halfWordsPerChan | : the half words per channel in the his |
[in] | contraction | : the histogram contraction number |
[in] | mne | : the mnemonic for the histogram |
bool Plots::DeclareHistogram2D | ( | int | dammId, |
int | xSize, | ||
int | ySize, | ||
const char * | title, | ||
int | halfWordsPerChan, | ||
int | xHistLength, | ||
int | xLow, | ||
int | xHigh, | ||
int | yHistLength, | ||
int | yLow, | ||
int | yHigh, | ||
const std::string & | mne = "" |
||
) |
Declares a 2D histogram calls the C++ wrapper for DAMM.
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | ySize | : The range of the y-axis |
[in] | title | : The title of the histogram |
[in] | halfWordsPerChan | : the half words per channel in the his |
[in] | xHistLength | : length of the histogram in the x axis |
[in] | xLow | : the Low range of the histogram |
[in] | xHigh | : the High range of the histogram |
[in] | yHistLength | : length of the histogram in the y axis |
[in] | yLow | : the Low for the y-range of the histogram |
[in] | yHigh | : the High for the y-range of the histogram |
[in] | mne | : the mnemonic for the histogram |
bool Plots::DeclareHistogram2D | ( | int | dammId, |
int | xSize, | ||
int | ySize, | ||
const char * | title, | ||
int | halfWordPerChan = 1 , |
||
const std::string & | mne = "" |
||
) |
Declares a 2D histogram calls the C++ wrapper for DAMM.
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | ySize | : The range of the y-axis |
[in] | title | : The title of the histogram |
[in] | halfWordPerChan | : the half words per channel in the his |
[in] | mne | : the mnemonic for the histogram |
bool Plots::DeclareHistogram2D | ( | int | dammId, |
int | xSize, | ||
int | ySize, | ||
const char * | title, | ||
int | halfWordsPerChan, | ||
int | xContraction, | ||
int | yContraction, | ||
const std::string & | mne = "" |
||
) |
Declares a 2D histogram calls the C++ wrapper for DAMM.
[in] | dammId | : The histogram number to define |
[in] | xSize | : The range of the x-axis |
[in] | ySize | : the range of the y-axis |
[in] | title | : The title for the histogram |
[in] | halfWordsPerChan | : the half words per channel in the his |
[in] | xContraction | : the histogram x contraction number |
[in] | yContraction | : the histogram y contraction number |
[in] | mne | : the mnemonic for the histogram |
bool Plots::Exists | ( | int | id | ) | const |
[in] | id | : the id to check |
bool Plots::Exists | ( | const std::string & | mne | ) | const |
[in] | mne | : the name to check in the list |
|
inline |
bool Plots::Plot | ( | int | dammId, |
double | val1, | ||
double | val2 = -1 , |
||
double | val3 = -1 , |
||
const char * | name = "h" |
||
) |
Plots into histogram defined by dammId.
[in] | dammId | : The histogram number to define |
[in] | val1 | : the x value |
[in] | val2 | : the y value |
[in] | val3 | : the z value |
[in] | name | : the name of the histogram |
bool Plots::Plot | ( | const std::string & | mne, |
double | val1, | ||
double | val2 = -1 , |
||
double | val3 = -1 , |
||
const char * | name = "h" |
||
) |
Plots into histogram defined by mne.
[in] | mne | : the mnemonic to plot into |
[in] | val1 | : the x value |
[in] | val2 | : the y value |
[in] | val3 | : the z value |
[in] | name | : the name of the histogram |
void Plots::PrintNonEmpty | ( | std::ofstream & | hislog | ) |
Prints out the non empty histograms in the analysis
[in] | hislog | : the file stream to print to |
|
private |
A function to round the value before passing it to DAMM
[in] | val | : the value to round |
|
private |
set of int (relative dammId without offsets
|
private |
Map of mnemonic -> int
|
private |
Name of the owner of plots, mainly for debugging
|
private |
Holds offset for a given set of plots
|
private |
Holds allowed range for a given set of plots
|
private |
Map of dammid -> title, helps debugging duplicated dammids