Diana Software
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
QGPulse Class Reference

Class for GUI pulse plots. More...

Inheritance diagram for QGPulse:
QGGraph QGPlot

Public Member Functions

 QGPulse ()
 Default constructor. More...
 
 QGPulse (const QGPulse &)
 Copy constructor. More...
 
virtual ~QGPulse ()
 Destructor. More...
 
void AutoSetStyle ()
 Automatically set the pulse style. More...
 
void Display ()
 Display pulse. More...
 
void DisplayEditWindow ()
 Display edit window. More...
 
void DrawStylePulse ()
 Draw a mini-pulse showing the style of the pulse. More...
 
void Duplicate ()
 Duplicate the pulse. More...
 
void Erase ()
 Erase the pulse. More...
 
void FillEventData ()
 Fill event data for the displayed pulse. More...
 
void Generate (QChain *chain=0)
 Generate the pulse. More...
 
const std::vector< std::string > & GetEventData () const
 Get event data for displayed pulse. More...
 
Int_t GetEventIndex ()
 Get event index of displayed pulse. More...
 
Int_t GetNumberOfEvents ()
 Get number of events that pass the cuts. More...
 
const std::string & GetOrderVariable () const
 Get order variable. More...
 
const std::string & GetSamplesLabel () const
 Get samples label. More...
 
void GetParametersFromEditWindow ()
 Get parameters from edit window. More...
 
bool GetPulseFromChain (Long64_t eventIndex)
 Get pulse from chain. More...
 
TGraph * GetStylePulse ()
 Get style pulse. More...
 
bool IsUseADCUnitsSet () const
 Return true if pulse is set to be displayed with ADC units. More...
 
bool IsShowLegendsSet () const
 Return true if pulse info legends added to pulse. More...
 
void MakeStylePlot ()
 Make style plot. More...
 
bool NeedsReordering () const
 Check whether the pulses need reordering. More...
 
void Order ()
 Order the pulses accoring to the order variable. More...
 
void SetEventData (const std::vector< std::string > &eventData)
 Set event data. More...
 
void SetEventIndex (Long_t index)
 Set event index of displayed pulse. More...
 
void SetName (const char *name=0)
 Set name of the pulse. More...
 
void SetOrderVariable (const std::string &orderVariable)
 Set the variable by which pulses are ordered. More...
 
void SetProperty (const std::string &key, const std::string &value)
 Set property (used for opening a session) More...
 
void SetReorder (bool flag=true)
 Set whether the pulses need to be reordered. More...
 
void SetUseADCUnits (bool flag=true)
 Set whether to display the pulse using ADC units. More...
 
void SetShowLegends (bool flag=true)
 Set whether to display legends on the pulse. More...
 
void SetZeroOffset (bool flag=true)
 Set whether subtract first sample to tue pulse. More...
 
void SetUnitary (bool flag=true)
 Set whether normalize pulse. More...
 
void SetSamplesLabel (const std::string &samplesLabel)
 Set the label of samples to draw. More...
 
void UpdatePulseEditWindow ()
 Update pulse edit window. More...
 
- Public Member Functions inherited from QGGraph
 QGGraph ()
 Default constructor. More...
 
 QGGraph (const QGGraph &)
 Copy constructor. More...
 
virtual ~QGGraph ()
 Destructor. More...
 
virtual const char * GetName () const
 Get graph name. More...
 
virtual void Reset ()
 Reset the graph to an empty state. More...
 
virtual void SetPoints (Int_t n, const Double_t *x, const Double_t *y)
 Set the points of the graph. More...
 
- Public Member Functions inherited from QGPlot
 QGPlot ()
 Default constructor. More...
 
 QGPlot (const QGPlot &)
 Copy constructor. More...
 
virtual ~QGPlot ()
 Destructor. More...
 
virtual void AddCut (const std::string &cut)
 Add cut. More...
 
virtual std::string GeneratePlotName (const std::string &baseName) const
 Generate a name for the plot. More...
 
virtual TCanvas * GetCanvas ()
 Get pointer to the associated canvas. More...
 
virtual QGCanvasWindowGetCanvasWindow () const
 Get pointer to the canvas window to which the plot is associated. More...
 
virtual void GetCanvasWindowFromEditWindow ()
 Get canvas window from edit window. More...
 
virtual const std::vector< std::string > & GetCuts () const
 Get cuts applied to make the plot. More...
 
virtual void GetCutsFromEditWindow ()
 Get cuts from edit window. More...
 
virtual QGPlotEditWindowGetEditWindow ()
 Get pointer to edit window. More...
 
virtual const std::string & GetXUnits () const
 Get x-axis units. More...
 
virtual const std::string & GetXVariable () const
 Get x-axis variable. More...
 
virtual const std::string & GetYUnits () const
 Get y-axis units. More...
 
virtual const std::string & GetYVariable () const
 Get y-axis variable. More...
 
virtual bool IsNameInUse (const std::string &name) const
 Check whether string is the name of any plot. More...
 
virtual bool IsSuperimposeSet () const
 Return true if plot is set to be superimposed. More...
 
virtual void MakeCutsString ()
 Make cuts string. More...
 
virtual bool NeedsRegeneration () const
 Check whether plot needs to be regenerated. More...
 
virtual void Plot ()
 Plot this in the associated canvas window, generating it if necessary. More...
 
virtual void SetCanvasWindow (QGCanvasWindow *window)
 Set the canvas window to which the plot is associated. More...
 
virtual void SetCuts (const std::vector< std::string > &cuts)
 Set cuts to apply in generating the plot. More...
 
virtual void SetPlotEditWindow (QGPlotEditWindow *window)
 Set plot edit window. More...
 
virtual void SetRegenerate (bool flag=true)
 Set whether the plot needs to be regenerated. More...
 
virtual void SetSuperimpose (bool flag=false)
 Set whether the plot should be superimposed. More...
 
virtual void SetXVariable (const std::string &x)
 Set X-axis variable. More...
 
virtual void SetXUnits (const std::string &units)
 Set X-axis units. More...
 
virtual void SetYVariable (const std::string &y)
 Set Y-axis variable. More...
 
virtual void SetYUnits (const std::string &units)
 Set Y-axis units. More...
 

Private Member Functions

void DisplaySampleMarkers ()
 Display markers for significant samples. More...
 
std::string HumanizeEventData (std::string)
 Humanize the event data to display along with pulse. More...
 

Private Attributes

std::vector< std::string > fEventData
 Event data for displayed pulse. More...
 
std::vector< Long64_t >::size_type fEventIndex
 Index of current event. More...
 
TEventList * fEventList
 List of events passing the cuts. More...
 
bool fNeedsReordering
 Indicates whether pulses need to be reordered. More...
 
std::vector< Long64_t > fOrderedEvents
 Ordered collection of events that pass the cuts. More...
 
std::string fOrderVariable
 Variable by which pulses are ordered. More...
 
std::vector< TMarker * > fSampleMarkers
 Sample markers for significant samples. More...
 
TGraph * fStylePulse
 Mini-pulse to show style of this pulse. More...
 
bool fUseADCUnits
 Whether or not to use ADC units, otherwise use mV and seconds. More...
 
bool fZeroOffset
 Subtract first sample to all samples. More...
 
bool fUnitary
 Zero offset and unitary amplitude. More...
 
bool fShowLegends
 Whether or not to show legends on pulse. More...
 
std::string fSamplesLabel
 samples to draw More...
 

Static Private Attributes

static std::list< QGPulse * > fPulses
 Collection of pointers to all QGPulses. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from QGPlot
static QGPlotGetPlotByName (const std::string &name)
 Get plot by name. More...
 
static const std::list< QGPlot * > & GetPlots ()
 Get collection of plots. More...
 
static void ShowPlotsList ()
 Show plots list. More...
 
- Protected Attributes inherited from QGPlot
QGCanvasWindowfCanvasWindow
 Canvas window to which plot is associated. More...
 
std::vector< std::string > fCuts
 Cuts applied to make the plot. More...
 
std::string fCutsString
 Cuts in a single string. More...
 
bool fNeedsRegeneration
 Indicates whether plot needs to be regenerated because settings have changed. More...
 
QGPlotEditWindowfPlotEditWindow
 Pointer to plot edit window. More...
 
bool fSuperimpose
 Indicates whether plot should be superimposed on existing plot. More...
 
std::string fXVariable
 X-axis variable. More...
 
std::string fXUnits
 X-axis units. More...
 
std::string fYVariable
 Y-axis variable. More...
 
std::string fYUnits
 Y-axis units. More...
 
- Static Protected Attributes inherited from QGPlot
static std::list< QGPlot * > fPlots
 Collection of pointers to all QGPlots. More...
 

Detailed Description

Class for GUI pulse plots.

Author
Adam Bryant (adam_.nosp@m.brya.nosp@m.nt@be.nosp@m.rkel.nosp@m.ey.ed.nosp@m.u)

Definition at line 18 of file QGPulse.hh.

Constructor & Destructor Documentation

◆ QGPulse() [1/2]

QGPulse::QGPulse ( )

Default constructor.

Definition at line 51 of file QGPulse.cc.

References fEventData, fPulses, MakeStylePlot(), and SetName().

Referenced by Duplicate().

◆ QGPulse() [2/2]

QGPulse::QGPulse ( const QGPulse pulse)

Copy constructor.

Definition at line 69 of file QGPulse.cc.

References fEventList, fPulses, MakeStylePlot(), and SetName().

◆ ~QGPulse()

QGPulse::~QGPulse ( )
virtual

Destructor.

Definition at line 84 of file QGPulse.cc.

References QGPlot::fPlotEditWindow, fPulses, fSampleMarkers, and fStylePulse.

Member Function Documentation

◆ AutoSetStyle()

void QGPulse::AutoSetStyle ( )
virtual

Automatically set the pulse style.

Reimplemented from QGPlot.

Definition at line 104 of file QGPulse.cc.

References fPulses, MakeStylePlot(), and SetLineColor().

Referenced by Duplicate(), QGPlotIconsFrame::HandlePulsesButton(), and QGGraphicalCut::ViewPulses().

◆ Display()

void QGPulse::Display ( )
virtual

◆ DisplayEditWindow()

void QGPulse::DisplayEditWindow ( )
virtual

◆ DisplaySampleMarkers()

void QGPulse::DisplaySampleMarkers ( )
private

Display markers for significant samples.

Definition at line 212 of file QGPulse.cc.

References fSampleMarkers.

Referenced by Display().

◆ DrawStylePulse()

void QGPulse::DrawStylePulse ( )

Draw a mini-pulse showing the style of the pulse.

Definition at line 221 of file QGPulse.cc.

References fStylePulse, and MakeStylePlot().

Referenced by DisplayEditWindow().

◆ Duplicate()

void QGPulse::Duplicate ( )
virtual

Duplicate the pulse.

Reimplemented from QGPlot.

Definition at line 236 of file QGPulse.cc.

References AutoSetStyle(), DisplayEditWindow(), and QGPulse().

◆ Erase()

void QGPulse::Erase ( )
virtual

◆ FillEventData()

void QGPulse::FillEventData ( )

Fill event data for the displayed pulse.

Definition at line 261 of file QGPulse.cc.

References QGPlot::fCanvasWindow, fEventData, fEventIndex, fOrderedEvents, QGCanvasWindow::GetFileHandler(), QGFileHandler::GetQChain(), and QGFileHandler::IsFileOpen().

Referenced by Display().

◆ Generate()

void QGPulse::Generate ( QChain chain = 0)
virtual

◆ GetEventData()

const std::vector<std::string>& QGPulse::GetEventData ( ) const
inline

Get event data for displayed pulse.

Definition at line 54 of file QGPulse.hh.

References fEventData.

Referenced by QGPulseEditWindow::UpdateEventData().

◆ GetEventIndex()

Int_t QGPulse::GetEventIndex ( )
inline

Get event index of displayed pulse.

Definition at line 57 of file QGPulse.hh.

References fEventIndex.

Referenced by QGPulseEditWindow::UpdateEventData().

◆ GetNumberOfEvents()

Int_t QGPulse::GetNumberOfEvents ( )

Get number of events that pass the cuts.

Definition at line 320 of file QGPulse.cc.

References fEventList.

Referenced by QGPulseEditWindow::UpdateEventData().

◆ GetOrderVariable()

const std::string& QGPulse::GetOrderVariable ( ) const
inline

Get order variable.

Definition at line 63 of file QGPulse.hh.

References fOrderVariable.

◆ GetParametersFromEditWindow()

void QGPulse::GetParametersFromEditWindow ( )
virtual

◆ GetPulseFromChain()

bool QGPulse::GetPulseFromChain ( Long64_t  eventIndex)

◆ GetSamplesLabel()

const std::string& QGPulse::GetSamplesLabel ( ) const
inline

Get samples label.

Definition at line 66 of file QGPulse.hh.

References fSamplesLabel.

◆ GetStylePulse()

TGraph* QGPulse::GetStylePulse ( )
inline

Get style pulse.

Definition at line 75 of file QGPulse.hh.

References fStylePulse.

◆ HumanizeEventData()

string QGPulse::HumanizeEventData ( std::string  )
private

Humanize the event data to display along with pulse.

Definition at line 611 of file QGPulse.cc.

Referenced by Display().

◆ IsShowLegendsSet()

bool QGPulse::IsShowLegendsSet ( ) const
inline

Return true if pulse info legends added to pulse.

Definition at line 81 of file QGPulse.hh.

References fShowLegends.

◆ IsUseADCUnitsSet()

bool QGPulse::IsUseADCUnitsSet ( ) const
inline

Return true if pulse is set to be displayed with ADC units.

Definition at line 78 of file QGPulse.hh.

References fUseADCUnits.

◆ MakeStylePlot()

void QGPulse::MakeStylePlot ( )

Make style plot.

Definition at line 473 of file QGPulse.cc.

References fStylePulse, and N.

Referenced by AutoSetStyle(), DrawStylePulse(), and QGPulse().

◆ NeedsReordering()

bool QGPulse::NeedsReordering ( ) const
inline

Check whether the pulses need reordering.

Definition at line 87 of file QGPulse.hh.

References fNeedsReordering.

Referenced by Display().

◆ Order()

void QGPulse::Order ( )

Order the pulses accoring to the order variable.

Definition at line 489 of file QGPulse.cc.

References QGPlot::fCanvasWindow, fEventIndex, fEventList, fOrderedEvents, fOrderVariable, QGCanvasWindow::GetFileHandler(), QGFileHandler::GetQChain(), QGFileHandler::IsFileOpen(), and SetReorder().

Referenced by Display(), and Generate().

◆ SetEventData()

void QGPulse::SetEventData ( const std::vector< std::string > &  eventData)
inline

Set event data.

Definition at line 93 of file QGPulse.hh.

References fEventData.

Referenced by GetParametersFromEditWindow().

◆ SetEventIndex()

void QGPulse::SetEventIndex ( Long_t  index)

Set event index of displayed pulse.

Definition at line 525 of file QGPulse.cc.

References fEventIndex.

Referenced by GetParametersFromEditWindow(), and SetProperty().

◆ SetName()

void QGPulse::SetName ( const char *  name = 0)
virtual

Set name of the pulse.

Reimplemented from QGPlot.

Definition at line 534 of file QGPulse.cc.

References QGPlot::GeneratePlotName(), and QGPlot::IsNameInUse().

Referenced by QGPulse().

◆ SetOrderVariable()

void QGPulse::SetOrderVariable ( const std::string &  orderVariable)

Set the variable by which pulses are ordered.

Definition at line 551 of file QGPulse.cc.

References fOrderVariable, and SetReorder().

Referenced by GetParametersFromEditWindow(), and SetProperty().

◆ SetProperty()

void QGPulse::SetProperty ( const std::string &  key,
const std::string &  value 
)
virtual

◆ SetReorder()

void QGPulse::SetReorder ( bool  flag = true)
inline

Set whether the pulses need to be reordered.

Definition at line 108 of file QGPulse.hh.

References fNeedsReordering.

Referenced by Display(), Order(), and SetOrderVariable().

◆ SetSamplesLabel()

void QGPulse::SetSamplesLabel ( const std::string &  samplesLabel)
inline

Set the label of samples to draw.

Definition at line 123 of file QGPulse.hh.

References fSamplesLabel.

Referenced by GetParametersFromEditWindow(), and SetProperty().

◆ SetShowLegends()

void QGPulse::SetShowLegends ( bool  flag = true)
inline

Set whether to display legends on the pulse.

Definition at line 114 of file QGPulse.hh.

References fShowLegends.

Referenced by GetParametersFromEditWindow().

◆ SetUnitary()

void QGPulse::SetUnitary ( bool  flag = true)
inline

Set whether normalize pulse.

Definition at line 120 of file QGPulse.hh.

References fUnitary.

Referenced by GetParametersFromEditWindow().

◆ SetUseADCUnits()

void QGPulse::SetUseADCUnits ( bool  flag = true)
inline

Set whether to display the pulse using ADC units.

Definition at line 111 of file QGPulse.hh.

References fUseADCUnits.

Referenced by GetParametersFromEditWindow().

◆ SetZeroOffset()

void QGPulse::SetZeroOffset ( bool  flag = true)
inline

Set whether subtract first sample to tue pulse.

Definition at line 117 of file QGPulse.hh.

References fZeroOffset.

Referenced by GetParametersFromEditWindow().

◆ UpdatePulseEditWindow()

void QGPulse::UpdatePulseEditWindow ( )

Update pulse edit window.

Definition at line 604 of file QGPulse.cc.

References QGPlot::fPlotEditWindow.

Referenced by Display().

Member Data Documentation

◆ fEventData

std::vector<std::string> QGPulse::fEventData
private

Event data for displayed pulse.

Definition at line 133 of file QGPulse.hh.

Referenced by Display(), FillEventData(), GetEventData(), QGPulse(), and SetEventData().

◆ fEventIndex

std::vector<Long64_t>::size_type QGPulse::fEventIndex
private

Index of current event.

Definition at line 139 of file QGPulse.hh.

Referenced by Display(), FillEventData(), GetEventIndex(), Order(), and SetEventIndex().

◆ fEventList

TEventList* QGPulse::fEventList
private

List of events passing the cuts.

Definition at line 142 of file QGPulse.hh.

Referenced by Generate(), GetNumberOfEvents(), Order(), and QGPulse().

◆ fNeedsReordering

bool QGPulse::fNeedsReordering
private

Indicates whether pulses need to be reordered.

Definition at line 145 of file QGPulse.hh.

Referenced by NeedsReordering(), and SetReorder().

◆ fOrderedEvents

std::vector<Long64_t> QGPulse::fOrderedEvents
private

Ordered collection of events that pass the cuts.

Definition at line 148 of file QGPulse.hh.

Referenced by Display(), FillEventData(), and Order().

◆ fOrderVariable

std::string QGPulse::fOrderVariable
private

Variable by which pulses are ordered.

Definition at line 151 of file QGPulse.hh.

Referenced by GetOrderVariable(), Order(), and SetOrderVariable().

◆ fPulses

list< QGPulse * > QGPulse::fPulses
staticprivate

Collection of pointers to all QGPulses.

Definition at line 154 of file QGPulse.hh.

Referenced by AutoSetStyle(), QGPulse(), and ~QGPulse().

◆ fSampleMarkers

std::vector<TMarker*> QGPulse::fSampleMarkers
private

Sample markers for significant samples.

Definition at line 157 of file QGPulse.hh.

Referenced by DisplaySampleMarkers(), Erase(), GetPulseFromChain(), and ~QGPulse().

◆ fSamplesLabel

std::string QGPulse::fSamplesLabel
private

samples to draw

Definition at line 175 of file QGPulse.hh.

Referenced by GetPulseFromChain(), GetSamplesLabel(), and SetSamplesLabel().

◆ fShowLegends

bool QGPulse::fShowLegends
private

Whether or not to show legends on pulse.

Definition at line 172 of file QGPulse.hh.

Referenced by Display(), IsShowLegendsSet(), and SetShowLegends().

◆ fStylePulse

TGraph* QGPulse::fStylePulse
private

Mini-pulse to show style of this pulse.

Definition at line 160 of file QGPulse.hh.

Referenced by Display(), DrawStylePulse(), GetStylePulse(), MakeStylePlot(), and ~QGPulse().

◆ fUnitary

bool QGPulse::fUnitary
private

Zero offset and unitary amplitude.

Definition at line 169 of file QGPulse.hh.

Referenced by GetPulseFromChain(), and SetUnitary().

◆ fUseADCUnits

bool QGPulse::fUseADCUnits
private

Whether or not to use ADC units, otherwise use mV and seconds.

Definition at line 163 of file QGPulse.hh.

Referenced by GetPulseFromChain(), IsUseADCUnitsSet(), and SetUseADCUnits().

◆ fZeroOffset

bool QGPulse::fZeroOffset
private

Subtract first sample to all samples.

Definition at line 166 of file QGPulse.hh.

Referenced by GetPulseFromChain(), and SetZeroOffset().


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