DefectList.h

00001 #ifndef MODULEDEFECTLIST_H
00002 #define MODULEDEFECTLIST_H
00003 
00004 #include "DefectPrototype.h"
00005 #include "Defect.h"
00006 #include "Sct/Streamable.h"
00007 #include <list>
00008 #include <memory>
00009 #include <boost/shared_ptr.hpp>
00010 
00011 using std::list;
00012 using std::auto_ptr;
00013 using Sct::Streamable;
00014 using boost::shared_ptr;
00015 
00016 namespace SctData {
00017 
00018 class ModuleElement;
00019 
00024 class DefectList : public virtual Streamable {
00025 public:
00026     typedef list<Defect> DefectCollection;
00027     
00032     DefectList();
00033 
00039     void addDefect(Defect defect);
00045     const DefectCollection& getAllDefects() const;
00046 
00048     
00055     auto_ptr<DefectList> getDefectsAffectingElement(ModuleElement element) const;
00056     
00062     DefectSeverity defectSeverityAffectingElement(ModuleElement element) const;
00063     
00068     bool containsDefect(Defect defect) const;
00069     
00071     
00072     
00074     
00079     auto_ptr<DefectList> getDefectsEncompassingElement(ModuleElement element) const;
00080     
00085     DefectSeverity defectSeverityEncompassingElement(ModuleElement element) const;
00087     
00088     virtual string getClassName() const throw();
00089 
00094     DefectList& operator +=(const DefectList&);
00095 
00100   unsigned nChannelsAffected(DefectSeverity s=DODGY, ModuleElement e=ModuleElement::Module()) const;
00101 
00102 private:
00103     DefectCollection defectList;        
00104 };
00105 
00106 }
00107 
00108 std::ostream& operator << (std::ostream& os, const SctData::DefectList& d);
00109 
00110 #endif //#ifndef MODULEDEFECTLIST_H

Generated on Mon Feb 6 14:01:19 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6