Package xal.tools.correlator
Class CorrelationTester<T>
java.lang.Object
xal.tools.correlator.CorrelationTester<T>
CorrelationTester is a helper class for wrapping and applying the correlation
filter. Many classes may reference the correlation filter, but rather than
having each of them monitor whether the filter has changed, correlation
tester holds the current filter in use and thus wraps the correlation filter.
Other classes use the this tester in rather than referencing the filter
directly.
- Author:
- tap
-
Constructor Summary
ConstructorsConstructorDescriptionCorrelationTester(int fullCount, CorrelationFilter<T> aFilter) Creates a new instance of CorrelationTester -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(Correlation<T> correlation) Determine whether the specified correlation passes the filter's test.Get the correlation filter.voidsetFilter(CorrelationFilter<T> newFilter) Set the correlation filter.voidsetFullCount(int newCount) Set the full count.
-
Constructor Details
-
CorrelationTester
Creates a new instance of CorrelationTester
-
-
Method Details
-
setFullCount
public void setFullCount(int newCount) Set the full count.- Parameters:
newCount- The number of channels to monitor and correlate.
-
getFilter
Get the correlation filter.- Returns:
- The correlation filter.
-
setFilter
Set the correlation filter.- Parameters:
newFilter- The new filter to apply to correlations.
-
accept
Determine whether the specified correlation passes the filter's test.- Parameters:
correlation- The correlation to test.- Returns:
- true if the correlation passes the filter test, and false if not.
-