Diana Software
QGuiScatterPlot.cc
Go to the documentation of this file.
1 #include "QGuiScatterPlot.hh"
2 #include <iostream>
3 #include <sstream>
4 
5 using std::endl;
6 using std::string;
7 using std::stringstream;
8 using std::vector;
9 
11 {
12 }
13 
15 {
16 }
17 
18 string QGuiScatterPlot::Dump() const
19 {
20  stringstream scatterPlotDump;
21  scatterPlotDump << SCATTER_PLOT_KEY << endl;
22  if (fName != "") {
23  scatterPlotDump << NAME_KEY << " " << fName << endl;
24  }
25  if (fXVariable != "") {
26  scatterPlotDump << X_VARIABLE_KEY << " " << fXVariable << endl;
27  }
28  if (fYVariable != "") {
29  scatterPlotDump << Y_VARIABLE_KEY << " " << fYVariable << endl;
30  }
31  for (vector<string>::const_iterator iter = fCuts.begin();
32  iter != fCuts.end();
33  ++iter) {
34  scatterPlotDump << CUT_KEY << " " << *iter << endl;
35  }
36  return scatterPlotDump.str();
37 }
#define CUT_KEY
#define Y_VARIABLE_KEY
#define SCATTER_PLOT_KEY
#define NAME_KEY
#define X_VARIABLE_KEY
~QGuiScatterPlot()
Default destructor.
QGuiScatterPlot()
Default constructor.
std::string Dump() const
Dump to string to write to session file.
std::vector< std::string > fCuts
Cuts.
std::string fYVariable
y-variable
std::string fXVariable
x-variable
Base class for GUI session objects like histograms and scatter plots.
std::string fName
Name.