|
Crombie Tools
|
Can be created using the CrombieTools.SkimmingTools.HistWriter module. More...
#include <HistWriter.h>
Public Member Functions | |
| HistWriter (TString fileName="output.root", TString histName="corrections") | |
| Default constructor. More... | |
| virtual | ~HistWriter () |
| void | Make2DHist (TString configName, unsigned numX, unsigned numY) |
| Writes a 2D histogram based on a configuration file. Needs the dimensions to simplify logic... More... | |
| void | MakeHist (TString configName) |
| Writes a histogram based on a configuration file. More... | |
| void | MakeHist (TString fileName, TString histName, TString configName) |
| Sets the output names and reads the configuration file at the same time. More... | |
| void | SetFileName (TString fileName) |
| Sets the output .root file name. More... | |
| void | SetHistName (TString histName) |
| Sets the output histogram name. More... | |
Private Attributes | |
| TString | fFileName |
| Output .root file name. More... | |
| TString | fHistName |
| Output histogram name. More... | |
Can be created using the CrombieTools.SkimmingTools.HistWriter module.
Class used to write a histogram into a .root file from a .txt file.
Definition at line 21 of file HistWriter.h.
| HistWriter::HistWriter | ( | TString | fileName = "output.root", |
| TString | histName = "corrections" |
||
| ) |
Default constructor.
|
virtual |
Definition at line 24 of file HistWriter.cc.
| void HistWriter::Make2DHist | ( | TString | configName, |
| unsigned | numX, | ||
| unsigned | numY | ||
| ) |
Writes a 2D histogram based on a configuration file. Needs the dimensions to simplify logic...
Definition at line 68 of file HistWriter.cc.
References fFileName, fHistName, and dojob::outFile.
| void HistWriter::MakeHist | ( | TString | configName | ) |
Writes a histogram based on a configuration file.
Reads the configuration file given by configName.
The configuration file consists only of alternating bin edge locations and bin contents. The first and last number of the file should be a bin edge. (The number of edges is the number of bins + 1). These can be separated by spaces or new lines.
Definition at line 37 of file HistWriter.cc.
References fFileName, fHistName, and dojob::outFile.
Referenced by MakeHist().
|
inline |
Sets the output names and reads the configuration file at the same time.
Definition at line 35 of file HistWriter.h.
References MakeHist(), SetFileName(), and SetHistName().
|
inline |
Sets the output .root file name.
Definition at line 39 of file HistWriter.h.
References fFileName.
Referenced by MakeHist().
|
inline |
Sets the output histogram name.
Definition at line 41 of file HistWriter.h.
References fHistName.
Referenced by MakeHist().
|
private |
Output .root file name.
Definition at line 44 of file HistWriter.h.
Referenced by Make2DHist(), MakeHist(), and SetFileName().
|
private |
Output histogram name.
Definition at line 45 of file HistWriter.h.
Referenced by Make2DHist(), MakeHist(), and SetHistName().