ROOTANA
|
#include <THistogramArrayBase.h>
Public Member Functions | |
THistogramArrayBase () | |
virtual | ~THistogramArrayBase () |
virtual void | UpdateHistograms (TDataContainer &dataContainer)=0 |
Update the histograms for this canvas. More... | |
TH1 * | GetHistogram (unsigned i) |
A helper method for accessing each histogram. Does bounds checking. More... | |
virtual void | CreateHistograms () |
Function to create histograms; users will want to implement this function. More... | |
virtual void | BeginRun (int transition, int run, int time) |
Take actions at begin run. More... | |
virtual void | EndRun (int transition, int run, int time) |
Take actions at end run More... | |
void | SetNumberChannelsInGroup (int numberChannelsInGroups) |
const int | GetNumberChannelsInGroup () |
void | SetGroupName (std::string name) |
Set name for the 'group'. More... | |
const std::string | GetGroupName () |
void | SetChannelName (std::string name) |
Set name for the 'channel'. More... | |
const std::string | GetChannelName () |
void | DisableAutoUpdate (bool DisableautoUpdate=true) |
const bool | GetDisableAutoUpdate () |
const bool | HasAutoUpdate () |
virtual std::string | GetTabName () |
Get the name of the top-level tab for these plots, if running DaqDisplay. More... | |
virtual std::string | GetSubTabName () |
Get the name of the sub-tab for these plots, if running DaqDisplay. More... | |
virtual bool | IsUpdateWhenPlotted () |
virtual TCanvasHandleBase * | CreateCanvas () |
Protected Member Functions | |
virtual void | SetTabName (std::string name) |
Set the name of the top-level tab for these plots, if running DaqDisplay. More... | |
virtual void | SetSubTabName (std::string name) |
Set the name of the sub-tab for these plots, if running DaqDisplay. More... | |
virtual void | SetUpdateOnlyWhenPlotted (bool whenupdate) |
Private Attributes | |
int | fNumberChannelsInGroups |
std::string | fGroupName |
The name for the 'group'. More... | |
std::string | fChannelName |
The name for the 'channel'. More... | |
bool | fDisableAutoUpdate |
bool | fHasAutoUpdate |
std::string | fSubTabName |
std::string | fTabName |
bool | fUpdateWhenPlotted |
Base class for user to create an array of histograms. Features of the histogram array i) Histograms are all defined together. ii) Histograms are updated together
Users of this abstract base class should implement a class derived from must THistogramArrayBase that 1) define the histograms that you want in CreateHistogram() and calls CreateHistogram in your constructor. 2) implement the UpdateHistograms(TDataContainer&) method.
Most, though not all, of logic of this histogram array is based on it being a set of similar histograms; if you use this class for a set of dissimilar histograms (different binning, different quantities) then the class will be less intuitive. The array'ness is actually implemented as a vector of TH1s.
The default representation is to have a 1D array of histograms. But the user can also use the class a 2D array of histograms by specifying the functions
Grouping histograms together like this is most beneficial when using the display programs.
Definition at line 34 of file THistogramArrayBase.h.
|
inline |
Definition at line 36 of file THistogramArrayBase.h.
|
virtual |
Definition at line 5 of file THistogramArrayBase.cxx.
|
inlinevirtual |
Take actions at begin run.
Reimplemented in TV792Histograms, TV1730RawWaveform, TV1730DppWaveform, TV1720Waveform, TV1720Correlations, TV1190Histograms, TTRB3DiffHistograms, TTRB3FineHistograms, TTRB3Histograms, TL2249Histograms, TDT724Waveform, TCamacADCHistograms, and TAgilentHistograms.
Definition at line 52 of file THistogramArrayBase.h.
|
virtual |
If you are creating a specialized canvas (for example, showing several different plots in the same canvas) you should implement this function. If you are just creating a standard histogram canvas, you do not need to implement this function.
Definition at line 22 of file THistogramArrayBase.cxx.
|
inlinevirtual |
Function to create histograms; users will want to implement this function.
Reimplemented in TV792Histograms, TV1730RawWaveform, TV1730DppWaveform, TV1720Waveform, TV1720Correlations, TV1190Histograms, TTRB3DiffHistograms, TTRB3FineHistograms, TTRB3Histograms, TL2249Histograms, TDT724Waveform, TCamacADCHistograms, and TAgilentHistograms.
Definition at line 49 of file THistogramArrayBase.h.
|
inline |
Define whether the histogram gets automatically updated by rootana display. 'True' means that rootana display will NOT call UpdateHistograms automatically.
Definition at line 74 of file THistogramArrayBase.h.
|
inlinevirtual |
Take actions at end run
Reimplemented in TV792Histograms, TV1730RawWaveform, TV1730DppWaveform, TV1190Histograms, TTRB3DiffHistograms, TTRB3FineHistograms, TTRB3Histograms, TL2249Histograms, TCamacADCHistograms, and TAgilentHistograms.
Definition at line 55 of file THistogramArrayBase.h.
|
inline |
|
inline |
|
inline |
TH1 * THistogramArrayBase::GetHistogram | ( | unsigned | i | ) |
A helper method for accessing each histogram. Does bounds checking.
Definition at line 13 of file THistogramArrayBase.cxx.
|
inline |
|
inlinevirtual |
Get the name of the sub-tab for these plots, if running DaqDisplay.
Definition at line 86 of file THistogramArrayBase.h.
|
inlinevirtual |
Get the name of the top-level tab for these plots, if running DaqDisplay.
Definition at line 81 of file THistogramArrayBase.h.
|
inline |
|
inlinevirtual |
Get whether these histograms should be drawn by DaqDisplay::DrawCanvas() rather than DaqAnalyzer::ProcessMidasEvent()
Definition at line 92 of file THistogramArrayBase.h.
|
inline |
Set name for the 'channel'.
Definition at line 67 of file THistogramArrayBase.h.
|
inline |
Set name for the 'group'.
Definition at line 63 of file THistogramArrayBase.h.
|
inline |
Function to define the number of channels in group and allow user to treat the array as 2D array.
Definition at line 59 of file THistogramArrayBase.h.
|
inlineprotectedvirtual |
Set the name of the sub-tab for these plots, if running DaqDisplay.
Definition at line 110 of file THistogramArrayBase.h.
|
inlineprotectedvirtual |
Set the name of the top-level tab for these plots, if running DaqDisplay.
Definition at line 105 of file THistogramArrayBase.h.
|
inlineprotectedvirtual |
Set whether these histograms should be drawn by DrawCanvas() rather than AProcessMidasEvent(). This should only be set to true for histograms that only are plotting information for a single event (ie, don't set this for any histogram that is cumulative).
Definition at line 118 of file THistogramArrayBase.h.
|
pure virtual |
Update the histograms for this canvas.
Implemented in TV792Histograms, TV1730RawWaveform, TV1730DppWaveform, TV1720Waveform, TV1720Correlations, TV1190Histograms, TTRB3DiffHistograms, TTRB3FineHistograms, TTRB3Histograms, TL2249Histograms, TDT724Waveform, TCamacADCHistograms, and TAgilentHistograms.
|
private |
The name for the 'channel'.
Definition at line 133 of file THistogramArrayBase.h.
|
private |
Defines whether the histogram should be automatically updated by TRootanaDisplay.
Definition at line 137 of file THistogramArrayBase.h.
|
private |
The name for the 'group'.
Definition at line 130 of file THistogramArrayBase.h.
|
private |
Definition at line 138 of file THistogramArrayBase.h.
|
private |
This is the number of channels in a given group. This is mostly used by rootana display, but could also be used to specify histograms as a 2D array of [group][channel.
Definition at line 127 of file THistogramArrayBase.h.
|
private |
Definition at line 141 of file THistogramArrayBase.h.
|
private |
Definition at line 142 of file THistogramArrayBase.h.
|
private |
Definition at line 146 of file THistogramArrayBase.h.