00001 #ifndef NOISEOCCUPANCYTESTRESULT_H
00002 #define NOISEOCCUPANCYTESTRESULT_H
00003
00004 #include "TestResult.h"
00005 #include "Sct/RangedVector.h"
00006 #include <boost/shared_ptr.hpp>
00007
00008 class TF1;
00009 class TGraph;
00010 class TH1;
00011
00012 namespace SctData {
00013 class ThresholdVariable;
00014 class ResponseCurve;
00015 class ChipNOResult;
00016
00020 class ChipNOResult {
00021 public:
00022 ChipNOResult() : mean(0.), rms(0.){;}
00028 ChipNOResult(shared_ptr<TGraph>g, shared_ptr<TF1>f,
00029 double m, double r) :
00030 graph(g), fit(f), mean(m), rms(r) {;}
00031 ~ChipNOResult(){;}
00032 shared_ptr<TGraph> graph;
00033 shared_ptr<TF1> fit;
00034 double mean;
00035 double rms;
00036 double offset;
00037 double getNoise() const throw();
00038 ChipNOResult& operator=(const ChipNOResult&) throw();
00039 };
00040
00041
00042
00043
00051 class NoiseOccupancyTestResult : public TestResult {
00052 public:
00053 NoiseOccupancyTestResult() throw();
00054
00058 NoiseOccupancyTestResult(unsigned int runNumber, const string& moduleName, const ThresholdVariable& scanVariable) throw();
00059
00063 virtual ~NoiseOccupancyTestResult() throw();
00064
00065
00066 virtual string getClassName() const throw();
00067
00071 virtual void addScan(const unsigned scanNumber, const double testPoint = 0) throw (LogicError);
00072
00074 ChipNOResult& getChipResult(unsigned ichip){ return chipResult[ichip];}
00075 const ChipNOResult& getChipResult(unsigned ichip) const { return chipResult[ichip];}
00078 static auto_ptr<TF1> createFitFunction() throw();
00079 private:
00080 RangedVector<ChipNOResult> chipResult;
00081 NoiseOccupancyTestResult& operator=(const NoiseOccupancyTestResult&);
00082 friend class NoiseOccupancyTestResultIOHelper;
00083 };
00084
00085 }
00086
00087 #endif //#ifndef NOISEOCCUPANCYTESTRESULT_H