org.jlab.coda.et
Class Attachment

java.lang.Object
  extended byorg.jlab.coda.et.Attachment

public class Attachment
extends java.lang.Object

This class defines an ET system user's attachment to a station. Attachments can only be created by an ET system's SystemUse.attach(org.jlab.coda.et.Station) method. Attachments are means of designating the ownership of events and keeping track of events.


Field Summary
(package private)  int id
          Unique id number
(package private)  Station station
          Station the attachment is associated with
(package private)  SystemUse sys
          ET system the attachment is associated with
(package private)  boolean usable
          Flag telling whether this attachment object is usable or the attachment it represents has been detached.
 
Constructor Summary
(package private) Attachment(Station _station, int _id, SystemUse _sys)
          Creates an attachment to a specific ET system and station.
 
Method Summary
 long getEventsDump()
          Gets the number of events dumped (recycled by returning to GRAND_CENTRAL station) through the attachment
 long getEventsGet()
          Gets the number of events gotten from the ET system by the attachment
 long getEventsMake()
          Gets the number of new events gotten from the ET system by the attachment
 long getEventsPut()
          Gets the number of events put into the ET system by the attachment
 int getId()
          Gets the id number of this attachment.
 Station getStation()
          Gets the object of the station attached to.
 boolean usable()
          Tells if this attachment object is usable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

int id
Unique id number


station

Station station
Station the attachment is associated with


usable

boolean usable
Flag telling whether this attachment object is usable or the attachment it represents has been detached. Set by the user's ET system object.


sys

SystemUse sys
ET system the attachment is associated with

Constructor Detail

Attachment

Attachment(Station _station,
           int _id,
           SystemUse _sys)
Creates an attachment to a specific ET system and station. Attachments can only be created by an ET system's SystemUse.attach(org.jlab.coda.et.Station) method.

Parameters:
_station - station object
_id - unique attachment id number
_sys - ET system object
Method Detail

getStation

public Station getStation()
Gets the object of the station attached to.

Returns:
object of station attached to

getId

public int getId()
Gets the id number of this attachment.

Returns:
id number of this attachment

usable

public boolean usable()
Tells if this attachment object is usable.

Returns:
true if attachment object is usable and false otherwise

getEventsPut

public long getEventsPut()
                  throws java.io.IOException,
                         EtException
Gets the number of events put into the ET system by the attachment

Returns:
number of events put into the ET system by the attachment
Throws:
java.io.IOException
EtException

getEventsGet

public long getEventsGet()
                  throws java.io.IOException,
                         EtException
Gets the number of events gotten from the ET system by the attachment

Returns:
number of events gotten from the ET system by the attachment
Throws:
java.io.IOException
EtException

getEventsDump

public long getEventsDump()
                   throws java.io.IOException,
                          EtException
Gets the number of events dumped (recycled by returning to GRAND_CENTRAL station) through the attachment

Returns:
number of events dumped into the ET system by this attachment
Throws:
java.io.IOException
EtException

getEventsMake

public long getEventsMake()
                   throws java.io.IOException,
                          EtException
Gets the number of new events gotten from the ET system by the attachment

Returns:
number of new events gotten from the ET system by the attachment
Throws:
java.io.IOException
EtException