20 #include "msdevstudio/MSconfig.h"
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 );
void setEnabled(bool yes=true)
Sets the state of the cut's enabled status.
void setColumn(unsigned int col)
Sets the column in the DataSource to be used.
An NTupleProjector is a projector that projects data from an DataSource object.
TargetList_t m_targets
A list of DataRep objects which have this cut applied.
The base class for the point representation hierarchy.
hippodraw::CompositePlotter class interface
hippodraw::CutPlotter class interface
void updateTargets()
Update the target DataRep when a change has been made in the TupleCut.
bool isTarget(DataRep *) const
Returns true if specified DataRep is a target of this cut.
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.
A Plotter class that plots points in 2 dimensions and option a third dimension in color...
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 notifyObservers() const
Notifies Observer objects of a change.
virtual int indexOf(const DataRep *) const
Returns the index of the selected DataRep object.
intp size(numeric::array arr)
virtual void setCutRangeAt(const Range &range, unsigned int index)
Sets the Range of the cut.
virtual ~CutPlotter()
The destructor.
void setNTuple(const DataSource *ntuple)
Sets the DataSource for the Cut and its DataRep object.
CutPlotter()
This default constructor.
void removeObserver(Observer *)
Removes an Observer from the Observer list.
hippodraw::NTupleProjector class interface
hippodraw::DataSource class interface.
hippodraw::ColorBoxPointRep class interface
virtual void willDelete(const Observable *observable)
Responds to willDelete message emitted from one of the Observers.
void setLabel(const std::string &label)
Sets the label for the cut.
A Color class for creating the color object following the standard RGB color space.
const Color & getCutColor() const
Get the color of the accepted region.
Base class for DataSource.
hippodraw::DataRep * m_datarep
A pointer to the data representation that holds the cuts.
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...
void clearCutTargets()
Removes all cut targets.
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
const std::vector< TupleCut > & getCuts() const
Returns the list of TupleCut objects used by this plotter.
CutRangeRep class interface.
virtual DataRep * selectedDataRep() const
Returns the selected DataRep.
A PlotterBase derived class that serves a base class for cut plotters.
virtual void setAxisBinding(const std::vector< std::string > &bindings)
Sets the axis binding of both the Cut and its DataRep.
virtual void setCutRange(double low, double high)
Sets the Range on the X axis.
virtual void autoScale()
Sets the Range on each axis that has the auto range flag set to include all the data.
const std::list< DataRep * > & getCutTargets() const
Get the list of targets.
void removeFromTarget(DataRep *rep)
Remove this cut from one of its target rep.
virtual void addTupleCut(DataRep *rep)
Add tuple cut to the plotter.
The base class for data representations.
hippodraw::DataRep class interface.
virtual void setNTuple(const DataSource *source)
Changes the DataSource used for the projections to source.
void addObserver(Observer *)
Adds an Observer to the Observer list.
hippodraw::TupleCut class interface
void addCutTarget(DataRep *rep)
Adds a DataRep to the list of targets.
virtual void setDirty(bool yes=true)
Sets the dirty flag.
void removeFromTargets()
Removes this cut from all of its targets.
virtual ProjectorBase * getProjector() const
Returns the Projector object controlling the data.
virtual void update()
Updates the plotter.
The class expresses a cut on a DataSource, i.e.
Expresses a range of values.
The base class for the Projector hierarchy.