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, BaseStructureHeader structureHeader) {
         return (structureHeader.getTag() == 400);
     }
 };
 EventParser.getInstance().setEvioFilter(myFilter);
 

Author:
heddle

Method Summary
 boolean accept(StructureType structureType, BaseStructureHeader structureHeader)
           
 

Method Detail

accept

boolean accept(StructureType structureType,
               BaseStructureHeader structureHeader)
Parameters:
structureType - the structure type, a StructureType enum, of the structure that was just found, e.g., StructureType.BANK.
structureHeader - the header for the structure that was just found. From this header the tag, num, length, and data type are available, so the application can filter based on those quantities.
Returns:
true if the structure passes the filter and should be given to the listeners.
See Also:
StructureType