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

ArchModuleDefects.h

00001 #ifndef ARCHMODULEDEFECTS_H
00002 #define ARCHMODULEDEFECTS_H
00003 
00004 #include "Sct/Streamable.h"
00005 #include "Sct/Exception.h"
00006 #include "Sct/LogicErrors.h"
00007 
00008 #include <vector>
00009 #include <boost/shared_ptr.hpp>
00010 #include "SctData/ModuleDefect.h"
00011 #include <TObjArray.h>
00012 
00013 using namespace SctData;
00014 using namespace Sct;
00015 using boost::shared_ptr;
00016 
00017 
00018 class ArchModuleDefects {
00019 
00020  protected:
00021        vector<shared_ptr<const ModuleDefect> > defects; 
00022        vector< shared_ptr<TObjArray> > defectList; 
00023        //TObjArray *tmp_defectList[40];
00024        //In each element of the vector (in eacj TObjArray) the entry no. 0 is the TObjString saying what kind of defect is (defect name)
00025 
00026        /*
00028        shared_ptr<TObjArray> DEAD;         
00029        shared_ptr<TObjArray> STUCKON;   
00030        shared_ptr<TObjArray> OVER; 
00031        shared_ptr<TObjArray> UNDER;       
00032        shared_ptr<TObjArray> NOINIT;    
00033        shared_ptr<TObjArray> FIT_UNDER;
00034        shared_ptr<TObjArray> FIT_OVER;
00035        shared_ptr<TObjArray> SIG_UNDER;
00036        shared_ptr<TObjArray> SIG_OVER;
00038 
00039        shared_ptr<TObjArray> SD_LO;
00040        shared_ptr<TObjArray> SD_HI;
00041        shared_ptr<TObjArray> LO_GAIN; 
00042        shared_ptr<TObjArray> HI_GAIN; 
00043        shared_ptr<TObjArray> LO_OFFSET; 
00044        shared_ptr<TObjArray> HI_OFFSET;  
00045        shared_ptr<TObjArray> UNBONDED;     
00046        shared_ptr<TObjArray> PARTBONDED; 
00047        shared_ptr<TObjArray> NOISY;   
00049 
00050        shared_ptr<TObjArray> TR_RANGE;     
00051        shared_ptr<TObjArray> TR_STEP;      
00052        shared_ptr<TObjArray> TR_OFFSET;     
00053        shared_ptr<TObjArray> TR_NOTRIM;    
00055 
00056        shared_ptr<TObjArray> NO_HI;    
00057        shared_ptr<TObjArray> MEAN_ERROR;
00058        shared_ptr<TObjArray> SIG_ERROR;
00059        shared_ptr<TObjArray> STUCK_CELL; 
00060        shared_ptr<TObjArray> DEAD_CELL; 
00061        shared_ptr<TObjArray> TOKEN;     
00062        shared_ptr<TObjArray> RTOKEN;  
00063        shared_ptr<TObjArray> TW_HI;   
00064        shared_ptr<TObjArray> TW_LO;
00065        */
00066 
00067  private:
00068 
00069        map<string, int> defectMap;
00070 
00071 
00072  public:
00073        ArchModuleDefects(vector<shared_ptr<const ModuleDefect> > testDefects); //to be used if there are no persisted defects
00074        ArchModuleDefects(vector<shared_ptr<const ModuleDefect> > testDefects, vector<shared_ptr<TObjArray> > persDefects ); //to be used if there are persisted defects
00075        vector< shared_ptr<TObjArray> > getDefects();  
00076        map <string, int> getMap();
00077        /*Returns all kind of defects for the current test. The TObjArray contains:  defects[i]->getName()
00078                                                                                 defects[i]->getModuleElement().getFirst()
00079                                                                                     defects[i]->getModuleElement().getNChannels()
00080                                             defects[i]->isChipDefect()
00081                                             defects[i]->isLinkDefect()
00082                                             defects[i]->isUnfittable()
00083                                             defects[i]->isUnuseable()
00084                                             defects[i]->isDodgy()
00085        */
00086 
00087        bool IsInMap(const string& defectName) throw();
00088        int IndexInMap(const string& defectName) throw(LogicError);
00089        bool addToMap(const string& curveName) throw();
00090 
00091        void addDefectsToList(shared_ptr<TObjArray> defectlist); 
00092        /* Gets the TObjArray defetclist and appends the deftecs of the current test */
00093       
00094 };
00095 
00096 
00097 #endif

Generated on Thu Jul 15 09:50:42 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5