org.jlab.coda.jevio
Interface IEvioFilter


public interface IEvioFilter

This interface allows applications to create filters so that they only recieve certain structures when events are being processed. Below is a filter that accepts any structure that has tag = 400.

 IEvioFilter myFilter = new IEvioFilter() {
     public boolean accept(StructureType structureType, IEvioStructure structure) {
         return (structure.getHeader().getTag() == 400);
     }
 };
 EventParser.getInstance().setEvioFilter(myFilter);
 

Author:
heddle

Method Summary
 boolean accept(StructureType structureType, IEvioStructure structure)
          Accept or reject the given structure.
 

Method Detail

accept

boolean accept(StructureType structureType,
               IEvioStructure structure)
Accept or reject the given structure.

Parameters:
structureType - the structure type, a StructureType enum, of the structure that was just found, e.g., StructureType.BANK.
structure - the structure that was just found. From its header the tag, num, length, and data type are available. The application can filter based on those quantities or on the data itself.
Returns:
true if the structure passes the filter and should be given to the listeners.
See Also:
StructureType