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