ROOTANA
Public Member Functions | Protected Member Functions | Private Attributes
THistogramArrayBase Class Referenceabstract

#include <THistogramArrayBase.h>

Inheritance diagram for THistogramArrayBase:
Inheritance graph
[legend]
Collaboration diagram for THistogramArrayBase:
Collaboration graph
[legend]

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 TCanvasHandleBaseCreateCanvas ()
 

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ THistogramArrayBase()

THistogramArrayBase::THistogramArrayBase ( )
inline

Definition at line 36 of file THistogramArrayBase.h.

◆ ~THistogramArrayBase()

THistogramArrayBase::~THistogramArrayBase ( )
virtual

Definition at line 5 of file THistogramArrayBase.cxx.

Member Function Documentation

◆ BeginRun()

virtual void THistogramArrayBase::BeginRun ( int  transition,
int  run,
int  time 
)
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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateCanvas()

TCanvasHandleBase * THistogramArrayBase::CreateCanvas ( )
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.

◆ CreateHistograms()

virtual void THistogramArrayBase::CreateHistograms ( )
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.

Here is the caller graph for this function:

◆ DisableAutoUpdate()

void THistogramArrayBase::DisableAutoUpdate ( bool  DisableautoUpdate = true)
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.

Here is the caller graph for this function:

◆ EndRun()

virtual void THistogramArrayBase::EndRun ( int  transition,
int  run,
int  time 
)
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.

Here is the caller graph for this function:

◆ GetChannelName()

const std::string THistogramArrayBase::GetChannelName ( )
inline

Definition at line 68 of file THistogramArrayBase.h.

Here is the caller graph for this function:

◆ GetDisableAutoUpdate()

const bool THistogramArrayBase::GetDisableAutoUpdate ( )
inline

Definition at line 75 of file THistogramArrayBase.h.

Here is the caller graph for this function:

◆ GetGroupName()

const std::string THistogramArrayBase::GetGroupName ( )
inline

Definition at line 64 of file THistogramArrayBase.h.

Here is the caller graph for this function:

◆ GetHistogram()

TH1 * THistogramArrayBase::GetHistogram ( unsigned  i)

A helper method for accessing each histogram. Does bounds checking.

Definition at line 13 of file THistogramArrayBase.cxx.

Here is the caller graph for this function:

◆ GetNumberChannelsInGroup()

const int THistogramArrayBase::GetNumberChannelsInGroup ( )
inline

Definition at line 60 of file THistogramArrayBase.h.

Here is the caller graph for this function:

◆ GetSubTabName()

virtual std::string THistogramArrayBase::GetSubTabName ( )
inlinevirtual

Get the name of the sub-tab for these plots, if running DaqDisplay.

Definition at line 86 of file THistogramArrayBase.h.

◆ GetTabName()

virtual std::string THistogramArrayBase::GetTabName ( )
inlinevirtual

Get the name of the top-level tab for these plots, if running DaqDisplay.

Definition at line 81 of file THistogramArrayBase.h.

◆ HasAutoUpdate()

const bool THistogramArrayBase::HasAutoUpdate ( )
inline

Definition at line 76 of file THistogramArrayBase.h.

Here is the caller graph for this function:

◆ IsUpdateWhenPlotted()

virtual bool THistogramArrayBase::IsUpdateWhenPlotted ( )
inlinevirtual

Get whether these histograms should be drawn by DaqDisplay::DrawCanvas() rather than DaqAnalyzer::ProcessMidasEvent()

Definition at line 92 of file THistogramArrayBase.h.

◆ SetChannelName()

void THistogramArrayBase::SetChannelName ( std::string  name)
inline

Set name for the 'channel'.

Definition at line 67 of file THistogramArrayBase.h.

◆ SetGroupName()

void THistogramArrayBase::SetGroupName ( std::string  name)
inline

Set name for the 'group'.

Definition at line 63 of file THistogramArrayBase.h.

Here is the caller graph for this function:

◆ SetNumberChannelsInGroup()

void THistogramArrayBase::SetNumberChannelsInGroup ( int  numberChannelsInGroups)
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.

Here is the caller graph for this function:

◆ SetSubTabName()

virtual void THistogramArrayBase::SetSubTabName ( std::string  name)
inlineprotectedvirtual

Set the name of the sub-tab for these plots, if running DaqDisplay.

Definition at line 110 of file THistogramArrayBase.h.

Here is the caller graph for this function:

◆ SetTabName()

virtual void THistogramArrayBase::SetTabName ( std::string  name)
inlineprotectedvirtual

Set the name of the top-level tab for these plots, if running DaqDisplay.

Definition at line 105 of file THistogramArrayBase.h.

◆ SetUpdateOnlyWhenPlotted()

virtual void THistogramArrayBase::SetUpdateOnlyWhenPlotted ( bool  whenupdate)
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.

Here is the caller graph for this function:

◆ UpdateHistograms()

virtual void THistogramArrayBase::UpdateHistograms ( TDataContainer dataContainer)
pure virtual

Field Documentation

◆ fChannelName

std::string THistogramArrayBase::fChannelName
private

The name for the 'channel'.

Definition at line 133 of file THistogramArrayBase.h.

◆ fDisableAutoUpdate

bool THistogramArrayBase::fDisableAutoUpdate
private

Defines whether the histogram should be automatically updated by TRootanaDisplay.

Definition at line 137 of file THistogramArrayBase.h.

◆ fGroupName

std::string THistogramArrayBase::fGroupName
private

The name for the 'group'.

Definition at line 130 of file THistogramArrayBase.h.

◆ fHasAutoUpdate

bool THistogramArrayBase::fHasAutoUpdate
private

Definition at line 138 of file THistogramArrayBase.h.

◆ fNumberChannelsInGroups

int THistogramArrayBase::fNumberChannelsInGroups
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.

◆ fSubTabName

std::string THistogramArrayBase::fSubTabName
private

Definition at line 141 of file THistogramArrayBase.h.

◆ fTabName

std::string THistogramArrayBase::fTabName
private

Definition at line 142 of file THistogramArrayBase.h.

◆ fUpdateWhenPlotted

bool THistogramArrayBase::fUpdateWhenPlotted
private

Definition at line 146 of file THistogramArrayBase.h.


The documentation for this class was generated from the following files: