Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TupleCut Class Reference

#include <TupleCut.h>

Collaboration diagram for TupleCut:

Collaboration graph
[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.
Author:
Kaustuv <kaustuv@stanford.edu>

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

Definition at line 37 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::stringgetLabel () 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::TupleCut  ) 
 

The default constructor.

Definition at line 24 of file TupleCut.cxx.


Member Function Documentation

bool TupleCut::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 45 of file TupleCut.cxx.

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

unsigned int TupleCut::getColumn  )  const
 

Returns the column index used in the DataSource.

Definition at line 68 of file TupleCut.cxx.

References m_column.

Referenced by TupleCutXML::createElement().

bool TupleCut::getInversion  )  const
 

Returns the state of the inversion for the axis.

Definition at line 96 of file TupleCut.cxx.

References m_invert.

Referenced by TupleCutXML::createElement().

const std::string & TupleCut::getLabel  )  const
 

Returns the label for the cut.

Definition at line 108 of file TupleCut.cxx.

References m_label.

Referenced by Cut1DPlotter::getCutLabel().

const Range & TupleCut::getRange  )  const
 

Returns a reference to the range for each dimension.

Definition at line 82 of file TupleCut.cxx.

References m_range.

Referenced by TupleCutXML::createElement().

bool TupleCut::isEnabled  )  const
 

Returns the state of the cut's enable status.

Definition at line 40 of file TupleCut.cxx.

References m_enabled.

void TupleCut::setColumn unsigned int  col  ) 
 

Sets the column in the DataSource to be used.

Definition at line 61 of file TupleCut.cxx.

References m_column.

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

void TupleCut::setEnabled bool  yes = true  ) 
 

Sets the cut to be enabled, i.e.

active, or not.

Definition at line 33 of file TupleCut.cxx.

References m_enabled.

void TupleCut::setInversion bool  state  ) 
 

Sets the inversion state to state.

Definition at line 89 of file TupleCut.cxx.

References m_invert.

void TupleCut::setLabel const std::string label  ) 
 

Sets the label for the cut.

Definition at line 115 of file TupleCut.cxx.

References m_label.

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

void TupleCut::setRange const Range range  ) 
 

Sets the range of the cut.

Definition at line 75 of file TupleCut.cxx.

References m_range.

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

void TupleCut::toggleInverted  ) 
 

Toggles the sense of the inversion flag.

Definition at line 101 of file TupleCut.cxx.

References m_invert.


Member Data Documentation

unsigned int TupleCut::m_column [private]
 

The column index used by the cut.

Definition at line 53 of file TupleCut.h.

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

bool TupleCut::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 64 of file TupleCut.h.

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

bool TupleCut::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 58 of file TupleCut.h.

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

std::string TupleCut::m_label [private]
 

The label for the cut.

Definition at line 43 of file TupleCut.h.

Referenced by getLabel(), and setLabel().

Range TupleCut::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 49 of file TupleCut.h.

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


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3