Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

SctData.ModuleElement Class Reference

Represents an contiguous element of a module : may be a chip, link, channel or some other region. More...

List of all members.

Public Member Functions

 ModuleElement (int first, int last) throws IllegalArgumentException
 Constructor takes the first and last channel of the element.

int getFirst ()
 First channel contained (0->1535).

int getLast ()
 Last channel contained (0->1535).

int getNChannels ()
 the number of channels (=last-first+1)

boolean isChannel ()
 true if only contains one element

boolean isChip ()
 true if the channels contained precisely match one chip

boolean isLink ()
 true if the channels contained precisely match one link

boolean isModule ()
 true if all of the channels are contained

boolean equals (Object e2)
 explicit equality operator true if first and last are equal

boolean superset (ModuleElement e2)
 true if this element contains all of the RHS element (or equal)

boolean subset (ModuleElement e2)
 true if this element is contained within the RHS element (or equal)

boolean overlaps (ModuleElement e2)
 true if this element overlaps any part of RHS element

String getClassName ()
void write (OStream s, ObjectManager o) throws java.io.IOException

Static Public Member Functions

ModuleElement chip (int chip)
 Creates a ModuleElement that represents a chip.

ModuleElement channel (int channel)
 Creates a ModuleElement that represents a channel.

ModuleElement link (int link)
 Creates a ModuleElement that represents a link.

ModuleElement module ()
 Creates a ModuleElement that represents a module.

ModuleElement read (IStream s, ObjectManager o) throws java.io.IOException

Private Attributes

int first
int last


Detailed Description

Represents an contiguous element of a module : may be a chip, link, channel or some other region.

Definition at line 8 of file ModuleElement.java.


Constructor & Destructor Documentation

SctData.ModuleElement.ModuleElement int  first,
int  last
throws IllegalArgumentException
 

Constructor takes the first and last channel of the element.

0,127 for chip 0 link 0, or perhaps 768, 895 for chip 0 link 1.

Parameters:
first channel contained
last channel contained (inclusive)
Exceptions:
IllegalArgumentException if last<first or last>1535.

Definition at line 16 of file ModuleElement.java.

Referenced by SctData.ModuleElement.channel(), SctData.ModuleElement.chip(), SctData.ModuleElement.link(), and SctData.ModuleElement.module().


Member Function Documentation

ModuleElement SctData.ModuleElement.channel int  channel  )  [static]
 

Creates a ModuleElement that represents a channel.

Parameters:
channel the channel number

Definition at line 36 of file ModuleElement.java.

References SctData.ModuleElement.ModuleElement().

Here is the call graph for this function:

ModuleElement SctData.ModuleElement.chip int  chip  )  [static]
 

Creates a ModuleElement that represents a chip.

Parameters:
chip the chip index

Definition at line 28 of file ModuleElement.java.

References SctData.ModuleElement.ModuleElement().

Here is the call graph for this function:

ModuleElement SctData.ModuleElement.link int  link  )  [static]
 

Creates a ModuleElement that represents a link.

Parameters:
link the link index

Definition at line 44 of file ModuleElement.java.

References SctData.ModuleElement.ModuleElement().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Thu Jul 15 09:57:13 2004 for SCT DAQ/DCS Software - Java by doxygen 1.3.5