SctAnalysis::TrimRangeAlgorithm Class Reference

Algorithm considers many trim range scans, possibly over many different ranges, makes fits to graphs, and works out the best trim range to use. More...

#include <TrimRangeAlgorithm.h>

Inheritance diagram for SctAnalysis::TrimRangeAlgorithm:

Inheritance graph
[legend]
Collaboration diagram for SctAnalysis::TrimRangeAlgorithm:

Collaboration graph
[legend]

Public Member Functions

virtual bool canAnalyze () const
 Should check to see if the analysis can be performed.
virtual void analyze ()
 Does the analysis.
virtual void loadData ()
 Called to indicate the algorithm should try and load as much data as it can - perhaps by calling loadAllFits or loadAllRaws().
virtual shared_ptr< SctData::TestResultcreateTestResult () const
 Called if the TestResult needs to be created.
virtual ~TrimRangeAlgorithm () throw ()
 destructor
 TrimRangeAlgorithm (shared_ptr< const TestData > testData, const string &moduleName, const AnalysisAlgorithm &alg) throw ()
 constructor
virtual boost::shared_ptr<
AnalysisAlgorithm
clone (shared_ptr< const TestData > testData, const string &moduleName) const throw ()
 over-ride
vector< TrimRangecreateRanges (const SctData::TestResult &r) throw ()
 find which trim ranges and points are represented in the data
bool allowTrimRangeVariation () const throw ()
 allow trim range variation between chips?
bool allowTrimTargetVariation () const throw ()
 allow trim target variation between chips?

Static Public Member Functions

static void doTrimDataFit (SctData::TrimRangeTestResult::ChipTrimData &chipData) throw ()
 Fit the graph of data points with a linear fit.
static unsigned nTargets () throw ()
 Number of trim targets to consider.
static float firstTarget () throw ()
 First trim target to consider.
static float targetStep () throw ()
 Step between trim targets to consider.

Private Member Functions

 TrimRangeAlgorithm ()

Static Private Member Functions

static shared_ptr< const SctData::TrimRangeTestResult::ChipTrimgetChipTrim (const SctData::TrimRangeTestResult::ChipTrimData &data, const float target, short unsigned irange) throw ()

Static Private Attributes

static bool inMap
 static var to force addition to map
static bool s_targetVariation
static bool s_rangeVariation

Data Structures

class  TrimPoint
class  TrimRange
 holds data about a trim range More...

Detailed Description

Algorithm considers many trim range scans, possibly over many different ranges, makes fits to graphs, and works out the best trim range to use.


Input: TrimRangeTest <RR>Output: TrimRangeTestResult

Definition at line 16 of file TrimRangeAlgorithm.h.


Constructor & Destructor Documentation

virtual SctAnalysis::TrimRangeAlgorithm::~TrimRangeAlgorithm  )  throw () [inline, virtual]
 

destructor

Definition at line 27 of file TrimRangeAlgorithm.h.

SctAnalysis::TrimRangeAlgorithm::TrimRangeAlgorithm shared_ptr< const TestData testData,
const string &  moduleName,
const AnalysisAlgorithm alg
throw () [inline]
 

constructor

Definition at line 31 of file TrimRangeAlgorithm.h.


Member Function Documentation

bool SctAnalysis::TrimRangeAlgorithm::allowTrimRangeVariation  )  const throw () [inline]
 

allow trim range variation between chips?

Definition at line 52 of file TrimRangeAlgorithm.h.

References s_rangeVariation.

bool SctAnalysis::TrimRangeAlgorithm::allowTrimTargetVariation  )  const throw () [inline]
 

allow trim target variation between chips?

Definition at line 54 of file TrimRangeAlgorithm.h.

References s_targetVariation.

void SctAnalysis::TrimRangeAlgorithm::analyze  )  [virtual]
 

Does the analysis.

Should only be called after canAnalyze() returns true. Should not be called is isDone() returns true. It should also do any final initialization of the TestResult which requires data to be present

Exceptions:
any Exception

Implements SctAnalysis::AnalysisAlgorithm.

Definition at line 51 of file TrimRangeAlgorithm.cpp.

References createRanges(), SctAnalysis::debug, SctData::DefectList::defectSeverityEncompassingElement(), SctAnalysis::AnalysisAlgorithm::getFit(), SctAnalysis::AnalysisAlgorithm::getTestResult(), Sct::nChannelChip, Sct::nChipModule, SctData::SERIOUS, and SctData::Stat< T >::valid.

Here is the call graph for this function:

bool SctAnalysis::TrimRangeAlgorithm::canAnalyze  )  const [virtual]
 

Should check to see if the analysis can be performed.

Probably wants to call hasAllRaws() or hasAllFits().

Exceptions:
no exceotions.

Implements SctAnalysis::AnalysisAlgorithm.

Definition at line 43 of file TrimRangeAlgorithm.cpp.

References SctAnalysis::AnalysisAlgorithm::hasAllFits().

Here is the call graph for this function:

shared_ptr< AnalysisAlgorithm > SctAnalysis::TrimRangeAlgorithm::clone shared_ptr< const TestData testData,
const string &  moduleName
const throw () [virtual]
 

over-ride

Implements SctAnalysis::AnalysisAlgorithm.

Definition at line 32 of file TrimRangeAlgorithm.cpp.

std::vector< TrimRangeAlgorithm::TrimRange > SctAnalysis::TrimRangeAlgorithm::createRanges const SctData::TestResult r  )  throw ()
 

find which trim ranges and points are represented in the data

Definition at line 436 of file TrimRangeAlgorithm.cpp.

Referenced by analyze().

shared_ptr< TestResult > SctAnalysis::TrimRangeAlgorithm::createTestResult  )  const [virtual]
 

Called if the TestResult needs to be created.

Exceptions:
nothing. 

Implements SctAnalysis::AnalysisAlgorithm.

Definition at line 47 of file TrimRangeAlgorithm.cpp.

void SctAnalysis::TrimRangeAlgorithm::doTrimDataFit SctData::TrimRangeTestResult::ChipTrimData chipData  )  throw () [static]
 

Fit the graph of data points with a linear fit.

linear least-squares fit

Definition at line 401 of file TrimRangeAlgorithm.cpp.

static float SctAnalysis::TrimRangeAlgorithm::firstTarget  )  throw () [inline, static]
 

First trim target to consider.

Definition at line 44 of file TrimRangeAlgorithm.h.

void SctAnalysis::TrimRangeAlgorithm::loadData  )  [virtual]
 

Called to indicate the algorithm should try and load as much data as it can - perhaps by calling loadAllFits or loadAllRaws().

This is guarenteed to be called shortly before analyze().

Implements SctAnalysis::AnalysisAlgorithm.

Definition at line 39 of file TrimRangeAlgorithm.cpp.

References SctAnalysis::AnalysisAlgorithm::loadAllFits().

Here is the call graph for this function:

static unsigned SctAnalysis::TrimRangeAlgorithm::nTargets  )  throw () [inline, static]
 

Number of trim targets to consider.

Definition at line 42 of file TrimRangeAlgorithm.h.

static float SctAnalysis::TrimRangeAlgorithm::targetStep  )  throw () [inline, static]
 

Step between trim targets to consider.

Definition at line 46 of file TrimRangeAlgorithm.h.


Field Documentation

bool SctAnalysis::TrimRangeAlgorithm::inMap [static, private]
 

static var to force addition to map

Definition at line 86 of file TrimRangeAlgorithm.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:04:11 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6