SctService::Arguments Class Reference

Command line arguments available for fitting service. More...

#include <Arguments.h>

Inheritance diagram for SctService::Arguments:

Inheritance graph
[legend]
Collaboration diagram for SctService::Arguments:

Collaboration graph
[legend]

Public Member Functions

 Arguments (int argc, char **argv)
 Constructor builds from command line args.
unsigned getNWorkers () const
 number of worker threads
void setNWorkers (const unsigned n)
 set number of workers
std::string getOutputISServer () const
 IS server to write output to.
void setOutputISServer (const std::string &name)
 Set method for output data IS server.
std::list< SubscriptiongetInputISServers () const
 list of IS servers to read input from
bool recoveryMode () const
 start in recovery mode?
void setRecoveryMode (const bool)
 option to start in recovery mode
void setInstanceName (const std::string &value)
 name of this service in IPC
std::string instanceName () const
 name of instance in ipc
std::string getISStatusName () const
 name of ServerStatus object in IS
void setISStatusName (const std::string &)
 set name of ServerStatus object in IS
virtual void print (std::ostream &os) const
 function to write out initial arguments
virtual std::string print () const
 write out argumets as string
virtual void printHelp (std::ostream &os) const
 function to write help message
virtual std::string printHelp () const
 print help and return string
virtual ~Arguments ()
 destructor

Static Public Member Functions

static std::list< std::string > makeList (int argc, char **argv)
 turn c-style argument list into stl list

Protected Member Functions

void parse ()
 parse arguments - must be called in derrived class constructors;
std::string next (std::list< std::string >::iterator &it) const
 Function for getting next argument.

Protected Attributes

std::list< std::string > m_list

Private Attributes

unsigned m_nworkers
std::string m_options
std::string m_output
std::list< Subscriptionm_input
bool m_recovery
std::string m_instanceName
std::string m_status_name

Static Private Attributes

static const unsigned MAX_WORKERS

Data Structures

class  Subscription

Detailed Description

Command line arguments available for fitting service.

Definition at line 10 of file Arguments.h.


Constructor & Destructor Documentation

SctService::Arguments::Arguments int  argc,
char **  argv
 

Constructor builds from command line args.

Afterwards derived class constructors must call parse();

Definition at line 13 of file Arguments.cpp.

References m_list, and makeList().

Here is the call graph for this function:

SctService::Arguments::~Arguments  )  [virtual]
 

destructor

Definition at line 71 of file Arguments.cpp.


Member Function Documentation

std::list< Arguments::Subscription > SctService::Arguments::getInputISServers  )  const
 

list of IS servers to read input from

Definition at line 99 of file Arguments.cpp.

References m_input.

Referenced by SctFitter::Fitter::fitAll(), SctAnalysis::AnalysisService::run(), and SctFitter::Fitter::updateSubscriptions().

std::string SctService::Arguments::getISStatusName  )  const
 

name of ServerStatus object in IS

Definition at line 111 of file Arguments.cpp.

References m_status_name.

Referenced by SctAnalysis::AnalysisService::AnalysisService(), and SctArchiving::Archiver::Archiver().

unsigned SctService::Arguments::getNWorkers  )  const
 

number of worker threads

Definition at line 91 of file Arguments.cpp.

References m_nworkers.

Referenced by SctFitter::Fitter::go(), and SctAnalysis::AnalysisService::run().

std::string SctService::Arguments::getOutputISServer  )  const
 

IS server to write output to.

Definition at line 95 of file Arguments.cpp.

References m_output.

Referenced by SctArchiving::Archiver::Archiver(), SctFitter::Fitter::getOutputIsServer(), SctAnalysis::AnalysisService::getOutputISServerName(), and SctArchiving::Archiver::subscribe().

std::string SctService::Arguments::instanceName  )  const
 

name of instance in ipc

Definition at line 107 of file Arguments.cpp.

References m_instanceName.

list< string > SctService::Arguments::makeList int  argc,
char **  argv
[static]
 

turn c-style argument list into stl list

Definition at line 51 of file Arguments.cpp.

Referenced by Arguments().

std::string SctService::Arguments::next std::list< std::string >::iterator &  it  )  const [protected]
 

Function for getting next argument.

Returns:
next argument
Parameters:
iterator must be valid. It gets incrimented and may end up not valid.
Exceptions:
InvalidArgumentError if next argument dose not exist

Referenced by SctFitter::FitterArguments::parse(), parse(), SctArchiving::ArchiverArguments::parse(), and SctAnalysis::AnalysisArguments::parse().

void SctService::Arguments::parse  )  [protected]
 

parse arguments - must be called in derrived class constructors;

Reimplemented in SctAnalysis::AnalysisArguments, SctArchiving::ArchiverArguments, and SctFitter::FitterArguments.

Definition at line 18 of file Arguments.cpp.

References m_input, m_instanceName, m_list, m_nworkers, m_output, m_recovery, m_status_name, MAX_WORKERS, next(), and printHelp().

Here is the call graph for this function:

std::string SctService::Arguments::print  )  const [virtual]
 

write out argumets as string

Definition at line 65 of file Arguments.cpp.

void SctService::Arguments::print std::ostream &  os  )  const [virtual]
 

function to write out initial arguments

Definition at line 84 of file Arguments.cpp.

References m_list.

Referenced by SctFitter::Fitter::internal_status().

std::string SctService::Arguments::printHelp  )  const [virtual]
 

print help and return string

Definition at line 59 of file Arguments.cpp.

Referenced by parse().

void SctService::Arguments::printHelp std::ostream &  os  )  const [virtual]
 

function to write help message

Reimplemented in SctAnalysis::AnalysisArguments, SctArchiving::ArchiverArguments, and SctFitter::FitterArguments.

Definition at line 73 of file Arguments.cpp.

bool SctService::Arguments::recoveryMode  )  const
 

start in recovery mode?

Definition at line 103 of file Arguments.cpp.

References m_recovery.

Referenced by SctFitter::Fitter::go(), and SctAnalysis::AnalysisService::run().

void SctService::Arguments::setInstanceName const std::string &  value  ) 
 

name of this service in IPC

Definition at line 115 of file Arguments.cpp.

References m_instanceName.

void SctService::Arguments::setISStatusName const std::string &   ) 
 

set name of ServerStatus object in IS

Definition at line 127 of file Arguments.cpp.

References m_status_name.

void SctService::Arguments::setNWorkers const unsigned  n  ) 
 

set number of workers

Definition at line 119 of file Arguments.cpp.

References m_nworkers.

void SctService::Arguments::setOutputISServer const std::string &  name  ) 
 

Set method for output data IS server.

Definition at line 123 of file Arguments.cpp.

References m_output.

void SctService::Arguments::setRecoveryMode const   bool  ) 
 

option to start in recovery mode

Definition at line 131 of file Arguments.cpp.

References m_recovery.


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