org.jlab.coda.jevio
Class StructureFinder

java.lang.Object
  extended by org.jlab.coda.jevio.StructureFinder

public class StructureFinder
extends java.lang.Object

This is a set of convenient static methods used to find lists of structures within an event that match certain criteria. For most part it uses the List getMatchingStructures(IEvioFilter) method on the provided EvioEvent object by constructing the appropriate filter.

Author:
heddle

Constructor Summary
StructureFinder()
           
 
Method Summary
static java.util.List<BaseStructure> getMatchingBanks(EvioEvent event, int tag, int number)
          Collect all the banks in an event that match a provided tag and number in their header.
static java.util.List<BaseStructure> getMatchingNonBanks(EvioEvent event, int tag)
          Collect all the non-banks (i.e., Segments and TagSegments) in an event that match a provided tag in their header.
static java.util.List<BaseStructure> getMatchingStructures(EvioEvent event, IEvioFilter filter)
          Collect all the structures in an event that pass a filter.
static java.util.List<BaseStructure> getMatchingStructures(EvioEvent event, int tag)
          Collect all the structures in an event that match a provided tag in their header.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructureFinder

public StructureFinder()
Method Detail

getMatchingStructures

public static java.util.List<BaseStructure> getMatchingStructures(EvioEvent event,
                                                                  IEvioFilter filter)
Collect all the structures in an event that pass a filter.

Parameters:
event - the event being queried.
filter - the filter that must be passed. If null, this will return all the structures.
Returns:
a collection of all structures that are accepted by a filter for the provided event.

getMatchingBanks

public static java.util.List<BaseStructure> getMatchingBanks(EvioEvent event,
                                                             int tag,
                                                             int number)
Collect all the banks in an event that match a provided tag and number in their header. Only Banks are returned, because only Banks have a number field.

Parameters:
event - the event being queried.
tag - the tag to match.
number - the number to match.
Returns:
a collection of all Banks that are accepted by a filter for the provided event.

getMatchingStructures

public static java.util.List<BaseStructure> getMatchingStructures(EvioEvent event,
                                                                  int tag)
Collect all the structures in an event that match a provided tag in their header.

Parameters:
event - the event being queried.
tag - the tag to match.
Returns:
a collection of all structures that are accepted by a filter for the provided event.

getMatchingNonBanks

public static java.util.List<BaseStructure> getMatchingNonBanks(EvioEvent event,
                                                                int tag)
Collect all the non-banks (i.e., Segments and TagSegments) in an event that match a provided tag in their header. No Banks are returned,

Parameters:
event - the event being queried.
tag - the tag to match.
Returns:
a collection of all non-bank structures that are accepted by a filter for the provided event.