20 #include "msdevstudio/MSconfig.h" 23 #endif // HAVE_CONFIG_H 109 const vector < string > &
115 return factory -> names ();
123 BinToColor * model = factory -> create ( name );
125 plotter -> setValueRep ( model );
133 const vector < string > & names = factory -> names ();
134 BinToColor * rep = factory -> create ( names[index] );
136 plotter -> setValueRep ( rep );
142 const std::vector < double > & ctrl_points )
145 model -> setControlPoints ( ctrl_points );
148 factory -> add ( model );
156 BinToColor * prototype = factory -> prototype ( name );
157 bool yes = prototype -> isUserDefined ();
159 factory ->
remove ( name );
165 const vector <double > &
170 return r -> getControlPoints ();
176 const std::vector < double > & sv)
180 r -> setControlPoints ( sv );
181 DataRep * datarep = plotter -> selectedDataRep ();
182 datarep -> notifyObservers ();
189 const std::vector <double> & sv)
193 const std::string transformName = r->
name();
205 const BinToColor * rep = plotter -> getValueRep ();
207 const string & name = rep -> name ();
209 unsigned int size = names.size();
210 for (
unsigned int i = 0; i <
size; i++ ) {
211 if ( name == names[i] ) {
226 const BinToColor * rep = plotter -> getValueRep ();
239 const BinToColor * rep = plotter -> getValueRep ();
241 yes = rep -> isUserDefined ();
247 const vector < string > &
253 return factory -> names ();
261 DataRep * rep = controller -> createDataRep ( name );
272 string what (
"DisplayController: data rep of type " );
273 what += rep -> name();
274 what +=
"\nhas NTuple bindings.\n";
275 what +=
"Can not create without them";
281 plotter -> setAutoRanging (
true );
293 const std::vector< std::string > & bindings )
const 300 assert ( proto != 0 );
303 addDataRep ( plotter, name, &tuple, bindings );
305 if ( proto -> needsMatrixSet () ) {
307 controller -> checkForImage ( plotter, tuple );
311 plotter -> autoScale ();
322 unsigned int size = ntuple -> rows ();
324 vector < double > values ( size );
325 vector < double > residuals ( size );
326 DataRep * data1 = plotter -> getDataRep(0);
327 DataRep * data2 = plotter -> getDataRep(1);
331 vector < double > & x1 = ntuple1 -> getColumn ( 0 );
332 vector < double > & y1 = ntuple1 -> getColumn ( 1 );
333 vector < double > & deltaX1 = ntuple1 -> getColumn (2);
335 vector < double > & x2 = ntuple2 -> getColumn ( 0 );
336 vector < double > & y2 = ntuple2 -> getColumn ( 1 );
337 vector < double > & deltaX2 = ntuple2 -> getColumn (2);
339 vector <double> xDiff;
340 vector <double> yDiff;
341 vector <double> deltaXDiff;
342 vector <double> deltaYDiff;
346 while( i < x1.size() && j < x2.size() ) {
347 if (x1[i] + deltaX1[i] == x2[j] + deltaX2[j]) {
348 if ( xDiff.empty()) {
349 xDiff.push_back(x1[i]);
350 yDiff.push_back(y2[j] - y1[i]);
351 deltaXDiff.push_back(deltaX1[i]);
356 double tmpX = xDiff.back();
357 double tmpDeltaX = deltaXDiff.back();
358 double xLeft = tmpX + tmpDeltaX;
359 double xRight = x1[i] + deltaX1[i];
360 xDiff.push_back(xLeft+0.5*(xRight - xLeft));
361 yDiff.push_back(y2[j] - y1[i]);
362 deltaXDiff.push_back(0.5*(xRight - xLeft));
368 else if (x1[i] + deltaX1[i] < x2[j] + deltaX2[j]) {
369 if ( xDiff.empty()) {
370 xDiff.push_back(x1[i]);
371 yDiff.push_back(y2[j] - y1[i]);
372 deltaXDiff.push_back(deltaX1[i]);
376 double tmpX = xDiff.back();
377 double tmpDeltaX = deltaXDiff.back();
378 double xLeft = tmpX + tmpDeltaX;
379 double xRight = x1[i] + deltaX1[i];
380 xDiff.push_back(xLeft+0.5*(xRight - xLeft));
381 yDiff.push_back(y2[j] - y1[i]);
382 deltaXDiff.push_back(0.5*(xRight - xLeft));
387 if ( xDiff.empty() ) {
388 xDiff.push_back(x2[j]);
389 yDiff.push_back(y2[j] - y1[i]);
390 deltaXDiff.push_back(deltaX2[j]);
394 double tmpX = xDiff.back();
395 double tmpDeltaX = deltaXDiff.back();
396 double xLeft = tmpX + tmpDeltaX;
397 double xRight = x2[j] + deltaX2[j];
398 xDiff.push_back(xLeft+0.5*(xRight - xLeft));
399 yDiff.push_back(y2[j] - y1[i]);
400 deltaXDiff.push_back(0.5*(xRight - xLeft));
409 newNtuple->
addColumn (
"Residuals", yDiff );
410 newNtuple->
addColumn (
"DeltaX", deltaXDiff );
422 ntuple -> setTitle ( plotter -> getTitle () );
426 vector < string > bindings ( 3 );
428 bindings[0] = ntuple -> getLabelAt ( 0 );
429 bindings[1] = ntuple -> getLabelAt ( 1 );
430 bindings[2] = ntuple -> getLabelAt ( 2 );
438 controller->
setLog( new_plotter,
"x",
439 controller ->
getLog( plotter,
"x" ) );
450 plotter = factory -> create (
"XyPlotter" );
451 if ( rep -> hasAxis (
Axes::Z ) ) {
452 plotter -> setEnableZ (
true );
466 const std::string &
type,
468 const std::vector < std::string > & bindings )
const 471 if ( ! yes )
return 0;
491 const std::string &
type,
493 const std::vector < std::string > & bindings )
const 496 if ( ! yes )
return 0;
540 if ( plotter -> getNumDataReps () > 0 ) {
557 const std::string & datarep )
const 564 if ( proto -> hasAxis (
Axes::Z ) ) {
575 #ifdef ITERATOR_MEMBER_DEFECT 578 vector < const ViewBase * > ::const_iterator iter = views.begin();
580 while ( iter != views.end() ) {
585 const ViewBase * curview = ( * iter++ );
604 const std::vector < const ViewBase * > & src )
606 std::vector < const ViewBase * > ::const_iterator first = src.begin();
607 while ( first != src.end() ) {
610 vector < const ViewBase * > :: iterator i
611 = find ( dest.begin(), dest.end (), view );
612 if ( i != dest.end() )
continue;
616 if ( text_plotter == 0 )
continue;
619 bool add_to_list =
false;
620 for ( i = dest.begin (); i != dest.end(); ++i ) {
623 if ( plotter == 0 )
continue;
625 for (
int j = 0; j < num; j++ ) {
627 if ( rep == datarep ) {
632 if ( add_to_list )
break;
634 if ( add_to_list ) dest.push_back ( view );
641 const std::string & axis )
660 const std::string & name,
661 const std::string & text)
666 assert ( view != 0 );
674 const vector < string > &
680 return text_factory->
names ();
684 const std::string & text)
688 assert ( textrep != 0 );
698 const std::string & name,
699 const std::string & text)
711 const std::string & name,
712 const std::string & text)
737 rep = plotter -> getDataRep ( index );
747 plotter -> setActivePlot ( index,
true );
750 const vector < string > &
763 const vector < string > &
773 const vector < string > &
778 DataRep * rep = factory -> prototype ( type );
784 const vector < string > &
788 assert ( index < plotter->getNumDataReps () );
804 assert ( index < plotter->getNumDataReps () );
815 assert ( index < plotter->getNumDataReps () );
824 assert ( index < plotter->getNumDataReps () );
832 const std::string & axis,
int index )
const 845 assert ( index < plotter -> getNumDataReps () );
855 const std::string & axis,
int index )
const 859 return getRMS ( plotter, a, index );
868 assert ( index < plotter -> getNumDataReps () );
872 return projector ->
getRMS ( axis );
880 return datarep->
name ();
888 if ( datarep == 0 )
return 0;
900 if ( projbase != 0 ) {
910 for (
int i = 0; i < number; i++ ) {
913 if ( frep != 0 )
continue;
914 if ( projbase == 0 ) {
928 const NTuple * ntuple )
const 931 if ( projector == 0 )
return;
946 int numDataReps = plotter -> getNumDataReps ();
947 if ( index >= 0 || numDataReps < 2 ) {
952 for (
int i = 1; i< numDataReps; i++ ) {
954 if ( source != nt ) {
973 if ( projector != 0 ) {
974 source = projector -> getNTuple ();
1010 for (
int i = 0; i < number; i++ ) {
1025 for (
int i = 0; i < number; i++ ) {
1027 if ( source != 0 ) {
1028 yes = controller -> isFromFile ( source );
1030 if ( yes ==
false )
break;
1039 assert ( ! ( index < 0 ) );
1052 return source -> getName ();
1055 const vector < string > &
1074 int active = plotter -> activePlotIndex ();
1078 int number = plotter -> getNumDataReps ();
1079 for (
int i = 0; i < number; i++ ) {
1080 DataRep * trep = plotter -> getDataRep ( i );
1104 const std::string & axis,
1105 const std::string & label )
1107 DataRep * rep = plotter -> getTarget ();
1112 if ( axis[0] ==
'Y' ) a =
Axes::Y;
1113 plotter -> setAutoRanging ( a,
true );
1114 plotter -> autoScale ();
1120 const std::vector< std::string > & labels )
const 1123 if ( projector == 0 )
return;
1135 const DataRep * rep = plotter -> getTarget ();
1151 if ( projector != 0 ) {
1161 const std::string & axis)
const 1164 return getLog ( plotter, at );
1177 if ( xy_transform == 0 )
return false;
1191 assert ( transform );
1193 const string & name = transform->
name ();
1195 return name ==
"Log";
1207 if ( projector == 0 )
return;
1212 const Range & range = plotter -> getRange ( axis,
false );
1218 if ( model->
isLog() ) {
1219 binner = binner_factory -> create (
"BinnerLog" );
1221 binner = binner_factory -> create (
"BinnerLinear" );
1237 for (
int i = 0; i < number; i++ ) {
1248 const std::string &
type )
1255 if ( type ==
"Linear" ) {
1257 if ( !( model->
isLog() ) )
return;
1261 else if ( type ==
"Log" ) {
1263 if ( model->
isLog () )
return;
1264 const Range & range = plotter -> getRange ( axis,
false );
1265 if ( range.
high() < 0. ) {
1266 string what (
"Can not change axis to log scale since current " 1267 "range is negative" );
1268 throw std::runtime_error ( what );
1279 swap ( temp, model );
1293 const std::string & axis,
1297 setLog ( plotter, at, flag );
1313 if ( xy_transform != 0 ) {
1314 setLog ( plotter, axis, flag, xy_transform );
1321 if ( flag ) type =
"Log";
1322 else type =
"Linear";
1327 TransformBase * transform = factory -> createTransform ( type );
1329 b_transform -> setZTransform ( transform );
1342 string x_trans = transform->
name ();
1344 string y_trans = transform->
name ();
1346 string z_trans = transform->
name ();
1381 string t_name = x_trans;
1394 const std::string & name )
1409 const std::string & x,
1410 const std::string & y )
1413 const string name = x +
" " + y;
1430 return rep->
size ();
1437 RepBase * rep = plotter -> representation ();
1449 RepBase * rep = plotter -> representation ();
1452 if ( colrep != 0 ) {
1467 RepBase * rep = plotter -> representation ();
1469 return rep -> getStyle ();
1485 DataRep * datarep = plotter -> getDataRep ( index );
1488 RepBase * rep = factory -> create ( point_rep );
1497 const Range & range )
1507 const std::string & axis,
1521 const list < Observer * > & obs_list = datarep -> getObservers ();
1522 list < Observer * >::const_iterator first = obs_list.begin();
1523 while ( first != obs_list.end () ) {
1526 if ( plotter != 0 ) {
1527 plotter -> autoScale ();
1529 plotter -> setAutoRanging ( axis,
false );
1552 const std::string & axis,
1556 bool widths_are_same =
false;
1559 if ( axis ==
"Y" ) at =
Axes::Y;
1560 if ( axis ==
"Z" ) at =
Axes::Z;
1567 for (
int i = 0; i < number; i++ ) {
1569 projector->
setOffset ( axis, parm, dragging );
1572 widths_are_same =
true;
1576 projector->
setOffset ( axis, parm, dragging );
1587 bool widths_are_same =
false;
1593 for (
int i = 0; i < number; i++ ) {
1598 widths_are_same =
true;
1615 DataRep * rep = plotter -> getDataRep ( index );
1616 rep -> setErrorDisplay ( axis, state );
1624 int index = plotter -> activePlotIndex ();
1634 const std::string & x,
1635 const std::string & y)
1646 const std::string &
type )
1653 if ( type ==
"Linear" ) {
1655 if ( !( model->
isLog() ) )
return;
1659 else if ( type ==
"Log" ) {
1661 if ( model->
isLog () )
return;
1662 const Range & range = plotter -> getRange ( axis,
false );
1663 if ( range.
high () < 0. ) {
1664 string what (
"Can not change axis to Log scale since current " 1665 "range is negative." );
1666 throw std::runtime_error ( what );
1676 swap ( temp, model );
virtual unsigned int rows() const
Returns the number of rows.
void setAxisModel(PlotterBase *plotter, Axes::Type axis, const std::string &type)
Sets the axis model to type.
int getOverflow(const PlotterBase *plotter, int index=0) const
Returns the number of overflow.
bool hasSymbolRep(const PlotterBase *plotter) const
Returns true if active DataRep uses SymbolPointRep, otherwise returns false.
const std::vector< std::string > & getDataSourceLabels(const PlotterBase *plotter, int index)
Returns the labels of the DataSource columns for the DataRep contained in the plotter at index index...
virtual ProjectorBase * activeProjector() const
Returns the active projector.
void setAxisBinding(PlotterBase *, const std::string &axis, const std::string &label)
Sets the axis binding, if any, otherwise does nothing.
TransformBase * createTransform(const std::string &name)
Creates a returns a new TransformBase object with given name.
static DisplayController * instance()
Returns the pointer to the singleton instance.
static TransformFactory * instance()
Returns a pointer to the singleton instance.
bool isUserDefinedValueTransform(const PlotterBase *plotter) const
Returns true if value to color transform is user defined.
const std::string & getType(const PlotterBase *plotter, int index) const
Returns the type of DataRep contained in the plotter at index index.
static DataSourceController * instance()
Returns the pointer to the singleton instance.
hippodraw::DataRep * getUniqueWithNTupleBindings(const PlotterBase *plotter)
Returns the unique DataRep.
The base class for the BinnerAxis hierarchy.
bool hasLineRep(const PlotterBase *plotter) const
Returns true if active DataRep uses LinePointRep, otherwise returns false.
void addValueTransform(const std::string &name, const std::vector< double > &ctrl_points)
Creates and adds to the factory a new value transform.
virtual void setBinnerOn(BinnerAxis *binner, hippodraw::Axes::Type axis)
Sets the bin edge calculator to binner on axis axis.
void setTransform(PlotterBase *plotter, const std::string &name)
Creates and sets a new transform for the display.
Given a range, calculates a model for an axis with a log scale.
DataSource * getDataSource(const PlotterBase *plotter)
Returns the Datasource for the plotter's selected DataRep or the DataSource used by all the DataRep o...
hippodraw::NTupleProjector class interface
hippodraw::DataRep * createTextDataRep(const std::string &type, const std::string &text=std::string())
Creates an object of a class derived from DataRep which is textual data representation of type type...
PlotterBase * getPlotter() const
Returns the plotter used by this view.
The singleton Factory class for creating objects whose class is derived from TransformBase.
virtual int addColumn(const std::string &, const std::vector< double > &column)
Adds a column to the end of the ntuple and returns the index to the added column. ...
void setValueTransform(PlotterBase *plotter, const std::string &name)
Sets the value to color transform model.
void removeTextObservers(const std::vector< const ViewBase * > &views)
Removes TextRep Observer objects, if any, from its target.
void setIntervalCount(const PlotterBase *plotter, unsigned int count)
Sets the interval count on the the NTuple of the active DataRep of the plotter.
LineDataRep * addLineRep(PlotterBase *, const std::string &axis, double value)
Adds a LineDataRep to the Plotter object.
virtual void checkAxisScaling()
Check if Axis needs to be scaled or not.
void setBinner(const PlotterBase *plotter, DataRep *rep, Axes::Type axis) const
Sets the binner on the DataRep.
hippodraw::LinePointRep class interface
virtual ViewBase * createView(PlotterBase *plotter) const =0
Creates a view for the plotter.
const std::vector< std::string > & getTextTypes() const
Returns the types of text displays.
virtual void setAutoRanging(const std::string &axis, bool flag)
Sets the auto-ranging.
bool isAxisBinned(PlotterBase *display, const std::string &axis)
Tests if specified axis is binned.
virtual void addDataRep(hippodraw::DataRep *rep)
Adds a DataRep object to the plotter.
bool isDataValid(const PlotterBase *) const
Returns true only if all the data in a bound DataSource are valid.
static PointRepFactory * instance()
Returns a pointer to the singleton instance.
const std::vector< std::string > & names() const
Returns the list of available prototype names.
virtual void setNTuple(const DataSource *source)
Changes the DataSource used for the projections to source.
hippodraw::XyPlotter class interface
void setLog(PlotterBase *plotter, const std::string &axis, bool flag)
Sets a log scale on or off for the specified axis for the plotter.
hippodraw::BinToColorScaleMovingBrkPt class interface
const std::vector< std::string > & bindingOptions(const std::string &name)
Returns the binding options, if any, for the named DataRep.
PlotterBase * createPlotter(const hippodraw::DataRep *rep) const
Returns a newly created PlotterBase object.
virtual void expandIfNeeded(const std::vector< std::string > &labels) const
Expand the multidimension column if needed.
void setNTuple(PlotterBase *, const NTuple *) const
Sets the ntuple on the selected DataRep, if it has ntuple bindings, otherwise does nothing...
void setRangePos(double)
The function which changes the pos member of m_range.
void setRepSize(PlotterBase *plotter, float size)
Sets the size of the representation.
An exception class that is thrown when attempting an illegal operation on a PlotterBase object...
hippodraw::XYTransform class interface
A Factory singleton class for creating objects whose class derives from BinnerAxis.
void setErrorDisplayed(const PlotterBase *, Axes::Type axis, bool state) const
Set the error display.
int getNumberOfEntries(const PlotterBase *plotter, int index=0) const
Returns the number of entries.
void setAxisModelWithoutSetBin(PlotterBase *plotter, Axes::Type axis, const std::string &type)
set the axis to log or linear, without reseting the bin width.
~DisplayController()
The destructor.
A transform that transforms coordinates from one 2D coordinate system to another. ...
hippodraw::DataRep * activeDataRep(const PlotterBase *plotter) const
Returns the active DataRep object for the DataRep objects contained in the plotter.
TextPlotter class interface.
virtual void setAxisModel(AxisModelBase *, Axes::Type)=0
Sets the AxisModel on the specified axis.
static DataRepFactory * instance()
Returns the pointer to the singleton instance.
static BinToColorFactory * instance()
Returns a pointer to the singleton instance.
double high() const
Returns the maximum of the range object.
AxisModelLog class interface.
virtual int getNumDataReps() const
Returns the number of DataRep objects contained in the plot.
virtual double getPosRange(Axes::Type axis) const
Returns the smallest positive number from the data.
void createNTuple(const PlotterBase *plotter)
Creates a NTuple from the plotter.
hippodraw::DataRep * addDataRepStacked(PlotterBase *plotter, const std::string &name, const DataSource *source, const std::vector< std::string > &bindings) const
Creates a new DataRep object with class name name and adds it to the existing plotter by stacking it...
A singleton class that is the interface between GUI and the displays.
virtual void notifyObservers() const
Notifies Observer objects of a change.
const std::vector< std::string > & getDisplayTypes() const
Returns the types of displays available.
int getUnderflow(const PlotterBase *plotter, int index=0) const
Returns the number of underflow.
void setIntervalEnabled(const PlotterBase *plotter, bool yes)
Sets the interval counting to yes on the NTuple of the active DataRep of the plotter.
virtual const DataSource * getNTuple() const
Returns the DataSource used by the projector.
void setText(const std::string &text)
Sets the text.
hippodraw::NTupleController class interface
const std::vector< double > & getValueCtrlPts(const PlotterBase *plotter)
Returns the control points of the value to color transform model.
hippodraw::ColumnPointRep class interface
virtual void addDataRep(DataRep *rep)
Adds a DataRep object to the plotter.
A Plotter class that draws text.
virtual int activePlotIndex() const
Returns the index of the active plotter.
virtual bool isLog() const =0
Returns a boolean describing the type of the scale of the axis.
void remove(PlotterBase *)
Deletes a PlotterBase object.
DataSourceController class interface.
hippodraw::FunctionRep class interface
hippodraw::ViewBase class interface
ProjectorBase * getProjector(const PlotterBase *display) const
Returns the currently selected projector in the plot.
PlotterBase * createTextPlotter(hippodraw::DataRep *datarep, const std::string &name, const std::string &text=std::string())
Creates a plotter object for the DataRep with text representation of type name.
const std::vector< std::string > & axisBindings(const PlotterBase *plotter) const
Returns the axis bindings, if any, otherwise returns an empty vector.
static DisplayController * s_instance
The pointer to the singleton object.
TransformBase * yTransform() const
Returns the transform function on the Y axis.
PlotterBase * createDifferenceDisplay(PlotterBase *plotter)
Returns difference display.
int getValueTransformIndex(PlotterBase *plotter)
Returns the index to list of value to color transform names of the plotter.
The base class for data representations.
const std::string & name() const
Returns the name of the Transform.
hippodraw::NTuple class interface.
Base class for DataSource.
void saveValueCtrlPts(PlotterBase *plotter, const std::vector< double > &sv)
Save the updated control points of a BinToColor transform.
static BinnerAxisFactory * instance()
Returns a pointer to the singleton instance.
const std::string & name() const
Returns the name of the value to color transform.
NTupleProjector * getBindingProjector(const PlotterBase *) const
Returns projector that supports binding, if display has one, otherwise returns null pointer...
A factory for textual representations.
virtual const Range & setRange(const Range &, bool hold_width=true)=0
Sets the range.
NTuple * createNTupleDiff(PlotterBase *plotter)
DataRep * createDataRep(const std::string &name)
Creates a new DataRep object of class name.
intp size(numeric::array arr)
PlotterException class interface.
bool areDataSourcesSaved(const PlotterBase *)
Returns true if all the NTuple Objects used by the plotter are save to or read from a file...
The base class for the point representation hierarchy.
int activeDataRepIndex(const PlotterBase *plotter) const
Returns the active DataRep index for the DataRep objects contained in the plotter.
const std::vector< std::string > & getValueTransformTypes() const
Returns the types of value to color transforms available.
void setActiveDataRepIndex(PlotterBase *plotter, int index)
Sets the active DataRep index.
hippodraw::FunctionController class interface
virtual void setParentPlotter(PlotterBase *plotter)
Sets the parent plotter.
unsigned int getRepStyle(const PlotterBase *plotter) const
Returns the style of the point representation.
Type * create(const std::string &name)
Creates a new object from a prototype named name.
void removeObserver(Observer *)
Removes an Observer from the Observer list.
bool hasNTupleBindings(const PlotterBase *plotter, int index)
Returns true if the DataRep contained by the plotter at index index has NTuple bindings.
BinToColorFactory class interface.
virtual bool hasZeroRows()
Returns true if this DataRep has zero rows in its DataSource.
const std::string & name() const
Returns the name of the display.
Type convert(const std::string &axis)
Converts from string representation ot Axes::Type representation.
static FunctionController * instance()
Returns the pointer to the singleton instance.
This Singleton class maintains a list of DataRep objects.
void setTransformAxis(PlotterBase *plotter, const std::string &x, const std::string &y)
Set both X and Y axis to log or linear, without resetting the bin width.
hippodraw::AxisModelLinear class interface
The base class for the PlotterBase hierarchy.
The abstract base class for a factory that creates objects closely related to the graphics subsystem ...
A DataSource class implemented with std::vector<double> to store the column data. ...
void stackDataRep(PlotterBase *, hippodraw::DataRep *) const
Adds the DataRep to the PlotterBase object by stacking it.
PointRepFactory class interface.
static DataRepController * instance()
Returns the pointer to the singleton instance.
PyArray_TYPES type(numeric::array arr)
DisplayController class interface declaration.
float size() const
Returns the size of the representation.
virtual void setRange(Axes::Type axis, const Range &range, bool scaled=false, bool adjust_width=true)
Sets the range on the specified axis.
static FitsController * instance()
Returns the singleton instance of the FitsController.
double getAverage(const PlotterBase *plotter, const std::string &axis, int index=0) const
Returns the average value.
virtual DataRep * selectedDataRep() const
Returns the selected DataRep.
A derived class of DataRep which displays a value as a line along the X or Y axis.
hippodraw::TextRepFactory class interface
virtual bool isAxisBinned(const std::string &axis) const
Returns true if specified axis is binned.
Expresses a range of values.
static PlotterFactory * instance()
Returns the pointer to the singleton instance.
A singleton class that is the interface between GUI and the DataRep.
virtual void setTransform(TransformBase *)
Sets the transform object.
virtual void setAxisBindings(const std::vector< std::string > &labels)
Sets the axis bindings, Sets, in the order of the binding options, the binding to the DataSource by l...
virtual void setOffset(const std::string &axis, int parm, bool dragging)
Sets the bin offset.
void addObserver(Observer *)
Adds an Observer to the Observer list.
The base class for the Projector hierarchy.
A factory for creation of objects whose class is derived from BinToColor.
Given a range, calculates a model for an axis with a linear scale.
The class derived from the BinToColor class.
A transform that transforms the X and Y coordinates independently.
The BinningProjector is an abstract class provides most of the functionality for a projector that doe...
A Controller class for FITS files.
bool removeValueTransform(const std::string &name)
Removes the value to color transform model.
An NTupleProjector is a projector that projects data from an DataSource object.
An exception class that is thrown when the factory fails to find the request class by its name...
A transform that transforms coordinates from one coordinate system to another.
This Singleton class maintains a list of plotters.
const std::vector< std::string > & bindingOptions(const std::string &type)
Returns the axis binding options for a DataRep of type type.
DataRepController class interface.
virtual ProjectorBase * getProjector() const
Returns the Projector object controlling the data.
BinToUsrDefinedScale class interface.
The abstract base class for views.
ViewFactory class interface.
hippodraw::TextRepBase class interface
void setRepSize(double size)
Sets the size of the representation.
void addDataRep(PlotterBase *, hippodraw::DataRep *) const
Adds the DataRep to the PlotterBase object by including it.
static TextRepFactory * instance()
Returns a pointer to the singleton instance.
const hippodraw::DataRep * getParentDataRep() const
Returns the target DataRep of its own TextDataRep object.
virtual RepBase * representation() const =0
Returns the representation used by the plotter.
A singleton class is the interface between an application and the list of FunctionRep objects contain...
hippodraw::TextDataRep class interface
virtual const std::vector< std::string > & getLabels() const
Returns the list of available labels.
virtual ProjectorBase * getProjector(int i) const
Returns the projector at index i.
std::vector< std::string > m_null_vector
A empty vector of strings.
void setPointRep(PlotterBase *plotter, const std::string &point_rep)
Sets the type of RepBase object to be used by the selected DataRep.
void addTextViewToList(std::vector< const ViewBase * > &destination, const std::vector< const ViewBase * > &source)
Adds views from source to destination if they contain TextRep whose target is contained in destinatio...
void setIntervalEnabled(bool yes=true)
Sets interval counting to be enabled.
A factory for creation of objects whose class is derived from PointRepBase.
Displays data in textual representation.
A Plotter class that plots points in 2 dimensions and option a third dimension in color...
A PointRep class that draws a column to represent the value.
int getUniqueNonFunctionIndex(const PlotterBase *plotter) const
Returns the index to an unique DataRep object that is not a FunctionRep.
hippodraw::FitsController class interface.
bool isCompatible(const PlotterBase *plotter, const std::string &type) const
Returns true if adding a DataRep of type type to the PlotterBase @ plotter is compatible, otherwise returns false.
void setParentDataRep(hippodraw::DataRep *)
Sets the target DataRep of its own TextDataRep object.
BinToMovingBrkPt class interface.
bool getLog(const PlotterBase *plotter, const std::string &axis) const
Returns true if the designated axis is on a logarithmic scale.
An xception class that is thrown when attempting to bind a DataRep to a NTuple with a column name tha...
StripChart class interface.
void setRange(PlotterBase *plotter, Axes::Type axis, const Range &range)
Sets the Range on specified axis.
A singleton class that is the interface between GUI and the DataSource objects.
virtual TransformBase * getTransform() const
Returns the transform object used by the plotter.
void setBinWidth(PlotterBase *plotter, Axes::Type axis, double width)
Sets the bin width parameter.
virtual const std::vector< std::string > & getAxisBindings() const
Returns the current axis bindings.
TransformBase * zTransform() const
Returns the transform function on the Z axis.
hippodraw::BinnerAxis class interface
virtual const BinToColor * getValueRep() const
Returns the value to color representation.
TransformBase * xTransform() const
Returns the transform function on the X axis.
float pointSize(const PlotterBase *) const
Returns the size of the representation.
void setValueCtrlPts(PlotterBase *plotter, const std::vector< double > &sv)
Sets the control points for the value to color transform model.
double getRMS(const PlotterBase *plotter, const std::string &axis, int index=0) const
Returns the root mean square along the specified axis for DataRep indexed by index.
A PointRep class draws a symbol to represent the value.
virtual DataRep * getDataRep(int index) const
Returns the specified DataRep or null pointer if it doesn't exits.
void setAxisBindings(PlotterBase *plotter, const std::vector< std::string > &labels) const
Sets all the axis bindings, if any, otherwise does nothing.
void fixLogIfBinned(const PlotterBase *, hippodraw::DataRep *rep) const
Fixes the rep so it displays well on plotter.
virtual AxisModelBase * getAxisModel(Axes::Type axis) const
Returns the AxisModelBase derived class for the specified axis.
void setIntervalCount(int number)
Sets the interval count.
virtual bool hasAxis(Axes::Type axis) const
Returns true if the plotter has an axis of specified type.
DisplayController()
A default constructor for avoiding creation except by itself or with derived classes.
void setAllIntervalEnabled(const PlotterBase *plotter, bool yes)
Sets the interval counting to yes of all the NTuple used by the plotter.
const std::string & getDataSourceName(const PlotterBase *plotter, int index)
Returns the name of the DataSource for the DataRep contained in the plotter at index index...
virtual bool hasNTupleBindings() const
Returns true if the DataRep's projector can bind to DataSource.
LineDataRep class interface.
A derived class of DataRep which is a base class for displaying a function.
The base class for the value to the color transformation.
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
PlotterBase * createDisplay(const std::string &name)
Creates a display object.
The AxisModelBase class maintains the Range and scaling of an axis.
bool hasControlPoints(const PlotterBase *plotter) const
Returns true if value to color transform has control points.
void setOffset(PlotterBase *plotter, const std::string &axis, int parm, bool dragging)
Sets the offset from dragging slider.
A PointRep class that draws a column to represent the value.
hippodraw::SymbolPointRep class interface
hippodraw::BinningProjector class interface
Type * prototype(const std::string &name) const
Returns a pointer to a prototype with name name.
ViewBase * createTextView(const ViewFactory *factory, hippodraw::DataRep *rep, const std::string &name, const std::string &text=std::string())
Creates an object which is a derived class of ViewBase.