geirs2Panic
Richard J. Mathar
Fits header keyword batch editor
|
#include <Histos.h>
Public Member Functions | |
Histos () | |
Constructor. More... | |
Histos (vector< valarray< float > > &arr, vector< string > &iname) | |
Constructor. More... | |
Histos (vector< valarray< float > > &arr, const int Nbin, vector< string > &iname, string &contName) | |
Constructor. More... | |
Histos (vector< valarray< float > > &arr, const int Nbin, vector< string > &iname, string &contName, double range[2]) | |
Constructor. More... | |
void | dumpFil (const char *fname) |
Create ASCII file in xy gnuplot format. More... | |
void | gnuplot (const char *gplDfile, const char *gplfile, const bool doLogHist, string epsout) |
Generate a gnuplot shell command list. More... | |
Static Public Member Functions | |
static void | valRange (vector< valarray< float > > &arr, double mimax[2]) |
Determine smallest and largest value in all elements of the arrays. More... | |
static int | countRange (vector< valarray< float > > &arr) |
Public Attributes | |
double | strt |
The smallest range of the first bin. More... | |
double | stride |
The width of each bin. More... | |
string | contName |
Some type of contents description. More... | |
vector< Histo > | hs |
Private Member Functions | |
void | init (vector< valarray< float > > &arr, const int Nbin, const double *range, vector< string > &iname) |
Principal part of the constructor. More... | |
Histos::Histos | ( | ) |
Constructor.
Empty histogram. The main purpose of this construction is to allow allocations of vectors of histograms.
Histos::Histos | ( | vector< valarray< float > > & | arr, |
vector< string > & | iname | ||
) |
Constructor.
arr | The array of values to be binned. |
iname | The associated list of names, one per arr component. |
Histos::Histos | ( | vector< valarray< float > > & | arr, |
const int | Nbin, | ||
vector< string > & | iname, | ||
string & | conts | ||
) |
Constructor.
arr | The array of values to be binned. |
Nbin | A number of bins to be used. If less than 1, the program depicts a default on its own. |
iname | Name of the files associated with the arr. |
conts | A global simple name for the entire collection. Mainly for use with display headers and the like. |
Histos::Histos | ( | vector< valarray< float > > & | arr, |
const int | Nbin, | ||
vector< string > & | iname, | ||
string & | conts, | ||
double | range[2] | ||
) |
Constructor.
arr | The array of values to be binned. | |
Nbin | A number of bins to be used. If less than 1, the program depicts a default on its own. | |
iname | Name of the files associated with the arr. | |
conts | A global simple name for the entire collection. Mainly for use with display headers and the like. | |
[in] | range |
void Histos::dumpFil | ( | const char * | fname | ) |
Create ASCII file in xy gnuplot format.
[in] | fname | The file to be generated. |
void Histos::gnuplot | ( | const char * | fdname, |
const char * | fpltname, | ||
const bool | doLogHist, | ||
string | epsout | ||
) |
Generate a gnuplot shell command list.
[in] | fdname | The file that contains the data to be plotted. |
[in] | fpltname | The file with the gnuplot commands. |
[in] | doLogHist | Print a logarithmic, not a linear vertical scale |
[in] | epsout | Print diagram into the EPS file, not on screen. |
|
static |
Determine smallest and largest value in all elements of the arrays.
NaN-values are not taken into account (ignored).
[in] | arr | The arrays to be scanned. |
[out] | mimax | The minimum in [0], the maximum in [1] If the array arr has zero size, the mimax[] are unchanged on return. |
|
static |
[in] | arr | The arrays to be scanned. |
|
private |
Principal part of the constructor.
arr | The array of values to be binned. |
Nbin | The number of bins into which the values are split. |
range | The minimum and maximum value in the first and last bin. |
double Histos::strt |
The smallest range of the first bin.
double Histos::stride |
The width of each bin.
string Histos::contName |
Some type of contents description.
vector<Histo> Histos::hs |