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

NPtGainTestResult.cpp

00001 #include "NPtGainTestResult.h"
00002 #include "ResponseCurve.h"
00003 #include "FitScanResult.h"
00004 #include "CalChargeVariable.h"
00005 #include "ThresholdVariable.h"
00006 #include "Sct/SctParameters.h"
00007 
00008 #include <sstream>
00009 
00010 //ROOT includes
00011 #include <TF1.h>
00012 #include <TH2.h>
00013 #include <TGraph.h>
00014 
00015 using namespace std;
00016 
00017 namespace SctData {
00018 
00019 NPtGainTestResult::NPtGainTestResult() throw() : specialScanIndex(0), chipData("NPtGainTestResult::ChipData"), channelData("NPtGainTestResult::ChannelData") {
00020     chipData.resize(nChipModule);
00021     channelData.resize(nChannelModule);
00022 }
00023     
00024 NPtGainTestResult::NPtGainTestResult(unsigned int runNumber, const string & moduleName, 
00025                      const CalChargeVariable& testVariable, const ThresholdVariable& scanVariable) throw()
00026     : TestResult(runNumber, moduleName, testVariable, scanVariable), specialScanIndex(0),
00027     chipData("NPtGainTestResult::ChipData"), channelData("NPtGainTestResult::ChannelData") {
00028     chipData.resize(nChipModule);
00029     channelData.resize(nChannelModule);
00030 }
00031 
00032 NPtGainTestResult::~NPtGainTestResult() throw() {
00033     
00034 }
00035 
00036 string NPtGainTestResult::getClassName() const throw() {
00037     return "SctData::NPtGainTestResult";
00038 }
00039 
00040 void NPtGainTestResult::setSpecialScanPointValue(double pointValue) throw(LogicError) {
00041     for (unsigned int i=0; i<data.size(); ++i) {
00042         if (fabs(data[i].testPoint - pointValue) < 10e-6) {
00043             specialScanIndex = i;
00044             return;
00045         }
00046     }
00047     
00048     ostringstream text;
00049     text << "TestResult::setSpecialPoint cannot be set to " << pointValue;
00050     throw InvalidArgumentError( text.str(), __FILE__, __LINE__ );
00051 }
00052 
00053 void NPtGainTestResult::setChannelDataSize(unsigned int i) throw() {
00054     channelData.resize(i);
00055 }
00056 
00057 void NPtGainTestResult::setChipDataSize(unsigned int i) throw() {
00058     chipData.resize(i);
00059 }
00060 }

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