![]() |
Diana Software
|
Class to generate session files for the GUI from a Diana module. More...
Public Member Functions | |
| QGuiSession (const std::string &name="GUI Session") | |
| Default constructor. More... | |
| virtual | ~QGuiSession () |
| Default destructor. More... | |
| void | Clear () |
| QGuiCalibrationWindow & | CalibrationWindow (std::string name) |
| Access calibration window. More... | |
| void | Dump (std::ostream &o) const |
| Dump session to string to be written to file. More... | |
| bool | GetUseReaderFileList () const |
| Get name MV FIXME (commented out) More... | |
| QGuiHistogram & | Histogram (std::string name) |
| Access histogram. More... | |
| QGuiScatterPlot & | ScatterPlot (std::string name) |
| Access scatter plot. More... | |
| void | SetName (const std::string &name) |
| Set name of session, becomes canvas window name. More... | |
| void | SetUseReaderFileList (const bool flag=true) |
| Set a flag to use file list from the reader. More... | |
Private Member Functions | |
| QObjectDef (QGuiSession, 1) | |
Private Attributes | |
| std::map< std::string, QGuiCalibrationWindow > | fCalibrationWindow |
| Calibration windows. More... | |
| std::map< std::string, QGuiHistogram > | fHistogram |
| Histograms. More... | |
| std::string | fName |
| Name. More... | |
| std::map< std::string, QGuiScatterPlot > | fScatterPlot |
| Scatter plots. More... | |
| bool | fUseReaderFileList |
| Flag to use file list from the reader (default is to use file list from the writer) More... | |
Class to generate session files for the GUI from a Diana module.
-------—Usage in module-------— QGuiSession session("MyGuiSessionName");
session.Histogram("EnergySpectrum_Channel1"); session.Histogram("EnergySpectrum_Channel1").SetXVariable("event_branch.fCalib.fEnergy"); session.Histogram("EnergySpectrum_Channel1").SetXMin(300); session.Histogram("EnergySpectrum_Channel1").SetXMax(3000); session.Histogram("EnergySpectrum_Channel1").SetNumberOfBins(2700); session.Histogram("EnergySpectrum_Channel1").SetCut("Channel == 1"); session.Histogram("EnergySpectrum_Channel1").SetCut("TriggerWord == 1");
session.ScatterPlot("AmplitudeVsBaseline_Channel1"); session.ScatterPlot("AmplitudeVsBaseline_Channel1").SetXVariable("event_branch.fPreProcess.fBaseline"); session.ScatterPlot("AmplitudeVsBaseline_Channel1").SetYVariable("event_branch.fOB.fAmplitude"); session.ScatterPlot("AmplitudeVsBaseline_Channel1").SetCut("HeaterFlag == 1"); session.ScatterPlot("AmplitudeVsBaseline_Channel1").SetCut("event_branch.fCountPulses.fNumberOfPulses == 1");
session.ScatterPlot("BaselineVsTime_Channel2"); session.ScatterPlot("BaselineVsTime_Channel2").SetXVariable("NsTime"); session.ScatterPlot("BaselineVsTime_Channel2").SetYVariable("event_branch.fPreProcess.fBaseline");
session.CalibrationWindow("FailedChannels"); session.CalibrationWindow("FailedChannels").AddPeak(511.0); session.CalibrationWindow("FailedChannels").AddPeak(583.0); session.CalibrationWindow("FailedChannels").AddPeak(2614.5); session.CalibrationWindow("FailedChannels").SetOutputFilename("filename");
// session.SetUseReaderFileList(true); // If this method is called, the GUI session file will contain the list of // files used by the current Reader. By default, the GUI session file // contains the list of files used by the current Writer;
-------—Load GUI session global writer in config file-------— framework load GuiSessionWriter load RootGlobalReader load RootGlobalWriter load ASCIIGlobalReader load ASCIIGlobalWriter
-------—Makefile for module should contain-------— CXXFLAGS += -I..//pkg/guisession
Definition at line 69 of file QGuiSession.hh.
| QGuiSession::QGuiSession | ( | const std::string & | name = "GUI Session" | ) |
|
virtual |
Default destructor.
Definition at line 18 of file QGuiSession.cc.
| QGuiCalibrationWindow & QGuiSession::CalibrationWindow | ( | std::string | name | ) |
Access calibration window.
Definition at line 22 of file QGuiSession.cc.
References fCalibrationWindow, and QGuiSessionItem::SetName().
|
inline |
Definition at line 77 of file QGuiSession.hh.
| void QGuiSession::Dump | ( | std::ostream & | o | ) | const |
Dump session to string to be written to file.
Definition at line 32 of file QGuiSession.cc.
References CANVAS_WINDOW_NAME_KEY, fCalibrationWindow, fHistogram, and fScatterPlot.
|
inline |
Get name MV FIXME (commented out)
Get flag to use file list from the reader
Definition at line 93 of file QGuiSession.hh.
| QGuiHistogram & QGuiSession::Histogram | ( | std::string | name | ) |
Access histogram.
Definition at line 61 of file QGuiSession.cc.
References fHistogram, and QGuiSessionItem::SetName().
|
private |
| QGuiScatterPlot & QGuiSession::ScatterPlot | ( | std::string | name | ) |
Access scatter plot.
Definition at line 71 of file QGuiSession.cc.
References fScatterPlot, and QGuiSessionItem::SetName().
|
inline |
Set name of session, becomes canvas window name.
Definition at line 102 of file QGuiSession.hh.
Referenced by QGuiSession().
|
inline |
Set a flag to use file list from the reader.
Definition at line 105 of file QGuiSession.hh.
|
private |
Calibration windows.
Definition at line 109 of file QGuiSession.hh.
Referenced by CalibrationWindow(), and Dump().
|
private |
|
private |
Name.
Definition at line 115 of file QGuiSession.hh.
|
private |
Scatter plots.
Definition at line 118 of file QGuiSession.hh.
Referenced by Dump(), and ScatterPlot().
|
private |
Flag to use file list from the reader (default is to use file list from the writer)
Definition at line 122 of file QGuiSession.hh.