All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class hep.analysis.Cut

java.lang.Object
   |
   +----hep.analysis.Cut

public abstract class Cut
extends Object
implements NamedObject
This class allows event analyzers and generators to use an adjustable discriminator in processing events. If for example, you wanted to include all values below a certain number, you might want to use a DoubleCut object. You could then dynamically modify the criteria for the cut and view the corresponding changes in the results of the analysis. You must extend this class to get a meaningful cut.

See Also:
DoubleCut

Constructor Index

 o Cut(String)
Uses the default folder.
 o Cut(String, CutFolder)

Method Index

 o apply(boolean)
Returns whether a given boolean value should be included in the cut.
 o apply(Date)
Returns whether a given date should be included in the cut.
 o apply(double)
Returns whether a given double value should be included in the cut.
 o apply(int)
Returns whether a given int value should be included in the cut.
 o apply(Object)
Returns whether a given object should be included in the cut.
 o apply(String)
Returns whether a given string should be included in the cut.
 o clearPartition()
Call before the first event on all cuts to clear the partition.
 o destroyPartition()
Destroy the partition if it exists.
 o getConstructor(CutProperties, String)
Override and return a constructor that corresponds to the given properties.
 o getDescription(CutProperties, String)
Override and return a description that corresponds to the given properties.
 o getName()
 o getPartition()
Override and return the partition your cut keeps if it keeps a partition.
 o getPeer()
 o getProperties()
Return a CutProperties object that encapsulates the current properties.
 o getType()
Return a string that describes the type.
 o getValuesApplied()
Returns an object that the application can use to display the values applied to the cut.
 o partitionDone()
Call after the last event on all cuts to get the last partition updates.
 o setPeer(NamedObjectPeer)
 o setProperties(CutProperties)
Set the properties to those specified by the parameter prop.

Constructors

 o Cut
 public Cut(String name)
Uses the default folder.

 o Cut
 public Cut(String name,
            CutFolder parent)

Methods

 o getName
 public String getName()
 o setPeer
 public void setPeer(NamedObjectPeer peer)
 o getPeer
 public NamedObjectPeer getPeer()
 o apply
 public boolean apply(double value) throws CutTypeException
Returns whether a given double value should be included in the cut. The default definition throws a CutTypeException so override the default definition to support cuts of type double.

Parameters:
value - the value to test
Returns:
whether the paramater value is included in the cut
Throws: CutTypeException
thrown by default. You must override to support type double
 o apply
 public boolean apply(int value) throws CutTypeException
Returns whether a given int value should be included in the cut. The default definition throws a CutTypeException so override the default definition to support cuts of type int.

Parameters:
value - the value to test
Returns:
whether the paramater value is included in the cut
Throws: CutTypeException
thrown by default. You must override to support type int
 o apply
 public boolean apply(Date value) throws CutTypeException
Returns whether a given date should be included in the cut. The default definition throws a CutTypeException so override the default definition to support cuts of type Date.

Parameters:
value - the value to test
Returns:
whether the paramater value is included in the cut
Throws: CutTypeException
thrown by default. You must override to support type Date
 o apply
 public boolean apply(boolean value) throws CutTypeException
Returns whether a given boolean value should be included in the cut. The default definition throws a CutTypeException so override the default definition to support cuts of type boolean.

Parameters:
value - the value to test
Returns:
whether the paramater value is included in the cut
Throws: CutTypeException
thrown by default. You must override to support type boolean
 o apply
 public boolean apply(String value) throws CutTypeException
Returns whether a given string should be included in the cut. The default definition throws a CutTypeException so override the default definition to support cuts of type String.

Parameters:
value - the value to test
Returns:
whether the paramater value is included in the cut
Throws: CutTypeException
thrown by default. You must override to support type String
 o apply
 public boolean apply(Object value) throws CutTypeException
Returns whether a given object should be included in the cut. The default definition throws a CutTypeException so override the default definition to support cuts of type Object.

Parameters:
value - the value to test
Returns:
whether the paramater value is included in the cut
Throws: CutTypeException
thrown by default. You must override to support type Object
 o getType
 public abstract String getType()
Return a string that describes the type. The client will look for a class named jas.swingstudio.<type>CutDialog when trying to show a dialog.

 o setProperties
 public abstract void setProperties(CutProperties prop)
Set the properties to those specified by the parameter prop.

 o getProperties
 public abstract CutProperties getProperties()
Return a CutProperties object that encapsulates the current properties.

 o getConstructor
 public static String getConstructor(CutProperties prop,
                                     String name)
Override and return a constructor that corresponds to the given properties.

 o getDescription
 public static String getDescription(CutProperties prop,
                                     String name)
Override and return a description that corresponds to the given properties.

 o clearPartition
 public final void clearPartition()
Call before the first event on all cuts to clear the partition.

 o partitionDone
 public final void partitionDone()
Call after the last event on all cuts to get the last partition updates.

 o destroyPartition
 public abstract void destroyPartition()
Destroy the partition if it exists. This function is called when the cut will no longer be used, so the partition should be emptied to promote garbage collection.

 o getValuesApplied
 public Object getValuesApplied()
Returns an object that the application can use to display the values applied to the cut. If the return value from getPartition is

See Also:
getPartition
 o getPartition
 protected Partition getPartition()
Override and return the partition your cut keeps if it keeps a partition. The default implementation returns null. You must Some operations are performed automatically:


All Packages  Class Hierarchy  This Package  Previous  Next  Index