20 #include "msdevstudio/MSconfig.h"
48 using namespace hippodraw;
83 vector < TupleCut > & cut_list
84 = const_cast < vector < TupleCut > & > ( cuts );
86 unsigned int size = bindings.size ();
87 for (
unsigned int i = 0; i <
size; i++ ) {
88 const string & label = bindings[i];
89 unsigned int index = projector ->
indexOf ( label );
111 const Range range ( low, high );
127 for (
unsigned int i = 0; i < cuts.size(); i++ ) {
128 projector -> removeCut( & cuts[i] );
132 TargetList_t::iterator first
144 TargetList_t::const_iterator first =
m_targets.begin();
160 TargetList_t::iterator first
170 #ifdef BIND2ND_DEFECT
171 TargetList_t::iterator first =
m_targets.begin();
178 #ifdef MEMFUN1_DEFECT
189 const vector < TupleCut > &
199 unsigned int size = new_cuts.size ();
203 vector < TupleCut > & cut_list
204 = const_cast < vector < TupleCut > & > ( cuts );
205 cut_list.resize ( size,
TupleCut () );
206 for (
unsigned int i = 0; i < cut_list.size (); i++ ) {
207 cut_list[i] = *new_cuts[i];
245 rep -> setColor ( color );
256 return rep -> getColor ();
277 for (
unsigned int i = 0; i < cuts.size(); i++ ) {
278 no |= cuts[i].isEnabled ();
291 TargetList_t::const_iterator first
304 rep -> setSelected ( yes );
hippodraw::DataRep * m_datarep
A pointer to the data representation that holds the cuts.
void setNTuple(const DataSource *ntuple)
Sets the DataSource for the Cut and its DataRep object.
CutPlotter()
This default constructor.
The base class for the Projector hierarchy.
virtual void setCutRange(double low, double high)
Sets the Range on the X axis.
hippodraw::TupleCut class interface
virtual void setNTuple(const DataSource *source)
Changes the DataSource used for the projections to source.
An NTupleProjector is a projector that projects data from an DataSource object.
const std::list< DataRep * > & getCutTargets() const
Get the list of targets.
virtual void update()
Updates the plotter.
virtual ProjectorBase * getProjector() const
Returns the Projector object controlling the data.
hippodraw::NTupleProjector class interface
void removeFromTarget(DataRep *rep)
Remove this cut from one of its target rep.
Expresses a range of values.
void clearCutTargets()
Removes all cut targets.
const std::vector< TupleCut > & getCuts() const
Returns the list of TupleCut objects used by this plotter.
Base class for DataSource.
virtual int indexOf(const DataRep *) const
Returns the index of the selected DataRep object.
hippodraw::ColorBoxPointRep class interface
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
void addCutTarget(DataRep *rep)
Adds a DataRep to the list of targets.
virtual void notifyObservers() const
Notifies Observer objects of a change.
A Plotter class that plots points in 2 dimensions and option a third dimension in color...
virtual void setAxisBinding(const std::vector< std::string > &bindings)
Sets the axis binding of both the Cut and its DataRep.
void removeFromTargets()
Removes this cut from all of its targets.
The base class for the point representation hierarchy.
hippodraw::CutPlotter class interface
virtual void addTupleCut(DataRep *rep)
Add tuple cut to the plotter.
virtual void setDirty(bool yes=true)
Sets the dirty flag.
void setEnabled(bool yes=true)
Sets the state of the cut's enabled status.
TargetList_t m_targets
A list of DataRep objects which have this cut applied.
void setLabel(const std::string &label)
Sets the label for the cut.
virtual DataRep * selectedDataRep() const
Returns the selected DataRep.
The class expresses a cut on a DataSource, i.e.
hippodraw::DataRep class interface.
intp size(numeric::array arr)
void setActive(bool yes)
Sets the cut as active.
void setCutColor(const Color &)
Sets the color of the cut acceptance region.
virtual bool hasNTupleBindings() const
Returns true as a CutPlotter always has DataSource bindings.
The base class for data representations.
void setColumn(unsigned int col)
Sets the column in the DataSource to be used.
virtual void autoScale()
Sets the Range on each axis that has the auto range flag set to include all the data.
A Color class for creating the color object following the standard RGB color space.
CutRangeRep class interface.
void updateTargets()
Update the target DataRep when a change has been made in the TupleCut.
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...
bool isTarget(DataRep *) const
Returns true if specified DataRep is a target of this cut.
hippodraw::DataSource class interface.
void addObserver(Observer *)
Adds an Observer to the Observer list.
virtual void setCutRangeAt(const Range &range, unsigned int index)
Sets the Range of the cut.
virtual ~CutPlotter()
The destructor.
A PlotterBase derived class that serves a base class for cut plotters.
void setCuts(const std::vector< const TupleCut * > &cuts)
Sets the TupleCut objects to be used by this plotter.
virtual bool isImageConvertable() const
Returns false.
virtual void willDelete(const Observable *observable)
Responds to willDelete message emitted from one of the Observers.
void removeObserver(Observer *)
Removes an Observer from the Observer list.
hippodraw::CompositePlotter class interface
const Color & getCutColor() const
Get the color of the accepted region.