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