#include <AnalysisAlgorithm.h>
Inheritance diagram for SctAnalysis::AnalysisAlgorithm:
Public Member Functions | |
virtual | ~AnalysisAlgorithm () throw () |
Destructor. | |
shared_ptr< const TestData > | getTestData () const |
get a pointer to the cached TestData; | |
void | setTestData (shared_ptr< const TestData > testdata) |
set TestData - used for updating TestData. | |
const std::string | getModuleName () const throw () |
Get the name of the module which this algorithm is working on. | |
virtual boost::shared_ptr< AnalysisAlgorithm > | clone (shared_ptr< const TestData > testData, const string &moduleName) const =0 throw () |
Must be overridden by sub-classes. | |
void | addFitScanResult (shared_ptr< Sct::IOName > name) |
Add a named FitScanResult. | |
void | addRawScanResult (shared_ptr< Sct::IOName > name) |
Add a named RawScanResult. | |
void | checkForZeroTriggerBins () |
mark result as problem if there are bins containing no triggers - which might suggest a ROD problem | |
void | checkTestResultExists () |
Used by other methods to ensure that a TestResult has been made. | |
bool | isDone () const throw () |
Method indicates when a particular analysis is finished. | |
void | finish () |
Publishes the TestResult, and sets `done'. | |
boost::shared_ptr< SctData::TestResult > | getTestResult () const |
Access to the TestResult if required. | |
boost::recursive_mutex & | getMutex () const |
Access the mutex. | |
virtual bool | canAnalyze () const =0 |
Should check to see if the analysis can be performed. | |
virtual void | analyze ()=0 |
Does the analysis. | |
virtual void | loadData ()=0 |
Called to indicate the algorithm should try and load as much data as it can - perhaps by calling loadAllFits or loadAllRaws(). | |
void | setFit (unsigned index, const std::string &fit) |
Method to use only when expert re-analysing data. | |
void | setRaw (unsigned index, const std::string &raw) |
Method to use only when expert re-analysing data. | |
Status and timing methods | |
| |
void | addFailure () |
Adds a pass for this test. | |
void | addPass () |
Adds a failure for this test. | |
void | addIOTime (double ioTime) |
Adds some time spent doing I/O. | |
void | addAnalysisTime (double time) |
Adds to the analysis time, and increments the number of analyses successfully done. | |
void | addOverheadTime (double time) |
Adds to the overhead time. | |
string | getStatus () const |
Returns a string giving the status of this algorithm including some info how long things are taking. | |
Protected Member Functions | |
AnalysisAlgorithm (shared_ptr< const TestData > testData, const string &moduleName, const AnalysisAlgorithm &prototype) throw () | |
Default constructor, to be used in creation of map. | |
virtual shared_ptr< SctData::TestResult > | createTestResult () const =0 |
Called if the TestResult needs to be created. | |
void | loadAllFits () |
Loads all the fits it can. | |
void | loadAllRaws () |
Loads all the raws it can. | |
bool | hasAllRaws () const |
Returns true if all the RawScanResult objects are available in IS. | |
bool | hasAllFits () const |
Returns true if all the FitScanResult objects are available in IS. | |
shared_ptr< SctData::RawScanResult > | getRaw (unsigned int index) const |
Returns a shared pointer to the RawScanResult at index. | |
shared_ptr< SctData::FitScanResult > | getFit (unsigned int index) const |
Returns a shared pointer to the RawScanResult at index. | |
void | mergeDefects () |
Merges all the defects from the FitScanResults into the TestResult. | |
AnalysisAlgorithm () | |
Private Member Functions | |
void | initializeTestResult () |
Useful function that initializes TestResult from Test and module name. | |
Private Attributes | |
const string | m_modulename |
name of the module being worked on. | |
shared_ptr< SctData::TestResult > | m_result |
pointer to the result. | |
shared_ptr< const TestData > | m_test |
pointer to the testdata. | |
vector< ScanData > | scanData |
bool | m_done |
a vector of ScanData objects true if finish() has been called. | |
boost::recursive_mutex | m_access |
access to the algorithm can be locked for thread-safeness. | |
boost::recursive_mutex | m_status_access |
access to the status information | |
const AnalysisAlgorithm & | prototype |
A reference to the prototype. | |
double | ioTime |
The total time spent doing I/O. | |
double | analysisTime |
The total time spent doing analysis. | |
double | overheadTime |
The time spent just getting stuff, checking it etc. | |
unsigned int | nCalls |
The number of times this alg has been accessed. | |
unsigned int | nAnalyses |
The number of analyses performed. | |
unsigned int | nPassed |
The number of tests which passed. | |
unsigned int | nFailed |
The number of analyses which failed. | |
Data Structures | |
class | ScanData |
Definition at line 33 of file AnalysisAlgorithm.h.
|
Destructor.
Definition at line 44 of file AnalysisAlgorithm.cpp. |
|
Default constructor, to be used in creation of map.
Definition at line 37 of file AnalysisAlgorithm.cpp. |
|
Adds to the analysis time, and increments the number of analyses successfully done.
Definition at line 276 of file AnalysisAlgorithm.h. References analysisTime, m_status_access, nAnalyses, and prototype. |
|
Adds a pass for this test.
Definition at line 266 of file AnalysisAlgorithm.h. References m_status_access, nFailed, and prototype. Referenced by finish(). |
|
Add a named FitScanResult.
|
|
Adds some time spent doing I/O. The number of IO operations is assumed to be the same as the number of analyses
Definition at line 271 of file AnalysisAlgorithm.h. References ioTime, m_status_access, and prototype. |
|
Adds to the overhead time. It is assumed there is 1 overhead time per Fit or Raw ScanResult
Definition at line 282 of file AnalysisAlgorithm.h. References m_status_access, nCalls, overheadTime, and prototype. |
|
Adds a failure for this test.
Definition at line 261 of file AnalysisAlgorithm.h. References m_status_access, nPassed, and prototype. Referenced by finish(). |
|
Add a named RawScanResult.
|
|
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
Implemented in SctAnalysis::ChipCounterAlgorithm, SctAnalysis::DoubleTriggerNoiseAlgorithm, SctAnalysis::FullBypassAlgorithm, SctAnalysis::MarkSpaceRatioAlgorithm, SctAnalysis::NMaskAlgorithm, SctAnalysis::NoiseOccupancyAlgorithm, SctAnalysis::NPtGainAlgorithm, SctAnalysis::PipelineAlgorithm, SctAnalysis::PreTriggerNoiseAlgorithm, SctAnalysis::RxDelayAlgorithm, SctAnalysis::RxThresholdAlgorithm, SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm, SctAnalysis::StrobeDelayAlgorithm, SctAnalysis::TimeWalkAlgorithm, SctAnalysis::TrimRangeAlgorithm, and SctAnalysis::TxCurrentAlgorithm. |
|
Should check to see if the analysis can be performed. Probably wants to call hasAllRaws() or hasAllFits().
Implemented in SctAnalysis::ChipCounterAlgorithm, SctAnalysis::DoubleTriggerNoiseAlgorithm, SctAnalysis::FullBypassAlgorithm, SctAnalysis::MarkSpaceRatioAlgorithm, SctAnalysis::NMaskAlgorithm, SctAnalysis::NoiseOccupancyAlgorithm, SctAnalysis::NPtGainAlgorithm, SctAnalysis::PipelineAlgorithm, SctAnalysis::PreTriggerNoiseAlgorithm, SctAnalysis::RxDelayAlgorithm, SctAnalysis::RxThresholdAlgorithm, SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm, SctAnalysis::StrobeDelayAlgorithm, SctAnalysis::TimeWalkAlgorithm, SctAnalysis::TrimRangeAlgorithm, and SctAnalysis::TxCurrentAlgorithm. |
|
mark result as problem if there are bins containing no triggers - which might suggest a ROD problem
Definition at line 145 of file AnalysisAlgorithm.cpp. References SctData::ScanPoints::getNEvents(), SctData::ScanPoints::getNPoints(), m_result, and scanData. Referenced by finish(). Here is the call graph for this function: ![]() |
|
Used by other methods to ensure that a TestResult has been made. Call createTestResult if it doesn't then initializes it.
Definition at line 60 of file AnalysisAlgorithm.cpp. References createTestResult(), initializeTestResult(), and m_result. Referenced by finish(). Here is the call graph for this function: ![]() |
|
Must be overridden by sub-classes. Returns a shared pointer to a concrete AnalysisAlgorithm of the correct type. Primarily used by the map to get an AnalysisAlgorithm of the correct type. Implemented in SctAnalysis::ChipCounterAlgorithm, SctAnalysis::DoubleTriggerNoiseAlgorithm, SctAnalysis::FullBypassAlgorithm, SctAnalysis::MarkSpaceRatioAlgorithm, SctAnalysis::NMaskAlgorithm, SctAnalysis::NoiseOccupancyAlgorithm, SctAnalysis::NPtGainAlgorithm, SctAnalysis::PipelineAlgorithm, SctAnalysis::PreTriggerNoiseAlgorithm, SctAnalysis::RxDelayAlgorithm, SctAnalysis::RxThresholdAlgorithm, SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm, SctAnalysis::StrobeDelayAlgorithm, SctAnalysis::TimeWalkAlgorithm, SctAnalysis::TrimRangeAlgorithm, and SctAnalysis::TxCurrentAlgorithm. |
|
|
Publishes the TestResult, and sets `done'.
Definition at line 176 of file AnalysisAlgorithm.cpp. References addFailure(), Sct::ISUtilities::addOrUpdateOrThrow(), addPass(), checkForZeroTriggerBins(), checkTestResultExists(), TestSummaryIS::dataString, SctAnalysis::AnalysisService::getOutputISServerName(), getTestData(), SctData::ISTestSummary::ISSummaryManager::instance(), SctData::TestSummary::SummaryManager::instance(), Sct::ISProxy::IOManagerISProxy::instance(), SctAnalysis::AnalysisService::instance(), m_done, m_result, and Sct::Throwable::sendToMrs(). Here is the call graph for this function: ![]() |
|
Returns a shared pointer to the RawScanResult at index. Guarenteed not to run a null pointer
Definition at line 140 of file AnalysisAlgorithm.cpp. References scanData. Referenced by SctAnalysis::TrimRangeAlgorithm::analyze(), SctAnalysis::TimeWalkAlgorithm::analyze(), SctAnalysis::StrobeDelayAlgorithm::analyze(), SctAnalysis::NPtGainAlgorithm::analyze(), SctAnalysis::NoiseOccupancyAlgorithm::analyze(), and SctAnalysis::NPtGainAlgorithm::mergeDefects(). |
|
Get the name of the module which this algorithm is working on.
Definition at line 53 of file AnalysisAlgorithm.h. References m_modulename. |
|
Access the mutex.
Definition at line 100 of file AnalysisAlgorithm.h. References m_access. |
|
Returns a shared pointer to the RawScanResult at index. Guarenteed not to run a null pointer
Definition at line 135 of file AnalysisAlgorithm.cpp. References scanData. Referenced by SctAnalysis::TxCurrentAlgorithm::analyze(), SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm::analyze(), SctAnalysis::RxThresholdAlgorithm::analyze(), SctAnalysis::RxDelayAlgorithm::analyze(), SctAnalysis::PreTriggerNoiseAlgorithm::analyze(), SctAnalysis::PipelineAlgorithm::analyze(), SctAnalysis::NoiseOccupancyAlgorithm::analyze(), SctAnalysis::NMaskAlgorithm::analyze(), SctAnalysis::MarkSpaceRatioAlgorithm::analyze(), SctAnalysis::FullBypassAlgorithm::analyze(), SctAnalysis::DoubleTriggerNoiseAlgorithm::analyze(), and SctAnalysis::ChipCounterAlgorithm::analyze(). |
|
Returns a string giving the status of this algorithm including some info how long things are taking.
Definition at line 224 of file AnalysisAlgorithm.cpp. References analysisTime, ioTime, m_status_access, nAnalyses, nCalls, nFailed, nPassed, overheadTime, and prototype. |
|
get a pointer to the cached TestData;
Definition at line 50 of file AnalysisAlgorithm.cpp. References m_test. Referenced by finish(), and initializeTestResult(). |
|
Access to the TestResult if required.
Definition at line 95 of file AnalysisAlgorithm.h. References m_result. Referenced by SctAnalysis::TxCurrentAlgorithm::analyze(), SctAnalysis::TrimRangeAlgorithm::analyze(), SctAnalysis::TimeWalkAlgorithm::analyze(), SctAnalysis::StrobeDelayAlgorithm::analyze(), SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm::analyze(), SctAnalysis::RxThresholdAlgorithm::analyze(), SctAnalysis::RxDelayAlgorithm::analyze(), SctAnalysis::PreTriggerNoiseAlgorithm::analyze(), SctAnalysis::PipelineAlgorithm::analyze(), SctAnalysis::NPtGainAlgorithm::analyze(), SctAnalysis::NoiseOccupancyAlgorithm::analyze(), SctAnalysis::NMaskAlgorithm::analyze(), SctAnalysis::MarkSpaceRatioAlgorithm::analyze(), SctAnalysis::FullBypassAlgorithm::analyze(), SctAnalysis::DoubleTriggerNoiseAlgorithm::analyze(), and SctAnalysis::ChipCounterAlgorithm::analyze(). |
|
Returns true if all the FitScanResult objects are available in IS.
Definition at line 113 of file AnalysisAlgorithm.cpp. References scanData. Referenced by SctAnalysis::TrimRangeAlgorithm::canAnalyze(), SctAnalysis::TimeWalkAlgorithm::canAnalyze(), SctAnalysis::StrobeDelayAlgorithm::canAnalyze(), SctAnalysis::NPtGainAlgorithm::canAnalyze(), and SctAnalysis::NoiseOccupancyAlgorithm::canAnalyze(). |
|
Returns true if all the RawScanResult objects are available in IS.
Definition at line 106 of file AnalysisAlgorithm.cpp. References scanData. Referenced by SctAnalysis::TxCurrentAlgorithm::canAnalyze(), SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm::canAnalyze(), SctAnalysis::RxThresholdAlgorithm::canAnalyze(), SctAnalysis::RxDelayAlgorithm::canAnalyze(), SctAnalysis::PreTriggerNoiseAlgorithm::canAnalyze(), SctAnalysis::PipelineAlgorithm::canAnalyze(), SctAnalysis::NoiseOccupancyAlgorithm::canAnalyze(), SctAnalysis::NMaskAlgorithm::canAnalyze(), SctAnalysis::MarkSpaceRatioAlgorithm::canAnalyze(), SctAnalysis::FullBypassAlgorithm::canAnalyze(), SctAnalysis::DoubleTriggerNoiseAlgorithm::canAnalyze(), and SctAnalysis::ChipCounterAlgorithm::canAnalyze(). |
|
Useful function that initializes TestResult from Test and module name. Sets up stuff that can be done here. Anything else must be done by the algorithm in analyze.
Definition at line 69 of file AnalysisAlgorithm.cpp. References SctData::ConfigurationVariableIOHelper::getFromTypeRep(), getTestData(), m_modulename, and m_result. Referenced by checkTestResultExists(). Here is the call graph for this function: ![]() |
|
Method indicates when a particular analysis is finished.
Definition at line 85 of file AnalysisAlgorithm.h. References m_done. |
|
Loads all the fits it can.
Definition at line 128 of file AnalysisAlgorithm.cpp. References scanData. Referenced by SctAnalysis::TrimRangeAlgorithm::loadData(), SctAnalysis::TimeWalkAlgorithm::loadData(), SctAnalysis::StrobeDelayAlgorithm::loadData(), SctAnalysis::NPtGainAlgorithm::loadData(), and SctAnalysis::NoiseOccupancyAlgorithm::loadData(). |
|
Loads all the raws it can.
Definition at line 120 of file AnalysisAlgorithm.cpp. References scanData. Referenced by SctAnalysis::TxCurrentAlgorithm::loadData(), SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm::loadData(), SctAnalysis::RxThresholdAlgorithm::loadData(), SctAnalysis::RxDelayAlgorithm::loadData(), SctAnalysis::PreTriggerNoiseAlgorithm::loadData(), SctAnalysis::PipelineAlgorithm::loadData(), SctAnalysis::NoiseOccupancyAlgorithm::loadData(), SctAnalysis::NMaskAlgorithm::loadData(), SctAnalysis::MarkSpaceRatioAlgorithm::loadData(), SctAnalysis::FullBypassAlgorithm::loadData(), SctAnalysis::DoubleTriggerNoiseAlgorithm::loadData(), and SctAnalysis::ChipCounterAlgorithm::loadData(). |
|
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(). Implemented in SctAnalysis::ChipCounterAlgorithm, SctAnalysis::DoubleTriggerNoiseAlgorithm, SctAnalysis::FullBypassAlgorithm, SctAnalysis::MarkSpaceRatioAlgorithm, SctAnalysis::NMaskAlgorithm, SctAnalysis::NoiseOccupancyAlgorithm, SctAnalysis::NPtGainAlgorithm, SctAnalysis::PipelineAlgorithm, SctAnalysis::PreTriggerNoiseAlgorithm, SctAnalysis::RxDelayAlgorithm, SctAnalysis::RxThresholdAlgorithm, SctAnalysis::RxThresholdBasedOnConfigRegisterAlgorithm, SctAnalysis::StrobeDelayAlgorithm, SctAnalysis::TimeWalkAlgorithm, SctAnalysis::TrimRangeAlgorithm, and SctAnalysis::TxCurrentAlgorithm. |
|
Merges all the defects from the FitScanResults into the TestResult. Utility method for algorithms. Ignores FitScanResults that don't exist. Does nothing if the TestResult doesn't exist. Definition at line 167 of file AnalysisAlgorithm.cpp. |
|
Method to use only when expert re-analysing data.
Definition at line 96 of file AnalysisAlgorithm.cpp. References scanData. |
|
Method to use only when expert re-analysing data.
Definition at line 101 of file AnalysisAlgorithm.cpp. References scanData. |
|
set TestData - used for updating TestData. .. Definition at line 55 of file AnalysisAlgorithm.cpp. References m_test. |
|
The total time spent doing analysis.
Definition at line 253 of file AnalysisAlgorithm.h. Referenced by addAnalysisTime(), and getStatus(). |
|
The total time spent doing I/O.
Definition at line 252 of file AnalysisAlgorithm.h. Referenced by addIOTime(), and getStatus(). |
|
access to the algorithm can be locked for thread-safeness.
Definition at line 247 of file AnalysisAlgorithm.h. Referenced by getMutex(), and ~AnalysisAlgorithm(). |
|
a vector of ScanData objects true if finish() has been called.
Definition at line 246 of file AnalysisAlgorithm.h. |
|
name of the module being worked on.
Definition at line 242 of file AnalysisAlgorithm.h. Referenced by getModuleName(), and initializeTestResult(). |
|
pointer to the result.
Definition at line 243 of file AnalysisAlgorithm.h. Referenced by checkForZeroTriggerBins(), checkTestResultExists(), finish(), getTestResult(), initializeTestResult(), mergeDefects(), and ~AnalysisAlgorithm(). |
|
access to the status information
Definition at line 250 of file AnalysisAlgorithm.h. Referenced by addAnalysisTime(), addFailure(), addIOTime(), addOverheadTime(), addPass(), and getStatus(). |
|
pointer to the testdata.
Definition at line 244 of file AnalysisAlgorithm.h. Referenced by getTestData(), and setTestData(). |
|
The number of analyses performed.
Definition at line 256 of file AnalysisAlgorithm.h. Referenced by addAnalysisTime(), and getStatus(). |
|
The number of times this alg has been accessed.
Definition at line 255 of file AnalysisAlgorithm.h. Referenced by addOverheadTime(), and getStatus(). |
|
The number of analyses which failed.
Definition at line 258 of file AnalysisAlgorithm.h. Referenced by addFailure(), and getStatus(). |
|
The number of tests which passed.
Definition at line 257 of file AnalysisAlgorithm.h. Referenced by addPass(), and getStatus(). |
|
The time spent just getting stuff, checking it etc.
Definition at line 254 of file AnalysisAlgorithm.h. Referenced by addOverheadTime(), and getStatus(). |
|
A reference to the prototype.
Definition at line 251 of file AnalysisAlgorithm.h. Referenced by addAnalysisTime(), addFailure(), addIOTime(), addOverheadTime(), addPass(), and getStatus(). |