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,
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_
int getLog(const std::string &axis)
Return 1 if the specified axis is logarithmically scaled.
void setLog(const std::string &axis, int flag)
Sets the specified axis to Logarithmic binning (if applicable ) and display.
const std::string & getTitle() const
Returns the title of the display.
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
double numberOfEntries() const
Return the number of entries in the display.
void setTitle(const std::string &title)
Sets the title of 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.
PyNTuple * createNTuple() const
Creates and returns an PyNTuple representing the display.
std::vector< double > getRange(const std::string &axis)
Get the Range of the specified axis.
int numViews()
Return the number of stored views.
Qt Displays wraps a derived class of PlotterBase.
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.
A wrapper class for Python list objects.
void update()
Updates the display.
void addDataRep(const std::string &type, const DataSource *ntuple, const std::vector< std::string > &bindings)
Creates and adds a DataRep to the display.
This class is the public interface the what the user sees as the DataRep object from Python...
Base class for DataSource.
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.
void addFunction(FunctionBase *function)
Adds a Function (as a FunctionBase object)
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 reset()
Resets all bins.
The base class for the point representation hierarchy.
void createDisplay(const std::string &type, const DataSource &nt, const std::vector< std::string > &bindings)
Create a QtDisplay.
PyArray_TYPES type(numeric::array arr)
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 setView(int index)
Set the view by index.
void setAspectRatio(double ratio)
Sets the aspect ratio.
void applyCut(QtDisplay *cut)
Applies a cut to the wrapped PlotterBase.
void setTransform(const std::string &name)
Sets the Transform.
PyDataSource * createDataArray() const
Creates a data array wrapper for the contents of the display.
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.
PlotterBase * m_plotter
The contained PlotterBase object.
PlotterBase * display()
Returns the wrapped display object.
void setRange(const std::string &axis, double low, double high, bool save=false)
Sets the Range on the specified axis.
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.
A wrapper for NTuple, so that when NTuple is used in Qt based application, the application object can...
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...
int plotterId() const
Return the Id to the plotter object.
void setContourLevels(const std::vector< double > &levels)
Set the contour levels if a ContourPointRep.
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.
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.
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.
void deleteView(int index)
Delete a view by index.
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.
This class is the public Python interface wrap for the FunctionRep class.
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.
A function that can be added to a DataRep and used in a fitter.
void addValues(const std::vector< double > &v)
Adds the values to the display.
A wrapper class for Python tuple objects.
This class is the public interface to a DataSource object that the user sees as the DataArray object ...