81 std::map<std::string, std::pair <double, double> >
m_ranges;
92 const std::vector < std::string > & bindings );
117 const std::vector< std::string > & bindings );
125 const std::vector< std::string > & bindings );
133 const std::vector< std::string > & bindings );
140 const std::vector< std::string > & bindings,
141 boost::python::list indices );
147 boost::python::tuple,
148 const std::vector < std::string > & bindings );
155 const std::vector < std::string > & bindings );
176 const std::vector < std::string > & bindings );
183 const std::vector < std::string > & bindings );
200 const std::vector<PyDataRep *> &
getDataReps ()
const;
204 void setTitle (
const std::string & title );
207 const std::string &
getTitle()
const;
211 void setLabel (
const std::string & axis,
const std::string & label );
214 const std::string &
getLabel(
const std::string &axis)
const;
217 void setNumberOfBins (
const std::string & axis,
unsigned int number );
220 double getBinWidth (
const std::string & axis )
const;
223 void setBinWidth (
const std::string & axis,
double width,
228 void setBinWidth (
const std::string & axis,
double width );
231 void setOffset (
const std::string & axis,
double offset );
234 void setRange (
const std::string & axis,
double low,
double high,
239 void setRange (
const std::string & axis,
double low,
double high );
242 std::vector<double>
getRange (
const std::string & axis );
258 int nextView (
bool stepForward =
true );
274 void setLog (
const std::string & axis,
int flag );
277 int getLog (
const std::string & axis );
298 void addValues (
const std::vector < double > & v );
334 void setTicks (
const std::string & axis,
335 const std::vector < double > & values,
336 const std::vector < std::string > & labels );
340 void setAutoTicks (
const std::string & axis,
bool yes );
356 void applyCuts (
const std::vector < QtDisplay * > & cuts );
367 #endif // _QtDisplay_H_
void applyCut(QtDisplay *cut)
Applies a cut to the wrapped PlotterBase.
PlotterBase * display()
Returns the wrapped display object.
The base class for the PlotterBase hierarchy.
void setAutoTicks(const std::string &axis, bool yes)
Sets the ticks to be automatic or manual.
void setLabel(const std::string &axis, const std::string &label)
Sets the label on the corresponding axis.
The base class for the point representation hierarchy.
int plotterId() const
Return the Id to the plotter object.
This class is the public interface the what the user sees as the DataRep object from Python...
void setContourLevels(const std::vector< double > &levels)
Set the contour levels if a ContourPointRep.
A wrapper for RootNTuple, so that when RootNTuple is used in Qt based application, the application object can be locked and unlocked before calling any ROOT functions.
PlotterBase * m_plotter
The contained PlotterBase object.
void addObserver(hippodraw::Observer *observer)
Adds an observer to PlotterBase object.
void resize()
Restore the X and Y dimensions of the display to their saved values.
void setRange(const std::string &axis, double low, double high, bool save=false)
Sets the Range on the specified axis.
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
std::map< std::string, std::pair< double, double > > m_ranges
The saved X and Y ranges to be used with the resize() method.
std::vector< PyDataRep * > m_pyDataReps
A vector to store the PyDataRep pointers to be returned by reference via the getDataReps() method...
void deleteView(int index)
Delete a view by index.
const std::string & getLabel(const std::string &axis) const
Returns the label on the specified axis.
double getBinWidth(const std::string &axis) const
Returns the bin width on the specified axis.
PyDataRep * getDataRep()
Returns the selected DataRep in the plotter.
int saveView()
Save the current set of plot ranges which define a "view" for this plot.
void setPointRep(RepBase *rep)
Sets the PointRep for the display.
const std::string & getTitle() const
Returns the title of the display.
int currentView()
Return the current view index.
int nextView(bool stepForward=true)
Cycle through each set of plot ranges, thereby changing the view with each call.
double numberOfEntries() const
Return the number of entries in the display.
void setNumberOfBins(const std::string &axis, unsigned int number)
Sets the number of bins.
const std::vector< PyDataRep * > & getDataReps() const
Returns a vector of all DataReps in the plotter.
std::vector< double > getRange(const std::string &axis)
Get the Range of the specified axis.
void addDataRepStacked(const std::string &type, const DataSource *ntuple, const std::vector< std::string > &bindings)
Adds a DataRep to the display by stacking, i.e.
void addValues(const std::vector< double > &v)
Adds the values to the display.
PyArray_TYPES type(numeric::array arr)
Base class for DataSource.
int getLog(const std::string &axis)
Return 1 if the specified axis is logarithmically scaled.
void addDataRep(const std::string &type, const DataSource *ntuple, const std::vector< std::string > &bindings)
Creates and adds a DataRep to the display.
void setLog(const std::string &axis, int flag)
Sets the specified axis to Logarithmic binning (if applicable ) and display.
A wrapper for NTuple, so that when NTuple is used in Qt based application, the application object can...
void setTitle(const std::string &title)
Sets the title of the display.
PyNTuple * createNTuple() const
Creates and returns an PyNTuple representing the display.
int numViews()
Return the number of stored views.
std::map< std::string, double > m_binWidths
The saved X and Y bin widths to be used with the resize() method.
void setOffset(const std::string &axis, double offset)
Sets the offset of the bins on the specified axis.
void unlock()
Unlock the QApplication in case of exception.
void update()
Updates the display.
This class is the public interface to a DataSource object that the user sees as the DataArray object ...
void createDisplay(const std::string &type, const DataSource &nt, const std::vector< std::string > &bindings)
Create a QtDisplay.
QtDisplay()
A default constructor for derived classes.
void setBinWidth(const std::string &axis, double width, bool save=false)
Sets the bin width on the specified axis.
void addFunction(FunctionBase *function)
Adds a Function (as a FunctionBase object)
A function that can be added to a DataRep and used in a fitter.
void setColorMap(const std::string &name)
Set the color map by name.
void applyCuts(const std::vector< QtDisplay * > &cuts)
Applies a cuts to the wrapped PlotterBase.
void setTransform(const std::string &name)
Sets the Transform.
Qt Displays wraps a derived class of PlotterBase.
PyDataSource * createDataArray() const
Creates a data array wrapper for the contents of the display.
void reset()
Resets all bins.
void setTicks(const std::string &axis, const std::vector< double > &values, const std::vector< std::string > &labels)
Sets the axis ticks to specified points and values.
void setAutoRanging(const std::string &axis, bool flag)
Sets the auto ranging flag on specified axis.
void setView(int index)
Set the view by index.
This class is the public Python interface wrap for the FunctionRep class.
void setAspectRatio(double ratio)
Sets the aspect ratio.