![]() |
Diana Software
|
Class for GUI pulse plots. More...
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 QGCanvasWindow * | GetCanvasWindow () 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 QGPlotEditWindow * | GetEditWindow () |
| 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 QGPlot * | GetPlotByName (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 | |
| QGCanvasWindow * | fCanvasWindow |
| 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... | |
| QGPlotEditWindow * | fPlotEditWindow |
| 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... | |
Class for GUI pulse plots.
Definition at line 18 of file QGPulse.hh.
| QGPulse::QGPulse | ( | ) |
Default constructor.
Definition at line 51 of file QGPulse.cc.
References fEventData, fPulses, MakeStylePlot(), and SetName().
Referenced by Duplicate().
| QGPulse::QGPulse | ( | const QGPulse & | pulse | ) |
Copy constructor.
Definition at line 69 of file QGPulse.cc.
References fEventList, fPulses, MakeStylePlot(), and SetName().
|
virtual |
Destructor.
Definition at line 84 of file QGPulse.cc.
References QGPlot::fPlotEditWindow, fPulses, fSampleMarkers, and fStylePulse.
|
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().
|
virtual |
Display pulse.
Reimplemented from QGPlot.
Definition at line 122 of file QGPulse.cc.
References QGCanvasWindow::AddToDrawnPlots(), QGCanvasWindow::ClearDrawnPlots(), DisplaySampleMarkers(), Draw(), QGPlot::fCanvasWindow, fEventData, fEventIndex, FillEventData(), fOrderedEvents, fShowLegends, fStylePulse, QGPlot::fSuperimpose, QGCanvasWindow::GetDrawnPlots(), QGPlotFrame::GetEmbeddedCanvas(), QGCanvasWindow::GetPlotFrame(), GetPulseFromChain(), QGPlot::GetXUnits(), QGPlot::GetYUnits(), HumanizeEventData(), NeedsReordering(), Order(), QGCanvasWindow::RemoveFromDrawnPlots(), QGGraph::Reset(), QGGraph::SetPoints(), SetReorder(), and UpdatePulseEditWindow().
|
virtual |
Display edit window.
Reimplemented from QGPlot.
Definition at line 199 of file QGPulse.cc.
References DrawStylePulse(), QGPlot::fPlotEditWindow, QGPlotStyleFrame::GetEmbeddedCanvas(), QGPlotEditWindow::GetPlotStyleFrame(), and QGPlotEditWindow::SetPlot().
Referenced by Duplicate(), QGPlotIconsFrame::HandlePulsesButton(), and QGGraphicalCut::ViewPulses().
|
private |
Display markers for significant samples.
Definition at line 212 of file QGPulse.cc.
References fSampleMarkers.
Referenced by Display().
| 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().
|
virtual |
Duplicate the pulse.
Reimplemented from QGPlot.
Definition at line 236 of file QGPulse.cc.
References AutoSetStyle(), DisplayEditWindow(), and QGPulse().
|
virtual |
Erase the pulse.
Reimplemented from QGPlot.
Definition at line 243 of file QGPulse.cc.
References QGPlot::fCanvasWindow, fSampleMarkers, QGPlotFrame::GetEmbeddedCanvas(), QGCanvasWindow::GetPlotFrame(), and QGCanvasWindow::RemoveFromDrawnPlots().
| 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().
|
virtual |
Generate the pulse.
Reimplemented from QGPlot.
Definition at line 299 of file QGPulse.cc.
References QGPlot::fCanvasWindow, QGPlot::fCutsString, fEventList, QGCanvasWindow::GetFileHandler(), QGFileHandler::GetQChain(), QGFileHandler::IsFileOpen(), and Order().
|
inline |
Get event data for displayed pulse.
Definition at line 54 of file QGPulse.hh.
References fEventData.
Referenced by QGPulseEditWindow::UpdateEventData().
|
inline |
Get event index of displayed pulse.
Definition at line 57 of file QGPulse.hh.
References fEventIndex.
Referenced by QGPulseEditWindow::UpdateEventData().
| 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().
|
inline |
|
virtual |
Get parameters from edit window.
Reimplemented from QGPlot.
Definition at line 325 of file QGPulse.cc.
References QGPlot::fPlotEditWindow, SetEventData(), SetEventIndex(), SetOrderVariable(), SetSamplesLabel(), SetShowLegends(), QGPlot::SetSuperimpose(), SetUnitary(), SetUseADCUnits(), and SetZeroOffset().
| bool QGPulse::GetPulseFromChain | ( | Long64_t | eventIndex | ) |
Get pulse from chain.
Definition at line 344 of file QGPulse.cc.
References QChannelRunData::fADC2mV, QGPlot::fCanvasWindow, fSampleMarkers, fSamplesLabel, QChannelRunData::fSamplingFrequency, fUnitary, fUseADCUnits, fZeroOffset, QGFileHandler::GetChannelRunData(), QGCanvasWindow::GetFileHandler(), QGFileHandler::GetGenericObject(), QGFileHandler::GetMasterSample(), QVector::GetMax(), QGFileHandler::GetPulse(), QSampleInfo::GetSampleIndex(), QGFileHandler::GetSignificantSamples(), QGFileHandler::IsFileOpen(), QGGraph::SetPoints(), QGPlot::SetXUnits(), QGPlot::SetYUnits(), and QVector::Size().
Referenced by Display().
|
inline |
|
inline |
|
private |
Humanize the event data to display along with pulse.
Definition at line 611 of file QGPulse.cc.
Referenced by Display().
|
inline |
Return true if pulse info legends added to pulse.
Definition at line 81 of file QGPulse.hh.
References fShowLegends.
|
inline |
Return true if pulse is set to be displayed with ADC units.
Definition at line 78 of file QGPulse.hh.
References fUseADCUnits.
| void QGPulse::MakeStylePlot | ( | ) |
Make style plot.
Definition at line 473 of file QGPulse.cc.
References fStylePulse, and N.
Referenced by AutoSetStyle(), DrawStylePulse(), and QGPulse().
|
inline |
Check whether the pulses need reordering.
Definition at line 87 of file QGPulse.hh.
References fNeedsReordering.
Referenced by Display().
| 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().
|
inline |
Set event data.
Definition at line 93 of file QGPulse.hh.
References fEventData.
Referenced by GetParametersFromEditWindow().
| 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().
|
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().
| 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().
|
virtual |
Set property (used for opening a session)
Reimplemented from QGPlot.
Definition at line 559 of file QGPulse.cc.
References EVENT_INDEX_KEY, LINE_COLOR_KEY, LINE_STYLE_KEY, LINE_WIDTH_KEY, MARKER_COLOR_KEY, MARKER_SIZE_KEY, MARKER_STYLE_KEY, ORDER_VARIABLE_KEY, PULSE_VARIABLE_KEY, SetEventIndex(), SetLineColor(), SetOrderVariable(), QGPlot::SetProperty(), and SetSamplesLabel().
|
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().
|
inline |
Set the label of samples to draw.
Definition at line 123 of file QGPulse.hh.
References fSamplesLabel.
Referenced by GetParametersFromEditWindow(), and SetProperty().
|
inline |
Set whether to display legends on the pulse.
Definition at line 114 of file QGPulse.hh.
References fShowLegends.
Referenced by GetParametersFromEditWindow().
|
inline |
Set whether normalize pulse.
Definition at line 120 of file QGPulse.hh.
References fUnitary.
Referenced by GetParametersFromEditWindow().
|
inline |
Set whether to display the pulse using ADC units.
Definition at line 111 of file QGPulse.hh.
References fUseADCUnits.
Referenced by GetParametersFromEditWindow().
|
inline |
Set whether subtract first sample to tue pulse.
Definition at line 117 of file QGPulse.hh.
References fZeroOffset.
Referenced by GetParametersFromEditWindow().
| void QGPulse::UpdatePulseEditWindow | ( | ) |
Update pulse edit window.
Definition at line 604 of file QGPulse.cc.
References QGPlot::fPlotEditWindow.
Referenced by Display().
|
private |
Event data for displayed pulse.
Definition at line 133 of file QGPulse.hh.
Referenced by Display(), FillEventData(), GetEventData(), QGPulse(), and SetEventData().
|
private |
Index of current event.
Definition at line 139 of file QGPulse.hh.
Referenced by Display(), FillEventData(), GetEventIndex(), Order(), and SetEventIndex().
|
private |
List of events passing the cuts.
Definition at line 142 of file QGPulse.hh.
Referenced by Generate(), GetNumberOfEvents(), Order(), and QGPulse().
|
private |
Indicates whether pulses need to be reordered.
Definition at line 145 of file QGPulse.hh.
Referenced by NeedsReordering(), and SetReorder().
|
private |
Ordered collection of events that pass the cuts.
Definition at line 148 of file QGPulse.hh.
Referenced by Display(), FillEventData(), and Order().
|
private |
Variable by which pulses are ordered.
Definition at line 151 of file QGPulse.hh.
Referenced by GetOrderVariable(), Order(), and SetOrderVariable().
|
staticprivate |
Collection of pointers to all QGPulses.
Definition at line 154 of file QGPulse.hh.
Referenced by AutoSetStyle(), QGPulse(), and ~QGPulse().
|
private |
Sample markers for significant samples.
Definition at line 157 of file QGPulse.hh.
Referenced by DisplaySampleMarkers(), Erase(), GetPulseFromChain(), and ~QGPulse().
|
private |
samples to draw
Definition at line 175 of file QGPulse.hh.
Referenced by GetPulseFromChain(), GetSamplesLabel(), and SetSamplesLabel().
|
private |
Whether or not to show legends on pulse.
Definition at line 172 of file QGPulse.hh.
Referenced by Display(), IsShowLegendsSet(), and SetShowLegends().
|
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().
|
private |
Zero offset and unitary amplitude.
Definition at line 169 of file QGPulse.hh.
Referenced by GetPulseFromChain(), and SetUnitary().
|
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().
|
private |
Subtract first sample to all samples.
Definition at line 166 of file QGPulse.hh.
Referenced by GetPulseFromChain(), and SetZeroOffset().