Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

SctData::ModuleElement Class Reference

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

#include <ModuleElement.h>

Inheritance diagram for SctData::ModuleElement:

SctData::Channel SctData::Chip SctData::Link SctData::Module

Public Member Functions

 ModuleElement (const unsigned first, const unsigned last)
 Constructor takes the first and last channel of the element.

 ~ModuleElement () throw ()
 Destructor.

unsigned getFirst () const throw ()
 First channel contained (0->1535).

unsigned getLast () const throw ()
 Last channel contained (0->1535).

unsigned getNChannels () const throw ()
 
Returns:
the number of channels (=last-first+1)


bool isChannel () const throw ()
 
Returns:
true if only contains one element


bool isChip () const throw ()
 
Returns:
true if the channels contained precisely match one chip


bool isLink () const throw ()
 
Returns:
true if the channels contained precisely match one link


bool isModule () const throw ()
 
Returns:
true if all of the channels are contained


bool operator== (const ModuleElement &) const throw ()
 explicit equality operator
Returns:
true if first and last are equal


bool isWithin (const ModuleElement &) const throw ()
 
Returns:
true if this element is contained within or equal to the argument


bool contains (const ModuleElement &) const throw ()
 
Returns:
true if this element contains or is equal to the RHS element


bool overlaps (const ModuleElement &) const throw ()
 
Returns:
true if this element overlaps any part of RHS element



Private Member Functions

 ModuleElement () throw ()
 can't do this


Private Attributes

unsigned first
unsigned last

Detailed Description

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

Author:
Alan Barr
Date:
3 July 2003

Definition at line 15 of file ModuleElement.h.


Constructor & Destructor Documentation

SctData::ModuleElement::ModuleElement const unsigned    first,
const unsigned    last
[inline]
 

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
Exceptions:
OutOfRangeError if last<first or last>1535.

Definition at line 88 of file ModuleElement.h.

References first, last, and Sct::nChannelModule.

SctData::ModuleElement::~ModuleElement   throw () [inline]
 

Destructor.

Definition at line 24 of file ModuleElement.h.

SctData::ModuleElement::ModuleElement   throw () [private]
 

can't do this


Member Function Documentation

bool SctData::ModuleElement::contains const ModuleElement &    const throw () [inline]
 

Returns:
true if this element contains or is equal to the RHS element

Definition at line 124 of file ModuleElement.h.

unsigned SctData::ModuleElement::getFirst   const throw () [inline]
 

First channel contained (0->1535).

Definition at line 26 of file ModuleElement.h.

Referenced by SctData::TestSummary::SummaryWriter::write(), and SctData::IO::ModuleDefectListStreamer::write().

unsigned SctData::ModuleElement::getLast   const throw () [inline]
 

Last channel contained (0->1535).

Definition at line 28 of file ModuleElement.h.

References last.

Referenced by SctData::TestSummary::SummaryWriter::write().

unsigned int SctData::ModuleElement::getNChannels   const throw () [inline]
 

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

Definition at line 101 of file ModuleElement.h.

Referenced by SctData::TestSummary::SummaryWriter::write(), and SctData::IO::ModuleDefectListStreamer::write().

bool SctData::ModuleElement::isChannel   const throw () [inline]
 

Returns:
true if only contains one element

Definition at line 104 of file ModuleElement.h.

bool SctData::ModuleElement::isChip   const throw () [inline]
 

Returns:
true if the channels contained precisely match one chip

Definition at line 107 of file ModuleElement.h.

References Sct::nChannelChip.

bool SctData::ModuleElement::isLink   const throw () [inline]
 

Returns:
true if the channels contained precisely match one link

Definition at line 110 of file ModuleElement.h.

References Sct::nChannelLink.

bool SctData::ModuleElement::isModule   const throw () [inline]
 

Returns:
true if all of the channels are contained

Definition at line 113 of file ModuleElement.h.

References Sct::nChannelModule.

bool SctData::ModuleElement::isWithin const ModuleElement &    const throw () [inline]
 

Returns:
true if this element is contained within or equal to the argument

Definition at line 121 of file ModuleElement.h.

bool SctData::ModuleElement::operator== const ModuleElement &    const throw () [inline]
 

explicit equality operator

Returns:
true if first and last are equal

Definition at line 117 of file ModuleElement.h.

bool SctData::ModuleElement::overlaps const ModuleElement &    const throw () [inline]
 

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

Definition at line 128 of file ModuleElement.h.


Field Documentation

unsigned SctData::ModuleElement::first [private]
 

Definition at line 48 of file ModuleElement.h.

Referenced by ModuleElement().

unsigned SctData::ModuleElement::last [private]
 

Definition at line 48 of file ModuleElement.h.

Referenced by getLast(), and ModuleElement().


The documentation for this class was generated from the following file:
Generated on Mon Dec 15 19:37:47 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3