SctAnalysis::AnalysisService Class Reference

Collaboration diagram for SctAnalysis::AnalysisService:

Collaboration graph
[legend]

Public Member Functions

virtual ~AnalysisService ()
void run ()
 RUNS the IPC server and IS callback.
void setFitStrategy (const string &name) throw (LogicError)
 set the FitStrategy by name
SctFitter::FitStrategygetFitStrategy () const throw (LogicError)
 return a FitStrategy which tells how to do the fitting.
virtual void purge () throw ()
 Calls AnalysisWorkerGroup::purge() method to free stuck memory.
virtual void analyze (const char *testname) throw ()
 Analyse all data relevant to a test.
virtual void analyzeModule (const char *testname, const char *modulename) throw ()
 Analyse all data relevant to a test for a particular module.
virtual char * status () throw ()
 Output the status of the AnalysisService over IPC.
virtual CORBA::Short busy ()
 ipc busy method
virtual CORBA::Short queueLength ()
 ipc queueLength method
DcsInterfacegetDcsInterface ()
 return the DcsInterface, which retrieves the dcs information
const std::string getOutputISServerName ()
 server to publish to.
void recover ()
 recover from failure
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!
boost::shared_ptr< SctConfiguration::ConfigurationgetConfiguration ()
 get local interface to configuration
AnalysisServiceI::StringList * listAlgorithms ()
 get a list of the AnalysisAlgorithms available for use

Static Public Member Functions

static void generalCallback (ISCallbackInfo *isc)
 Callback for any data type.
static void testDataCallback (ISCallbackInfo *isc)
 what to do when a callback is requestedfound, or removed
static void scanResultCallback (ISCallbackInfo *isc)
 what to do when a new FitScanResult or RawScanResult is found
static AnalysisServiceinstance ()
 singleton access method
static AnalysisServiceinitialize (AnalysisArguments args)
 Initializes the static instance with a FitStrategy.
static IPCServer & getServer () throw ()

Protected Attributes

AnalysisWorkerGroupworkergroup
 AnalysisWorkerGroup does the internal book-keeping, and calls the appropriate AnalysisAlgorithm.
DcsInterfacedcsinterface

Private Member Functions

void shutdown ()
 AnalysisService (AnalysisArguments args)
 singleton. Will throw ConfigurationException if something goes wrong.

Private Attributes

boost::recursive_mutex m_status_access
 protects status from different threads.
SctFitter::FitStrategyfitStrategy
 cache telling how to do fitting.
std::auto_ptr< ISInfoReceiver > infoReceiver
 IS InfoReceiver for IS events.
AnalysisArguments m_args
boost::shared_ptr< SctConfiguration::Configurations_configuration
 local configuration interface

Static Private Attributes

static AnalysisServiceservice

Detailed Description

Definition at line 23 of file AnalysisService.h.


Constructor & Destructor Documentation

SctAnalysis::AnalysisService::AnalysisService AnalysisArguments  args  )  [private]
 

singleton. Will throw ConfigurationException if something goes wrong.

Definition at line 46 of file AnalysisService.cpp.

References dcsinterface, SctAnalysis::AnalysisArguments::getFitOptions(), getFitStrategy(), SctService::Arguments::getISStatusName(), SctAnalysis::AnalysisArguments::getStrategyName(), infoReceiver, m_args, SctService::WorkerGroup< T >::reportTo(), s_configuration, Sct::Throwable::sendToMrs(), setFitStrategy(), SctFitter::FitStrategy::setOptions(), and workergroup.

Referenced by initialize().

Here is the call graph for this function:


Member Function Documentation

void SctAnalysis::AnalysisService::analyze const char *  testname  )  throw () [virtual]
 

Analyse all data relevant to a test.

Parameters:
testname the TestData object IO name

Definition at line 213 of file AnalysisService.cpp.

void SctAnalysis::AnalysisService::analyzeModule const char *  testname,
const char *  modulename
throw () [virtual]
 

Analyse all data relevant to a test for a particular module.

Parameters:
testname the TestData object IO name
modulename the name of the module to be analyzed

Definition at line 148 of file AnalysisService.cpp.

CORBA::Short SctAnalysis::AnalysisService::busy  )  [virtual]
 

ipc busy method

Definition at line 121 of file AnalysisService.cpp.

References SctService::WorkerGroup< T >::busy(), m_status_access, and workergroup.

Here is the call graph for this function:

void SctAnalysis::AnalysisService::generalCallback ISCallbackInfo *  isc  )  [static]
 

Callback for any data type.

Definition at line 221 of file AnalysisService.cpp.

References scanResultCallback(), and testDataCallback().

Referenced by run().

Here is the call graph for this function:

boost::shared_ptr< SctConfiguration::Configuration > SctAnalysis::AnalysisService::getConfiguration  ) 
 

get local interface to configuration

Returns:
interface to configuration or null pointer if not possible

Definition at line 91 of file AnalysisService.cpp.

References s_configuration.

Referenced by SctAnalysis::NPtGainAlgorithm::NPtGainAlgorithm().

DcsInterface & SctAnalysis::AnalysisService::getDcsInterface  ) 
 

return the DcsInterface, which retrieves the dcs information

Definition at line 298 of file AnalysisService.cpp.

References dcsinterface.

SctFitter::FitStrategy & SctAnalysis::AnalysisService::getFitStrategy  )  const throw (LogicError)
 

return a FitStrategy which tells how to do the fitting.

Definition at line 274 of file AnalysisService.cpp.

References fitStrategy.

Referenced by AnalysisService(), and SctAnalysis::NPtGainAlgorithm::doFit().

const std::string SctAnalysis::AnalysisService::getOutputISServerName  ) 
 

server to publish to.

set by command line arguments

Definition at line 87 of file AnalysisService.cpp.

References SctService::Arguments::getOutputISServer(), and m_args.

Referenced by SctAnalysis::AnalysisAlgorithm::finish().

Here is the call graph for this function:

AnalysisService & SctAnalysis::AnalysisService::initialize AnalysisArguments  args  )  [static]
 

Initializes the static instance with a FitStrategy.

The default FitStrategy is RootFitStrategy. Will throw ConfigurationException if something goes wrong.

Definition at line 293 of file AnalysisService.cpp.

References AnalysisService(), and service.

Here is the call graph for this function:

AnalysisService & SctAnalysis::AnalysisService::instance  )  [static]
 

singleton access method

Definition at line 280 of file AnalysisService.cpp.

References service.

Referenced by SctAnalysis::NPtGainAlgorithm::doFit(), SctAnalysis::AnalysisAlgorithm::finish(), isFifo(), SctAnalysis::NPtGainAlgorithm::NPtGainAlgorithm(), scanResultCallback(), setFifo(), and testDataCallback().

bool SctAnalysis::AnalysisService::isFifo  ) 
 

set true for FIFO, false for FILO - see WorkerGroup for pros and cons!

Definition at line 285 of file AnalysisService.cpp.

References instance(), SctService::WorkerGroup< T >::isFifo(), and workergroup.

Here is the call graph for this function:

AnalysisServiceI::StringList * SctAnalysis::AnalysisService::listAlgorithms  ) 
 

get a list of the AnalysisAlgorithms available for use

Definition at line 217 of file AnalysisService.cpp.

References SctAnalysis::AnalysisAlgorithmMap::instance(), and SctAnalysis::AnalysisAlgorithmMap::listAlgorithms().

Here is the call graph for this function:

void SctAnalysis::AnalysisService::purge  )  throw () [virtual]
 

Calls AnalysisWorkerGroup::purge() method to free stuck memory.

Note:
Don't even think of doing this while analysis is in progress!

Definition at line 202 of file AnalysisService.cpp.

References SctAnalysis::AnalysisWorkerGroup::purge(), Sct::Throwable::sendToMrs(), and workergroup.

Here is the call graph for this function:

CORBA::Short SctAnalysis::AnalysisService::queueLength  )  [virtual]
 

ipc queueLength method

Definition at line 126 of file AnalysisService.cpp.

References SctService::WorkerGroup< T >::busy(), m_status_access, and workergroup.

Here is the call graph for this function:

void SctAnalysis::AnalysisService::recover  ) 
 

recover from failure

Definition at line 306 of file AnalysisService.cpp.

Referenced by run().

void SctAnalysis::AnalysisService::run  ) 
 

RUNS the IPC server and IS callback.

Does not return.

Definition at line 95 of file AnalysisService.cpp.

References generalCallback(), SctService::Arguments::getInputISServers(), SctService::Arguments::getNWorkers(), SctService::WorkerGroup< T >::go(), infoReceiver, m_args, recover(), SctService::Arguments::recoveryMode(), and workergroup.

Here is the call graph for this function:

void SctAnalysis::AnalysisService::scanResultCallback ISCallbackInfo *  isc  )  [static]
 

what to do when a new FitScanResult or RawScanResult is found

Definition at line 235 of file AnalysisService.cpp.

References instance(), SctService::WorkerGroup< T >::push(), and workergroup.

Referenced by generalCallback().

Here is the call graph for this function:

void SctAnalysis::AnalysisService::setFifo bool   ) 
 

set true for FIFO, false for FILO - see WorkerGroup for pros and cons!

Definition at line 289 of file AnalysisService.cpp.

References instance(), SctService::WorkerGroup< T >::setFifo(), and workergroup.

Here is the call graph for this function:

void SctAnalysis::AnalysisService::setFitStrategy const string &  name  )  throw (LogicError)
 

set the FitStrategy by name

Definition at line 268 of file AnalysisService.cpp.

References SctFitter::FitStrategyFactory::instance().

Referenced by AnalysisService().

Here is the call graph for this function:

char * SctAnalysis::AnalysisService::status  )  throw () [virtual]
 

Output the status of the AnalysisService over IPC.

Definition at line 131 of file AnalysisService.cpp.

References dcsinterface, SctAnalysis::AnalysisAlgorithmMap::getAllStatus(), SctAnalysis::AnalysisAlgorithmMap::instance(), m_status_access, SctAnalysis::DcsInterface::printStatus(), SctAnalysis::AnalysisWorkerGroup::printStatus(), and workergroup.

Here is the call graph for this function:

void SctAnalysis::AnalysisService::testDataCallback ISCallbackInfo *  isc  )  [static]
 

what to do when a callback is requestedfound, or removed

Definition at line 245 of file AnalysisService.cpp.

References SctAnalysis::AnalysisWorkerGroup::addTest(), instance(), SctAnalysis::AnalysisWorkerGroup::removeTestsUpTo(), and workergroup.

Referenced by generalCallback().

Here is the call graph for this function:


Field Documentation

SctFitter::FitStrategy* SctAnalysis::AnalysisService::fitStrategy [private]
 

cache telling how to do fitting.

Definition at line 135 of file AnalysisService.h.

Referenced by getFitStrategy().

std::auto_ptr<ISInfoReceiver> SctAnalysis::AnalysisService::infoReceiver [private]
 

IS InfoReceiver for IS events.

Definition at line 136 of file AnalysisService.h.

Referenced by AnalysisService(), and run().

boost::recursive_mutex SctAnalysis::AnalysisService::m_status_access [private]
 

protects status from different threads.

Definition at line 134 of file AnalysisService.h.

Referenced by busy(), queueLength(), and status().

boost::shared_ptr<SctConfiguration::Configuration> SctAnalysis::AnalysisService::s_configuration [private]
 

local configuration interface

Definition at line 140 of file AnalysisService.h.

Referenced by AnalysisService(), and getConfiguration().

AnalysisWorkerGroup* SctAnalysis::AnalysisService::workergroup [protected]
 

AnalysisWorkerGroup does the internal book-keeping, and calls the appropriate AnalysisAlgorithm.

Definition at line 131 of file AnalysisService.h.

Referenced by AnalysisService(), busy(), isFifo(), purge(), queueLength(), run(), scanResultCallback(), setFifo(), shutdown(), status(), and testDataCallback().


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