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 ()
boolean isChannel ()
boolean isChip ()
boolean isLink ()
boolean isModule ()
boolean equals (Object e2)
 explicit equality operator
boolean superset (ModuleElement e2)
boolean subset (ModuleElement e2)
boolean overlaps (ModuleElement e2)
String getClassName ()
void write (OStream s, ObjectManager o) throws java.io.IOException

Static Public Member Functions

static ModuleElement chip (int chip)
 Creates a ModuleElement that represents a chip.
static ModuleElement channel (int channel)
 Creates a ModuleElement that represents a channel.
static ModuleElement link (int link)
 Creates a ModuleElement that represents a link.
static ModuleElement module ()
 Creates a ModuleElement that represents a module.
static 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.

References SctData.ModuleElement.first, and SctData.ModuleElement.last.

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


Member Function Documentation

static 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:

static 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:

boolean SctData.ModuleElement.equals Object  e2  ) 
 

explicit equality operator

Returns:
true if first and last are equal

Definition at line 91 of file ModuleElement.java.

References SctData.ModuleElement.getFirst(), and SctData.ModuleElement.getLast().

Referenced by SctData.ModuleDefect.equals().

Here is the call graph for this function:

int SctData.ModuleElement.getNChannels  ) 
 

Returns:
the number of channels (=last-first+1)

Definition at line 66 of file ModuleElement.java.

References SctData.ModuleElement.first, and SctData.ModuleElement.last.

Referenced by SctData.ModuleElement.isChannel(), SctData.ModuleElement.isChip(), SctData.ModuleElement.isLink(), and SctData.ModuleElement.isModule().

boolean SctData.ModuleElement.isChannel  ) 
 

Returns:
true if only contains one element

Definition at line 71 of file ModuleElement.java.

References SctData.ModuleElement.getNChannels().

Here is the call graph for this function:

boolean SctData.ModuleElement.isChip  ) 
 

Returns:
true if the channels contained precisely match one chip

Definition at line 76 of file ModuleElement.java.

References SctData.ModuleElement.getFirst(), and SctData.ModuleElement.getNChannels().

Here is the call graph for this function:

boolean SctData.ModuleElement.isLink  ) 
 

Returns:
true if the channels contained precisely match one link

Definition at line 81 of file ModuleElement.java.

References SctData.ModuleElement.getFirst(), and SctData.ModuleElement.getNChannels().

Here is the call graph for this function:

boolean SctData.ModuleElement.isModule  ) 
 

Returns:
true if all of the channels are contained

Definition at line 86 of file ModuleElement.java.

References SctData.ModuleElement.getFirst(), and SctData.ModuleElement.getNChannels().

Here is the call graph for this function:

static 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:

boolean SctData.ModuleElement.overlaps ModuleElement  e2  ) 
 

Returns:
true if this element overlaps any part of RHS element

Definition at line 110 of file ModuleElement.java.

References SctData.ModuleElement.getFirst(), and SctData.ModuleElement.getLast().

Here is the call graph for this function:

boolean SctData.ModuleElement.subset ModuleElement  e2  ) 
 

Returns:
true if this element is contained within the RHS element (or equal)

Definition at line 105 of file ModuleElement.java.

References SctData.ModuleElement.getFirst(), and SctData.ModuleElement.getLast().

Here is the call graph for this function:

boolean SctData.ModuleElement.superset ModuleElement  e2  ) 
 

Returns:
true if this element contains all of the RHS element (or equal)

Definition at line 100 of file ModuleElement.java.

References SctData.ModuleElement.getFirst(), and SctData.ModuleElement.getLast().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Mon Feb 6 14:17:04 2006 for SCT DAQ/DCS Software - Java by  doxygen 1.4.6