#include <Fitter.h>
Collaboration diagram for SctFitter::Fitter:
Public Member Functions | |
void | go (unsigned nWorker) throw (IsException) |
The command to start the workers. | |
const char * | status () const throw () |
Get the status information. | |
virtual char * | status (FitterIStatus *status) throw () |
As for getStatus, but available over IPC. | |
void | setFitOptions (const string opt) throw (LogicError) |
set the fit option over IPC. | |
virtual void | setFitOptions (FitterIStatus *status, char *opt) throw () |
as for setFitOptions, but over IPC. | |
virtual void | setFitStrategy (FitterIStatus *status, char *strategy) throw () |
set the fit option over IPC. | |
virtual char * | getFitStrategy (FitterIStatus *status) throw () |
Finds the FitStrategy name. | |
void | fitAll (FitterIStatus *status) throw () |
void | fit (FitterIStatus *status, char *name) throw () |
Fit a named RawScanResult from IS. | |
virtual char * | getFitOptions (FitterIStatus *status) throw () |
Finds the FitStrategy options. | |
long | busy (FitterIStatus *status) |
number of busy workers | |
long | queueLength (FitterIStatus *status) |
number of jobs in the queue | |
long | nFitsDone () const throw () |
returns the number of fits done so far; | |
long | nFitsDone (FitterIStatus *status) throw () |
returns the number of fits done so far over ipc; | |
long | nFitErrors () const throw () |
returns the number of fit errors so far; | |
long | nFitErrors (FitterIStatus *status) throw () |
returns the number of fit errors so far over ipc; | |
const char * | lastScan () const throw () |
Get the name of the last scan which was fitted;. | |
char * | lastScan (FitterIStatus *status) throw () |
Get the name of the last scan which was fitted over ipc;. | |
void | useAnalyticAlgorithm (FitterIStatus *_status, ilu_Boolean use) |
Determine whether to use the analytic fit algorithm. | |
bool | isUsingAnalyticAlgorithm () const |
Return true if we're using analytic fit algorithms. | |
ilu_Boolean | isUsingAnalyticAlgorithm (FitterIStatus *_status) |
Return true if we're using analytic fit algorithms. | |
void | setFitStrategy (string name) throw (LogicError) |
Set the stragegy from a name the the FitStrategy map. | |
FitStrategy & | getFitStrategy () const throw (LogicError) |
get the strategy. Throws an error if none is defined. | |
void | incrementFitErrors () throw () |
Increments the number of fit errors by 1. | |
void | incrementFitsDone () throw () |
Increments the number of fits done by 1. | |
void | scanDone (double time) throw () |
Called by the workers to add to the total amount of scan time. | |
void | addIOTime (double time) throw () |
Called to add to IO time. | |
double | getAverageTimePerScan () const throw () |
Algorithm may be complex! Check actual code. | |
Static Public Member Functions | |
Fitter & | instance () |
Gets a reference to the instance of the Fitter. | |
Fitter & | initialize (const string &fitStrategyName="RootFitStrategy") throw (ConfigurationException) |
Initialize the Fitter instance. | |
void | doFits (ISCallbackInfo *isc) throw (IsException, LogicError) |
The infoReceiver callback function must take a static function as an argument. | |
IPCServer & | getFitterServer () throw () |
Get the Fitter IPC server. | |
Data Fields | |
FitterWorkerGroup * | workergroup |
Group of workers which do the actual fitting. | |
Private Member Functions | |
Fitter (const string &fitStrategyName) throw (ConfigurationException) | |
singleton | |
~Fitter () throw () | |
private destructor | |
void | setLastScanName (const char *name) |
update record of last scan attempted. | |
Private Attributes | |
long | m_nFitsDone |
long | m_nFitErrors |
long | m_nScans |
double | m_scanTimeTaken |
double | m_ioTimeTaken |
boost::recursive_mutex | counterMutex |
Used to lock access to all the counters. | |
string | m_scan |
string | m_status |
pointer to char containing the status: cached so that we don't have to make lots of char*'s. | |
FitStrategy * | m_fitStrategy |
Pointer to the fit strategy. | |
std::auto_ptr< ISInfoReceiver > | m_infoReceiver |
An InfoReveiver for RawRODData objects. | |
Static Private Attributes | |
Fitter * | fitter |
Friends | |
class | FitterWorkerGroup |
FitterWorker is allowed to update stuff. |
This service subscribes to an input IS server, receiving new RawScanResult objects. It then fits a function (dependant on the ScanType) to chips, strips, etc. and outputs a FitScanResult object to the output IS server.
Some status information about the Fitter is available via IPC request.
Definition at line 40 of file Fitter.h.
|
singleton
Definition at line 42 of file Fitter.cpp. |
|
private destructor
Definition at line 54 of file Fitter.cpp. |
|
Called to add to IO time. Assumes that main thread does IO and is running concurrently with workers. Definition at line 227 of file Fitter.cpp. |
|
number of busy workers
Definition at line 268 of file Fitter.cpp. References SctService::WorkerGroup< string >::busy(), counterMutex, and workergroup. |
Here is the call graph for this function:
|
The infoReceiver callback function must take a static function as an argument.
This function simply calls doFits on the parameter or `rock', which is set to be `this' (Fitter). Definition at line 78 of file Fitter.cpp. References SctService::WorkerGroup< string >::push(), and workergroup. |
Here is the call graph for this function:
|
Fit a named RawScanResult from IS.
Definition at line 87 of file Fitter.cpp. |
|
Algorithm may be complex! Check actual code.
Definition at line 233 of file Fitter.cpp. |
|
Finds the FitStrategy options. Makes a new char[] which ipc then deletes. Definition at line 103 of file Fitter.cpp. |
|
get the strategy. Throws an error if none is defined.
Definition at line 287 of file Fitter.cpp. |
|
Finds the FitStrategy name. Makes a new char[] which ipc then deletes. Definition at line 163 of file Fitter.cpp. Referenced by SctFitter::FitAlgorithm::doFit(). |
|
Get the Fitter IPC server.
Definition at line 56 of file Fitter.cpp. |
|
The command to start the workers.
Definition at line 63 of file Fitter.cpp. |
|
Increments the number of fit errors by 1.
Definition at line 211 of file Fitter.cpp. Referenced by SctFitter::FitAlgorithm::doFit(). |
|
Increments the number of fits done by 1.
Definition at line 216 of file Fitter.cpp. Referenced by SctFitter::FitAlgorithm::doFit(). |
|
Initialize the Fitter instance.
Definition at line 33 of file Fitter.cpp. References setFitStrategy(). Referenced by instance(). |
Here is the call graph for this function:
|
Gets a reference to the instance of the Fitter. If it hasn't been initialized, it calls initialize() first Definition at line 27 of file Fitter.cpp. References initialize(). |
Here is the call graph for this function:
|
Return true if we're using analytic fit algorithms.
Definition at line 157 of file Fitter.cpp. References counterMutex, and isUsingAnalyticAlgorithm(). |
Here is the call graph for this function:
|
Return true if we're using analytic fit algorithms.
Definition at line 152 of file Fitter.cpp. References counterMutex. Referenced by isUsingAnalyticAlgorithm(). |
|
Get the name of the last scan which was fitted over ipc;.
Definition at line 279 of file Fitter.cpp. |
|
Get the name of the last scan which was fitted;.
Definition at line 274 of file Fitter.cpp. |
|
returns the number of fit errors so far over ipc;
Definition at line 256 of file Fitter.cpp. |
|
returns the number of fit errors so far;
Definition at line 245 of file Fitter.cpp. |
|
returns the number of fits done so far over ipc;
Definition at line 250 of file Fitter.cpp. |
|
returns the number of fits done so far;
Definition at line 240 of file Fitter.cpp. |
|
number of jobs in the queue
Definition at line 262 of file Fitter.cpp. References counterMutex, SctService::WorkerGroup< string >::queueSize(), and workergroup. |
Here is the call graph for this function:
|
Called by the workers to add to the total amount of scan time.
Definition at line 221 of file Fitter.cpp. |
|
as for setFitOptions, but over IPC.
Definition at line 132 of file Fitter.cpp. |
|
set the fit option over IPC. (asynchronous). Passes string on to FitStrategy;
Definition at line 127 of file Fitter.cpp. |
|
Set the stragegy from a name the the FitStrategy map.
Definition at line 294 of file Fitter.cpp. |
|
set the fit option over IPC. (asynchronous).
Definition at line 177 of file Fitter.cpp. Referenced by initialize(). |
|
update record of last scan attempted.
|
|
As for getStatus, but available over IPC. Makes a new char[] which ipc then deletes.
Definition at line 117 of file Fitter.cpp. |
|
Get the status information.
Definition at line 191 of file Fitter.cpp. |
|
Determine whether to use the analytic fit algorithm. Default is false Definition at line 143 of file Fitter.cpp. References counterMutex. |
|
FitterWorker is allowed to update stuff.
|
|
Used to lock access to all the counters.
Definition at line 215 of file Fitter.h. Referenced by busy(), isUsingAnalyticAlgorithm(), queueLength(), and useAnalyticAlgorithm(). |
|
Pointer to the fit strategy.
|
|
An InfoReveiver for RawRODData objects.
|
|
pointer to char containing the status: cached so that we don't have to make lots of char*'s.
|
|
Group of workers which do the actual fitting.
Definition at line 171 of file Fitter.h. Referenced by busy(), doFits(), and queueLength(). |