TupleCut Class Reference

#include <TupleCut.h>

Collaboration diagram for TupleCut:

Collaboration graph
Range
[legend]
List of all members.

Detailed Description

The class expresses a cut on a DataSource, i.e.

to limit the rows that are to be used. Typically it would be used to filter the entries in to a DataRep, or to highlight regions that are displayed.

Note:
This class has no derived class and no virtual functions.
Requests:
@@@ Needs form of TupleCut, or some other class, allowing one to use only certain set of rows, independent of the contents.
Author:
Kaustuv <kaustuv@stanford.edu>

Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 43 of file TupleCut.h.

Public Member Functions

bool acceptRow (const DataSource *source, unsigned int i) const
 Returns true if the cut value at the index i is within the range.
unsigned int getColumn () const
 Returns the column index used in the DataSource.
bool getInversion () const
 Returns the state of the inversion for the axis.
const std::string & getLabel () const
 Returns the label for the cut.
const RangegetRange () const
 Returns a reference to the range for each dimension.
bool isEnabled () const
 Returns the state of the cut's enable status.
void setColumn (unsigned int col)
 Sets the column in the DataSource to be used.
void setEnabled (bool yes=true)
 Sets the cut to be enabled, i.e.
void setInversion (bool state)
 Sets the inversion state to state.
void setLabel (const std::string &label)
 Sets the label for the cut.
void setRange (const Range &range)
 Sets the range of the cut.
void toggleInverted ()
 Toggles the sense of the inversion flag.
 TupleCut ()
 The default constructor.

Private Attributes

unsigned int m_column
 The column index used by the cut.
bool m_enabled
 The enable flag.
bool m_invert
 The inversion flag.
std::string m_label
 The label for the cut.
Range m_range
 The Range object used by the cut.


Constructor & Destructor Documentation

TupleCut (  ) 

The default constructor.

Definition at line 26 of file TupleCut.cxx.


Member Function Documentation

bool acceptRow ( const DataSource source,
unsigned int  i 
) const

Returns true if the cut value at the index i is within the range.

Calls the DataSource::valueAt member obtain the cut value.

Definition at line 47 of file TupleCut.cxx.

References Range::includes(), TupleCut::m_column, TupleCut::m_enabled, TupleCut::m_invert, and TupleCut::m_range.

unsigned int getColumn (  )  const

Returns the column index used in the DataSource.

Definition at line 70 of file TupleCut.cxx.

References TupleCut::m_column.

Referenced by TupleCutXML::createElement().

bool getInversion (  )  const

Returns the state of the inversion for the axis.

Definition at line 98 of file TupleCut.cxx.

References TupleCut::m_invert.

Referenced by TupleCutXML::createElement().

const std::string & getLabel (  )  const

Returns the label for the cut.

Definition at line 110 of file TupleCut.cxx.

References TupleCut::m_label.

Referenced by Cut1DPlotter::getCutLabel().

const Range & getRange (  )  const

Returns a reference to the range for each dimension.

Definition at line 84 of file TupleCut.cxx.

References TupleCut::m_range.

Referenced by TupleCutXML::createElement().

bool isEnabled (  )  const

Returns the state of the cut's enable status.

Definition at line 42 of file TupleCut.cxx.

References TupleCut::m_enabled.

void setColumn ( unsigned int  col  ) 

Sets the column in the DataSource to be used.

Definition at line 63 of file TupleCut.cxx.

References TupleCut::m_column.

Referenced by DataRep::addCut(), TupleCutXML::setAxisAttributes(), and CutPlotter::setAxisBinding().

void setEnabled ( bool  yes = true  ) 

Sets the cut to be enabled, i.e.

active, or not.

Definition at line 35 of file TupleCut.cxx.

References TupleCut::m_enabled.

void setInversion ( bool  state  ) 

Sets the inversion state to state.

Definition at line 91 of file TupleCut.cxx.

References TupleCut::m_invert.

void setLabel ( const std::string &  label  ) 

Sets the label for the cut.

Definition at line 117 of file TupleCut.cxx.

References TupleCut::m_label.

Referenced by DataRep::addCut(), CutPlotter::setAxisBinding(), and FunctionRep::setCutRange().

void setRange ( const Range range  ) 

Sets the range of the cut.

Definition at line 77 of file TupleCut.cxx.

References TupleCut::m_range.

Referenced by DataRep::addCut(), TupleCutXML::setAxisAttributes(), and FunctionRep::setCutRange().

void toggleInverted (  ) 

Toggles the sense of the inversion flag.

Definition at line 103 of file TupleCut.cxx.

References TupleCut::m_invert.


Member Data Documentation

unsigned int m_column [private]

The column index used by the cut.

Definition at line 59 of file TupleCut.h.

Referenced by TupleCut::acceptRow(), TupleCut::getColumn(), and TupleCut::setColumn().

bool m_enabled [private]

The enable flag.

When set true, the cut is active, otherwise it is inactive. This allows cut to be toggled to inactive state without losing the cut information.

Definition at line 70 of file TupleCut.h.

Referenced by TupleCut::acceptRow(), TupleCut::isEnabled(), and TupleCut::setEnabled().

bool m_invert [private]

The inversion flag.

If true then a quantity must be outside the range defined by entries of the vector m_range.

Definition at line 64 of file TupleCut.h.

Referenced by TupleCut::acceptRow(), TupleCut::getInversion(), TupleCut::setInversion(), and TupleCut::toggleInverted().

std::string m_label [private]

The label for the cut.

Definition at line 49 of file TupleCut.h.

Referenced by TupleCut::getLabel(), and TupleCut::setLabel().

Range m_range [private]

The Range object used by the cut.

If the cut is not inverted, then the accepted data is greater than or equal to the lower end of the range and less than the upper end of the range.

Definition at line 55 of file TupleCut.h.

Referenced by TupleCut::acceptRow(), TupleCut::getRange(), and TupleCut::setRange().


The documentation for this class was generated from the following files:
Generated for HippoDraw Class Library by doxygen