Package org.jlab.detector.banks
Class FilteredBank
java.lang.Object
org.jlab.detector.banks.FilteredBank
- Direct Known Subclasses:
- RawBank
Utility to provide access to a bank filtered on a certain variable while
 maintaining mapping to the true row index in the bank.
- Author:
- gavalian, baltzell
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected org.jlab.jnp.hipo4.data.Bankstatic final intprotected final String
- 
Constructor SummaryConstructorsConstructorDescriptionFilteredBank(org.jlab.jnp.hipo4.data.Schema schema, int allocate, String variableName) FilteredBank(org.jlab.jnp.hipo4.data.Schema schema, String variableName) 
- 
Method SummaryModifier and TypeMethodDescriptionintfloatintlongintgetRows()intstatic voidprotected voidPrepare filtering for the current bank's valuesvoidread(org.jlab.jnp.hipo4.data.Event evt) Read the bank and prepare filteringintrows()final voidsetFilter(int... values) Set the filtering criteriainttrueIndex(int index) 
- 
Field Details- 
DEFAULT_ALLOCpublic static final int DEFAULT_ALLOC- See Also:
 
- 
filterVar
- 
bankprotected org.jlab.jnp.hipo4.data.Bank bank
- 
indexList
- 
filterList
 
- 
- 
Constructor Details- 
FilteredBank- Parameters:
- schema- schema for the bank to filter
- allocate- number of rows to allocate
- variableName- name of the variable to filter on
 
- 
FilteredBank- Parameters:
- schema- schema for the bank to filter
- variableName- name of the variable to filter on
 
 
- 
- 
Method Details- 
setFilterpublic final void setFilter(int... values) Set the filtering criteria- Parameters:
- values- values to filter for
 
- 
readpublic void read(org.jlab.jnp.hipo4.data.Event evt) Read the bank and prepare filtering- Parameters:
- evt-
 
- 
notifyReadprotected void notifyRead()Prepare filtering for the current bank's values
- 
rowspublic int rows()- Returns:
- number of bank rows that satisfy filtering criteria
 
- 
getRowspublic int getRows()- Returns:
- number of bank rows that satisfy filtering criteria
 
- 
getByte- Parameters:
- varName- name of the bank variable
- index- filtered index to retrieve
- Returns:
- value for the filtered index
 
- 
getShort- Parameters:
- varName- name of the bank variable
- index- filtered index to retrieve
- Returns:
- value for the filtered index
 
- 
getInt- Parameters:
- varName- name of the bank variable
- index- filtered index to retrieve
- Returns:
- value for the filtered index
 
- 
getLong- Parameters:
- varName- name of the bank variable
- index- filtered index to retrieve
- Returns:
- value for the filtered index
 
- 
getFloat- Parameters:
- varName- name of the bank variable
- index- filtered index to retrieve
- Returns:
- value for the filtered index
 
- 
trueIndexpublic int trueIndex(int index) - Parameters:
- index- filtered index to retrieve
- Returns:
- true bank row index corresponding to the filtered index
 
- 
main
 
-