org.jlab.coda.et
Class StationConfig

java.lang.Object
  extended byorg.jlab.coda.et.StationConfig
All Implemented Interfaces:
java.io.Serializable

public class StationConfig
extends java.lang.Object
implements java.io.Serializable

This class specifies a configuration used to create a new station.

See Also:
Serialized Form

Field Summary
(package private)  int blockMode
          Determine whether all events will pass through the station (blocking) or whether events should fill a cue with additional events bypassing the station and going to the next (nonblocking).
(package private)  int cue
          Maximum number of events to store in this station's input list when the station is nonblocking.
(package private)  int flowMode
          Determine whether the station is part of a single group of stations through which events flow in parallel or is not.
(package private)  int prescale
          A value of N means selecting 1 out of every Nth event that meets this station's selection criteria.
(package private)  int restoreMode
          Determine the method of dealing with events obtained by a user through an attachment, but whose process has ended before putting the events back into the system.
(package private)  int[] select
          An array of integers used in the builtin selection method and available for any tasks the user desires.
(package private)  java.lang.String selectClass
          Name of the Java class containing the user-defined select method.
(package private)  java.lang.String selectFunction
          Name of user-defined select function in a C library.
(package private)  java.lang.String selectLibrary
          Name of the C library containing the user-defined select function.
(package private)  int selectMode
          Determine the method of filtering events for selection into the station's input list.
(package private)  int userMode
          The maximum number of users permitted to attach to this station.
 
Constructor Summary
StationConfig()
          Creates a new StationConfig object with default values for everything.
StationConfig(StationConfig config)
          Creates a new StationConfig object from an existing one.
 
Method Summary
static boolean compatibleParallelConfigs(StationConfig group, StationConfig config)
          Checks to see if station configurations are compatible when adding a parallel station to an existing group of parallel stations.
 int getBlockMode()
          Gets the block mode.
 int getCue()
          Gets the cue size.
 int getFlowMode()
          Gets the flow mode.
 int getPrescale()
          Gets the prescale value.
 int getRestoreMode()
          Gets the restore mode.
 int[] getSelect()
          Gets the select integer array.
 java.lang.String getSelectClass()
          Gets the name of the class containing the user-defined select method.
 java.lang.String getSelectFunction()
          Gets the user-defined select function name.
 java.lang.String getSelectLibrary()
          Gets the name of the library containing the user-defined select function.
 int getSelectMode()
          Gets the select mode.
 int getUserMode()
          Gets the user mode.
 void setBlockMode(int mode)
          Sets the station's block mode value.
 void setCue(int q)
          Sets the station's cue size.
 void setFlowMode(int mode)
          Sets the station's flow mode value.
 void setPrescale(int pre)
          Sets the station's prescale value.
 void setRestoreMode(int mode)
          Sets the station's restore mode value.
 void setSelect(int[] sel)
          Sets the station's select integer array.
 void setSelectClass(java.lang.String sClass)
          Sets the class containing the user-defined select method.
 void setSelectFunction(java.lang.String func)
          Sets the station's user-defined select function.
 void setSelectLibrary(java.lang.String lib)
          Sets the library containing the user-defined select function.
 void setSelectMode(int mode)
          Sets the station's select mode value.
 void setUserMode(int mode)
          Sets the station's user mode value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cue

int cue
Maximum number of events to store in this station's input list when the station is nonblocking. When the input list has reached this limit, additional events flowing through the ET system are passed to the next station in line.


prescale

int prescale
A value of N means selecting 1 out of every Nth event that meets this station's selection criteria.


flowMode

int flowMode
Determine whether the station is part of a single group of stations through which events flow in parallel or is not. A value of Constants.stationParallel means it is a parallel station, while a value of Constants.stationSerial means it is not.


userMode

int userMode
The maximum number of users permitted to attach to this station. A value of 0 means any number of users may attach. It may be set to Constants.stationUserMulti or Constants.stationUserSingle meaning unlimited users and a single user respectively.


restoreMode

int restoreMode
Determine the method of dealing with events obtained by a user through an attachment, but whose process has ended before putting the events back into the system. It may have the value Constants.stationRestoreIn which places the events in the station's input list, Constants.stationRestoreOut which places them in the output list, or Constants.stationRestoreGC which places them in GRAND_CENTRAL station.


blockMode

int blockMode
Determine whether all events will pass through the station (blocking) or whether events should fill a cue with additional events bypassing the station and going to the next (nonblocking). The permitted values are Constants.stationBlocking and Constants.stationNonBlocking.


selectMode

int selectMode
Determine the method of filtering events for selection into the station's input list. A value of Constants.stationSelectAll applies no filtering, Constants.stationSelectMatch applies a builtin method for selection (StationLocal.select(org.jlab.coda.et.SystemCreate, org.jlab.coda.et.StationLocal, org.jlab.coda.et.Event)), and Constants.stationSelectUser allows the user to define a selection method. If the station is part of a single group of parallel stations, a value of Constants.stationSelectRRobin distributes events among the parallel stations using a round robin algorithm. Similarly, if the station is part of a single group of parallel stations, a value of Constants.stationSelectEqualCue distributes events among the parallel stations using an algorithm to keep the cues equal to eachother.


select

int[] select
An array of integers used in the builtin selection method and available for any tasks the user desires. Its size is set by Constants.stationSelectInts.


selectFunction

java.lang.String selectFunction
Name of user-defined select function in a C library. It may be null. This is only relevant to C language ET systems.


selectLibrary

java.lang.String selectLibrary
Name of the C library containing the user-defined select function. It may be null. This is only relevant to C language ET systems.


selectClass

java.lang.String selectClass
Name of the Java class containing the user-defined select method. It may be null. This is only relevant to Java language ET systems.

Constructor Detail

StationConfig

public StationConfig()
Creates a new StationConfig object with default values for everything. The default values are: cue = Constants.defaultStationCue, prescale = Constants.defaultStationPrescale, flowMode = Constants.stationSerial, userMode = Constants.stationUserMulti, restoreMode = Constants.stationRestoreOut, blockMode = Constants.stationBlocking, selectMode = Constants.stationSelectAll, and select = filled with -1's


StationConfig

public StationConfig(StationConfig config)
Creates a new StationConfig object from an existing one.

Method Detail

compatibleParallelConfigs

public static boolean compatibleParallelConfigs(StationConfig group,
                                                StationConfig config)
Checks to see if station configurations are compatible when adding a parallel station to an existing group of parallel stations.

Parameters:
group - station configuration of head of existing group of parallel stations
config - configuration of station seeking to be added to the group

getCue

public int getCue()
Gets the cue size.

Returns:
cue size

getPrescale

public int getPrescale()
Gets the prescale value.

Returns:
prescale value

getFlowMode

public int getFlowMode()
Gets the flow mode.

Returns:
flow mode

getUserMode

public int getUserMode()
Gets the user mode.

Returns:
user mode

getRestoreMode

public int getRestoreMode()
Gets the restore mode.

Returns:
restore mode

getBlockMode

public int getBlockMode()
Gets the block mode.

Returns:
block mode

getSelectMode

public int getSelectMode()
Gets the select mode.

Returns:
select mode

getSelect

public int[] getSelect()
Gets the select integer array.

Returns:
select integer array

getSelectFunction

public java.lang.String getSelectFunction()
Gets the user-defined select function name.

Returns:
selection function name

getSelectLibrary

public java.lang.String getSelectLibrary()
Gets the name of the library containing the user-defined select function.

Returns:
library name

getSelectClass

public java.lang.String getSelectClass()
Gets the name of the class containing the user-defined select method.

Returns:
class name

setCue

public void setCue(int q)
            throws EtException
Sets the station's cue size.

Parameters:
q - cue size
Throws:
EtException - if there is a bad cue size value

setPrescale

public void setPrescale(int pre)
                 throws EtException
Sets the station's prescale value.

Parameters:
pre - prescale value
Throws:
EtException - if there is a bad prescale value

setFlowMode

public void setFlowMode(int mode)
                 throws EtException
Sets the station's flow mode value.

Parameters:
mode - flow mode
Throws:
EtException - if there is a bad flow mode value

setUserMode

public void setUserMode(int mode)
                 throws EtException
Sets the station's user mode value.

Parameters:
mode - user mode
Throws:
EtException - if there is a bad user mode value

setRestoreMode

public void setRestoreMode(int mode)
                    throws EtException
Sets the station's restore mode value.

Parameters:
mode - restore mode
Throws:
EtException - if there is a bad restore mode value

setBlockMode

public void setBlockMode(int mode)
                  throws EtException
Sets the station's block mode value.

Parameters:
mode - block mode
Throws:
EtException - if there is a bad block mode value

setSelectMode

public void setSelectMode(int mode)
                   throws EtException
Sets the station's select mode value.

Parameters:
mode - select mode
Throws:
EtException - if there is a bad select mode value

setSelect

public void setSelect(int[] sel)
               throws EtException
Sets the station's select integer array.

Parameters:
sel - select integer array
Throws:
EtException - if there are the wrong number of elements in the array

setSelectFunction

public void setSelectFunction(java.lang.String func)
Sets the station's user-defined select function.

Parameters:
func - name of the user-defined select function

setSelectLibrary

public void setSelectLibrary(java.lang.String lib)
Sets the library containing the user-defined select function.

Parameters:
lib - name of the library containg the user-defined select function

setSelectClass

public void setSelectClass(java.lang.String sClass)
Sets the class containing the user-defined select method.