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

SctData::ModuleDefectList Class Reference

This class represents all the defects in a module. More...

#include <ModuleDefectList.h>

Inheritance diagram for SctData::ModuleDefectList:

Sct::Streamable

Public Member Functions

 ModuleDefectList () throw ()
 Create a new empty ModuleDefects object.

virtual ~ModuleDefectList () throw ()
 Destructor deletes all ModuleDefect objects as we own them.

void addDefect (const ModuleDefect &prototype, const ModuleElement &element) throw ()
 Add a defect.

const vector< shared_ptr<
const ModuleDefect > > & 
getAllDefects () const throw ()
 Get all defects in the ModuleDefectList.

shared_ptr< ModuleDefectList > getDefectsAffectingElement (const ModuleElement &) const throw (LogicError)
 Methods enquiring as to defects on ANY PART of a module element.

int getNDefectsAffectingElement (const ModuleElement &) const throw (LogicError)
bool severeDefectAffectingElement (const ModuleElement &) const throw (LogicError)
 check for severe defects.

bool defectAffectingElement (const ModuleElement &) const throw (LogicError)
 check for any defects.

bool defectAffectingElement (const ModuleElement &, const ModuleDefect &) const throw (LogicError)
 check for defects of a particular type.

virtual string getClassName () const throw ()
 Streamable override.

ModuleDefectList & operator+= (const ModuleDefectList &) throw ()
 Add defects from another list.

ostream & print (ostream &out) const throw ()
 print the defects:

shared_ptr< ModuleDefectList > getDefectsEncompassingElement (const ModuleElement &) const throw (LogicError)
 get all defects who contain the element

int getNDefectsEncompassingElement (const ModuleElement &) const throw (LogicError)
 number of defects inside element.

bool severeDefectEncompassingElement (const ModuleElement &) const throw (LogicError)
 check for severe defects.

bool defectEncompassingElement (const ModuleElement &) const throw (LogicError)
 check for any defects.

bool defectEncompassingElement (const ModuleElement &, const ModuleDefect &) const throw (LogicError)
 check for defects of a particular type.


Private Member Functions

void add (shared_ptr< const ModuleDefect >) throw ()

Private Attributes

vector< shared_ptr< const
ModuleDefect > > 
defectList
 All defects allow this class to share its defects with ModuleDefectLists it creates.


Detailed Description

This class represents all the defects in a module.

It is essentially a map of channel number to a collection of ModuleDefect s.

Author:
Matthew Palmer

Definition at line 25 of file ModuleDefectList.h.


Constructor & Destructor Documentation

SctData::ModuleDefectList::ModuleDefectList   throw ()
 

Create a new empty ModuleDefects object.

Definition at line 7 of file ModuleDefectList.cpp.

SctData::ModuleDefectList::~ModuleDefectList   throw () [virtual]
 

Destructor deletes all ModuleDefect objects as we own them.

Definition at line 10 of file ModuleDefectList.cpp.


Member Function Documentation

void SctData::ModuleDefectList::add shared_ptr< const ModuleDefect   throw () [private]
 

Definition at line 16 of file ModuleDefectList.cpp.

void SctData::ModuleDefectList::addDefect const ModuleDefect   prototype,
const ModuleElement   element
throw ()
 

Add a defect.

Note:
Takes a prototype rather than a precreated ModuleDefect to make sure we own them, because we delete them in the destructor.
Parameters:
prototype The prototype ModuleDefect to add
ModuleElement,i.e. channel/chip/link/module

Definition at line 12 of file ModuleDefectList.cpp.

Referenced by SctData::IO::ModuleDefectListStreamer::read().

bool SctData::ModuleDefectList::defectAffectingElement const ModuleElement  ,
const ModuleDefect  
const throw (LogicError)
 

check for defects of a particular type.

Definition at line 72 of file ModuleDefectList.cpp.

bool SctData::ModuleDefectList::defectAffectingElement const ModuleElement   const throw (LogicError)
 

check for any defects.

Definition at line 88 of file ModuleDefectList.cpp.

bool SctData::ModuleDefectList::defectEncompassingElement const ModuleElement  ,
const ModuleDefect  
const throw (LogicError)
 

check for defects of a particular type.

Definition at line 80 of file ModuleDefectList.cpp.

bool SctData::ModuleDefectList::defectEncompassingElement const ModuleElement   const throw (LogicError)
 

check for any defects.

Definition at line 95 of file ModuleDefectList.cpp.

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

const vector< shared_ptr< const ModuleDefect > > & SctData::ModuleDefectList::getAllDefects   const throw ()
 

Get all defects in the ModuleDefectList.

Returns:
A reference to a list of all defects.

Definition at line 39 of file ModuleDefectList.cpp.

Referenced by SctData::IO::ModuleDefectListStreamer::write().

string SctData::ModuleDefectList::getClassName   const throw () [virtual]
 

Streamable override.

Implements Sct::Streamable.

Definition at line 118 of file ModuleDefectList.cpp.

shared_ptr< ModuleDefectList > SctData::ModuleDefectList::getDefectsAffectingElement const ModuleElement   const throw (LogicError)
 

Methods enquiring as to defects on ANY PART of a module element.

Get all the defects affecting a given channel.

Parameters:
channelNum The channel number
Returns:
a vector of const ModuleDefect*

Definition at line 102 of file ModuleDefectList.cpp.

shared_ptr< ModuleDefectList > SctData::ModuleDefectList::getDefectsEncompassingElement const ModuleElement   const throw (LogicError)
 

get all defects who contain the element

Definition at line 110 of file ModuleDefectList.cpp.

int SctData::ModuleDefectList::getNDefectsAffectingElement const ModuleElement   const throw (LogicError)
 

Definition at line 43 of file ModuleDefectList.cpp.

int SctData::ModuleDefectList::getNDefectsEncompassingElement const ModuleElement   const throw (LogicError)
 

number of defects inside element.

Definition at line 50 of file ModuleDefectList.cpp.

ModuleDefectList & SctData::ModuleDefectList::operator+= const ModuleDefectList &    throw ()
 

Add defects from another list.

Definition at line 20 of file ModuleDefectList.cpp.

ostream & SctData::ModuleDefectList::print ostream &    out const throw ()
 

print the defects:

Definition at line 27 of file ModuleDefectList.cpp.

bool SctData::ModuleDefectList::severeDefectAffectingElement const ModuleElement   const throw (LogicError)
 

check for severe defects.

Definition at line 58 of file ModuleDefectList.cpp.

bool SctData::ModuleDefectList::severeDefectEncompassingElement const ModuleElement   const throw (LogicError)
 

check for severe defects.

Definition at line 65 of file ModuleDefectList.cpp.


Field Documentation

vector< shared_ptr<const ModuleDefect> > SctData::ModuleDefectList::defectList [private]
 

All defects allow this class to share its defects with ModuleDefectLists it creates.

Definition at line 93 of file ModuleDefectList.h.


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