NSCL DDAS
1.0
Support for XIA DDAS at the NSCL
|
A simple fast filter (lead sum - trail sum) More...
#include <TrapFilter.hpp>
Public Member Functions | |
TrapFilter (const TrIterator< T > &begin, int rise_range, int gap_range) | |
Constructs a symmetric trap filter. More... | |
TrapFilter (const TrRange< T > &trail_range, const TrRange< T > &lead_range) | |
Constructs an arbitrary trap filter. More... | |
TrapFilter & | operator= (const TrapFilter &that) |
Assignment operator. More... | |
virtual | ~TrapFilter () |
Virtual destructor. More... | |
virtual TrapFilter & | operator++ () |
++filter style increment More... | |
TrapFilter | operator++ (int) |
filter++ style increment More... | |
virtual bool | operator< (const TrIterator< T > &it) const |
Less than comparison to TrIterator. More... | |
bool | operator> (const TrIterator< T > &it) const |
Greater than comparison to TrIterator. More... | |
virtual TrIterator< T > | max_extent () const |
Gets the most advanced iterator position of the summing regions. More... | |
virtual TrIterator< T > | min_extent () const |
Gets the minimum iterator position of the summing regions. More... | |
virtual double | operator* () const |
Dereference operator <==> evaluates to current filter value. More... | |
![]() | |
AlgoIterator () | |
Default constructor. | |
AlgoIterator (const AlgoIterator &) | |
Copy constructor. | |
AlgoIterator & | operator= (const AlgoIterator &) |
Assignment operator. | |
A simple fast filter (lead sum - trail sum)
A simple trapezoidal filter is implemented that evaluates the difference between a leading sum and a trailing sum. It is naturally composed of two SumIterator objects. The filter implements the AlgoIterator interface and functionally is like an input iterator. When this is dereferenced, the difference between the current values of the two summing regions is returned. When it is incremented, the two summing regions are also incremented.
|
inline |
Constructs a symmetric trap filter.
Given a starting position, the symmetric filter is built from the rise_range and gap_range provided. These make use of the offset definitions of a TrRange. The trailing sum is defined as a region [begin, begin+rise_range) and the leading sum is defined as [begin+rise_range+gap_range, begin+ 2*rise_range+gap_range).
begin | the iterator defining the starting position of the trailing sum |
rise_range | the range of the summing region and the length of the filter rise |
gap_range | the distance between the max_extent of the trailing sum and min_extent of leading sum |
|
inline |
Constructs an arbitrary trap filter.
Construct an arbitrary fast trapezoidal filter by providing the summing ranges
trail_range | the initial trailing sum range |
lead_range | the initial leading sum range |
|
inlinevirtual |
Virtual destructor.
Does nothing b/c no memory has been allocated dynamically
|
inlinevirtual |
Gets the most advanced iterator position of the summing regions.
Returns the most advanced iterator between the two summing regions. This most likely points to the first value outside of the leading sum's range. However, no assumption is made about which summing region comes before the other because no logic is in place to ensure proper ordering.
Reimplemented from TrAnal::AlgoIterator< T >.
|
inlinevirtual |
Gets the minimum iterator position of the summing regions.
Returns the minimum iterator position between the two summing regions. This most likely points to the first valid value of the trailing sum's range. However, no assumption is made about which summing region comes before the other because no logic is in place to ensure proper ordering.
Reimplemented from TrAnal::AlgoIterator< T >.
|
inlinevirtual |
Dereference operator <==> evaluates to current filter value.
Reimplemented from TrAnal::AlgoIterator< T >.
|
inlinevirtual |
++filter style increment
Increments the two summing regions together as ++sum
Reimplemented from TrAnal::AlgoIterator< T >.
|
inline |
filter++ style increment
Increments the two summing regions together as sum++
|
inlinevirtual |
Less than comparison to TrIterator.
Comparison against a simple iterator (useful for checking whether next dereference will be a valid and safe). Literally compares whether the iterator returned by max_extent() is less than the argument. In normal situations, this is analogous to checking whether the max_extent() of the leading sum comes before the argument.
it | the iterator to compare to |
Reimplemented from TrAnal::AlgoIterator< T >.
|
inline |
Assignment operator.
Copy the two summing regions.
that | the object whose state will be copied |
|
inline |
Greater than comparison to TrIterator.
Comparison against a simple iterator. Literally compares whether the iterator returned by min_extent() is greater than the argument. In normal situations, this is analogous to checking whether the min_extent() of the trailing sum comes after the argument.
it | the iterator to compare to |