#include <Fitter.h>
Collaboration diagram for SctFitter::Fitter:

Public Member Functions | |
| void | go () throw (IsException) |
| The command to start the workers. | |
| FitStrategy & | internal_getFitStrategy () const throw (LogicError) |
| get the strategy. Throws an error if none is defined. | |
| virtual char * | status () throw () |
| As for getStatus, but available over IPC. | |
| char * | lastScan () throw () |
| Get the name of the last scan which was fitted over ipc;. | |
| virtual char * | getFitOptions () throw () |
| Finds the FitStrategy options. | |
| virtual char * | getFitStrategy () throw () |
| Finds the FitStrategy name. | |
| virtual void | setFitOptions (const char *opt) throw () |
| as for setFitOptions, but over IPC. | |
| virtual void | setFitStrategy (const char *strategy) throw () |
| set the fit option over IPC. | |
| void | fitAll () throw () |
| void | fit (const char *name) throw () |
| Fit a named RawScanResult from IS. | |
| long | busy () |
| number of busy workers | |
| long | queueLength () |
| number of jobs in the queue | |
| long | nFitsDone () throw () |
| returns the number of fits done so far over ipc; | |
| long | nFitErrors () throw () |
| returns the number of fit errors so far over ipc; | |
| void | setFifo (bool) |
| set true for FIFO, false for FILO - see WorkerGroup for pros and cons! | |
| bool | isFifo () |
| set true for FIFO, false for FILO - see WorkerGroup for pros and cons! | |
| FitterI::StringList * | listFitAlgorithms () |
| list available fit algorithms for CORBA | |
| FitterI::StringList * | listFitStrategies () |
| list available fit strategies for CORBA | |
| void | setDebug (CORBA::Boolean value) |
| set debug flag | |
| bool | debug () |
| get debug flag | |
| 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. | |
| std::string | getOutputIsServer () const |
| Server to write fits to. | |
Static Public Member Functions | |
| static Fitter & | instance () |
| Gets a reference to the instance of the Fitter. | |
| static Fitter & | initialize (FitterArguments args) throw (ConfigurationException) |
| Initialize the Fitter instance. | |
| static IPCServer & | getFitterServer () throw () |
| Get the Fitter IPC server. | |
Private Member Functions | |
| void | shutdown () |
| The following method is a new requirement of IPCNamedObjects under the omni-orb. | |
| Fitter (FitterArguments args) throw (ConfigurationException) | |
| singleton | |
| ~Fitter () throw () | |
| private destructor | |
| std::string | internal_status () const throw () |
| Get the status information. | |
| std::string | internal_lastScan () const throw () |
| Get the name of the last scan which was fitted;. | |
| void | internal_setFitOptions (const string &opt) throw (LogicError) |
| void | internal_setFitStrategy (const string &name) throw (LogicError) |
| Set the stragegy from a name the the FitStrategy map. | |
| long | internal_nFitsDone () const throw () |
| returns the number of fits done so far; | |
| long | internal_nFitErrors () const throw () |
| returns the number of fit errors so far; | |
| void | setLastScanName (const std::string &name) |
| update record of last scan attempted. | |
| void | updateSubscriptions () |
Static Private Member Functions | |
| static void | doFits (ISCallbackInfo *isc) throw (IsException, LogicError) |
| The infoReceiver callback function must take a static function as an argument. | |
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. | |
| FitterWorkerGroup * | workergroup |
| Group of workers which do the actual fitting. | |
| std::auto_ptr< ISInfoReceiver > | m_infoReceiver |
| An InfoReveiver for RawRODData objects. | |
| FitterArguments | m_args |
Static Private Attributes | |
| static 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 43 of file Fitter.h.
|
|
singleton
Definition at line 54 of file Fitter.cpp. References Sct::SctNames::Mrs(), and Sct::Throwable::sendToMrs(). Here is the call graph for this function: ![]() |
|
|
private destructor
Definition at line 81 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 307 of file Fitter.cpp. |
|
|
number of busy workers
Definition at line 350 of file Fitter.cpp. References SctService::WorkerGroup< T >::busy(), counterMutex, and workergroup. Here is the call graph for this function: ![]() |
|
|
get debug flag
Definition at line 287 of file Fitter.cpp. References SctFitter::FitterWorkerGroup::debug(), and workergroup. Referenced by SctFitter::FitAlgorithm::debug(). 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 131 of file Fitter.cpp. Referenced by updateSubscriptions(). |
|
|
Fit a named RawScanResult from IS.
Definition at line 141 of file Fitter.cpp. |
|
|
Algorithm may be complex! Check actual code.
Definition at line 313 of file Fitter.cpp. References counterMutex, m_ioTimeTaken, m_nScans, m_scanTimeTaken, SctService::WorkerGroup< T >::nWorkers(), and workergroup. Here is the call graph for this function: ![]() |
|
|
Finds the FitStrategy options. Makes a new char[] which ipc then deletes. Definition at line 177 of file Fitter.cpp. References Sct::copyStringToCorba(), counterMutex, and internal_getFitStrategy(). Here is the call graph for this function: ![]() |
|
|
Finds the FitStrategy name. Makes a new char[] which ipc then deletes. Definition at line 204 of file Fitter.cpp. References Sct::copyStringToCorba(), counterMutex, and internal_getFitStrategy(). Here is the call graph for this function: ![]() |
|
|
Get the Fitter IPC server.
Definition at line 88 of file Fitter.cpp. Referenced by shutdown(). |
|
|
Server to write fits to. .. Definition at line 84 of file Fitter.cpp. References SctService::Arguments::getOutputISServer(), and m_args. Referenced by fitAll(). Here is the call graph for this function: ![]() |
|
|
The command to start the workers.
Definition at line 95 of file Fitter.cpp. References fitAll(), SctService::Arguments::getNWorkers(), SctService::WorkerGroup< T >::go(), m_args, SctService::Arguments::recoveryMode(), and workergroup. Here is the call graph for this function: ![]() |
|
|
Increments the number of fit errors by 1.
Definition at line 291 of file Fitter.cpp. References counterMutex, and m_nFitErrors. |
|
|
Increments the number of fits done by 1.
Definition at line 296 of file Fitter.cpp. References counterMutex, and m_nFitsDone. |
|
|
Initialize the Fitter instance.
Definition at line 44 of file Fitter.cpp. |
|
|
Gets a reference to the instance of the Fitter. If it hasn't been initialized, it calls initialize() first Definition at line 38 of file Fitter.cpp. References fitter. Referenced by SctFitter::FitAlgorithm::debug(). |
|
|
get the strategy. Throws an error if none is defined.
Definition at line 374 of file Fitter.cpp. References counterMutex, and m_fitStrategy. Referenced by getFitOptions(), getFitStrategy(), and internal_status(). |
|
|
Get the name of the last scan which was fitted;.
Definition at line 355 of file Fitter.cpp. References counterMutex, and m_scan. Referenced by internal_status(). |
|
|
returns the number of fit errors so far;
Definition at line 326 of file Fitter.cpp. References counterMutex, and m_nFitErrors. Referenced by internal_status(), and nFitErrors(). |
|
|
returns the number of fits done so far;
Definition at line 321 of file Fitter.cpp. References counterMutex, and m_nFitsDone. Referenced by internal_status(), and nFitsDone(). |
|
|
Set the stragegy from a name the the FitStrategy map.
Definition at line 381 of file Fitter.cpp. References SctFitter::FitStrategyFactory::getStrategy(), and SctFitter::FitStrategyFactory::instance(). Here is the call graph for this function: ![]() |
|
|
Get the status information.
Definition at line 233 of file Fitter.cpp. References SctService::WorkerGroup< T >::busy(), counterMutex, SctFitter::FitStrategy::getName(), SctFitter::FitStrategy::getOptions(), internal_getFitStrategy(), internal_lastScan(), internal_nFitErrors(), internal_nFitsDone(), SctService::WorkerGroup< T >::isFifo(), m_args, m_nScans, SctService::WorkerGroup< T >::nWorkers(), SctService::Arguments::print(), SctService::WorkerGroup< T >::queueSize(), and workergroup. Referenced by status(). Here is the call graph for this function: ![]() |
|
|
set true for FIFO, false for FILO - see WorkerGroup for pros and cons!
Definition at line 366 of file Fitter.cpp. References SctService::WorkerGroup< T >::isFifo(), and workergroup. Here is the call graph for this function: ![]() |
|
|
Get the name of the last scan which was fitted over ipc;.
Definition at line 361 of file Fitter.cpp. References Sct::copyStringToCorba(), counterMutex, and m_scan. Here is the call graph for this function: ![]() |
|
|
list available fit algorithms for CORBA
Definition at line 209 of file Fitter.cpp. References SctFitter::FitAlgorithmMap::instance(), and SctFitter::FitAlgorithmMap::listAlgorithms(). Here is the call graph for this function: ![]() |
|
|
list available fit strategies for CORBA
Definition at line 213 of file Fitter.cpp. References SctFitter::FitStrategyFactory::instance(), and SctFitter::FitStrategyFactory::listStrategies(). Here is the call graph for this function: ![]() |
|
|
returns the number of fit errors so far over ipc;
Definition at line 338 of file Fitter.cpp. References counterMutex, and internal_nFitErrors(). Here is the call graph for this function: ![]() |
|
|
returns the number of fits done so far over ipc;
Definition at line 332 of file Fitter.cpp. References counterMutex, and internal_nFitsDone(). Here is the call graph for this function: ![]() |
|
|
number of jobs in the queue
Definition at line 344 of file Fitter.cpp. References counterMutex, SctService::WorkerGroup< T >::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 301 of file Fitter.cpp. |
|
|
set debug flag
Definition at line 283 of file Fitter.cpp. References SctFitter::FitterWorkerGroup::setDebug(), and workergroup. Here is the call graph for this function: ![]() |
|
|
set true for FIFO, false for FILO - see WorkerGroup for pros and cons!
Definition at line 370 of file Fitter.cpp. References SctService::WorkerGroup< T >::setFifo(), and workergroup. Here is the call graph for this function: ![]() |
|
|
as for setFitOptions, but over IPC. (asynchronous). Passes string on to FitStrategy;
Definition at line 194 of file Fitter.cpp. |
|
|
set the fit option over IPC. (asynchronous).
Definition at line 218 of file Fitter.cpp. |
|
|
update record of last scan attempted.
|
|
|
The following method is a new requirement of IPCNamedObjects under the omni-orb.
Definition at line 49 of file Fitter.cpp. References getFitterServer(), SctService::WorkerGroup< T >::stop(), and workergroup. Here is the call graph for this function: ![]() |
|
|
As for getStatus, but available over IPC. Makes a new char[] which ipc then deletes.
Definition at line 183 of file Fitter.cpp. References Sct::copyStringToCorba(), counterMutex, and internal_status(). Here is the call graph for this function: ![]() |
|
|
FitterWorker is allowed to update stuff.
|
|
|
Used to lock access to all the counters.
Definition at line 235 of file Fitter.h. Referenced by busy(), getAverageTimePerScan(), getFitOptions(), getFitStrategy(), incrementFitErrors(), incrementFitsDone(), internal_getFitStrategy(), internal_lastScan(), internal_nFitErrors(), internal_nFitsDone(), internal_status(), lastScan(), nFitErrors(), nFitsDone(), queueLength(), status(), and updateSubscriptions(). |
|
|
Pointer to the fit strategy.
Definition at line 248 of file Fitter.h. Referenced by internal_getFitStrategy(). |
|
|
An InfoReveiver for RawRODData objects.
Definition at line 254 of file Fitter.h. Referenced by updateSubscriptions(). |
|
|
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 250 of file Fitter.h. Referenced by busy(), debug(), fitAll(), getAverageTimePerScan(), go(), internal_status(), isFifo(), queueLength(), setDebug(), setFifo(), shutdown(), and updateSubscriptions(). |
1.4.6