Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

SctService::Arguments Class Reference

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

#include <Arguments.h>

Inheritance diagram for SctService::Arguments:

Inheritance 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< Subscription > getInputISServers () 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

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< Subscription > m_input
bool m_recovery
std::string m_instanceName
std::string m_status_name

Static Private Attributes

const unsigned MAX_WORKERS

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 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.

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

name of ServerStatus object in IS

Definition at line 111 of file Arguments.cpp.

unsigned SctService::Arguments::getNWorkers  )  const
 

number of worker threads

Definition at line 91 of file Arguments.cpp.

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

IS server to write output to.

Definition at line 95 of file Arguments.cpp.

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

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

name of instance in ipc

Definition at line 107 of file Arguments.cpp.

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

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 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.

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.

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

name of this service in IPC

Definition at line 115 of file Arguments.cpp.

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

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

set name of ServerStatus object in IS

Definition at line 127 of file Arguments.cpp.

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

set number of workers

Definition at line 119 of file Arguments.cpp.

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

Set method for output data IS server.

Definition at line 123 of file Arguments.cpp.

void SctService::Arguments::setRecoveryMode const  bool  ) 
 

option to start in recovery mode

Definition at line 131 of file Arguments.cpp.


The documentation for this class was generated from the following files:
Generated on Fri Sep 16 18:04:51 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5