Matrix Science header
Public Member Functions

ms_processoroptions Class Reference
[Mascot configuration files module]

An instance of this class represents all the parameters specified in the Processors section of mascot.dat. More...

#include <ms_processoroptions.hpp>

Inheritance diagram for ms_processoroptions:
Inheritance graph
[legend]
Collaboration diagram for ms_processoroptions:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ms_processoroptions ()
 Default constructor.
 ms_processoroptions (const ms_processoroptions &src)
 Copying constructor.
 ~ms_processoroptions ()
 Destructor.
void appendDatabase (const ms_dbprocessors *db)
 Adds a new database to the list.
void appendProcessor (const int processorID)
 Adds a new processor to the list for the ProcessorSet parameter.
void clearDatabases ()
 Deletes all database entries.
void clearProcessors ()
 Deletes all processors from the ProcessorSet list.
void copyFrom (const ms_processoroptions *right)
 Can be used to create a copy of another object.
void defaultValues ()
 Initialises the instance with default values.
const ms_dbprocessorsgetDatabase (const int index) const
 Returns an individual database entry.
int getNumberOfDatabases () const
 Returns number of individual database entries in the section.
int getNumberOfProcessors () const
 Returns a number of processors specified in the ProcessorSet parameter.
std::string getPreceedingComments () const
 Returns any comments preceeding the section.
int getProcessor (const int index) const
 Returns a single processor ID by its index.
bool isSectionAvailable () const
 Check whether the section has been actually read from the file.
ms_processoroptionsoperator= (const ms_processoroptions &right)
 Assignment operator for C++ client applications.
void setPreceedingComments (const std::string &comments)
 Sets any comments preceeding the section.
void setSectionAvailable (const bool value)
 Changes availability of the section, i.e. whether it should be saved in a file.

Detailed Description

An instance of this class represents all the parameters specified in the Processors section of mascot.dat.

An instance of this class is created and populated in ms_datfile. It can also be created separately and initialized with default values. You can create an instance of the class or copy from another instance in order to pass it then as an parameters-containing object. For detailed information on any of the options please consult Mascot manual.

Most of the parameters here can be accessed using a dabatase number, which corresponds to database indices in ms_databases.

Also get yourselves acquainted with the base class ms_customproperty. It facilitates the following tasks:

More functionality is described in the documentation for ms_customproperty.

Examples:

config_mascotdat.cpp.


Member Function Documentation

int getNumberOfDatabases (  ) const

Returns number of individual database entries in the section.

Each of the lines corresponds to a certain database. All CPU numbers are listed in the same database entry and correspond to threads. A number of CPUs listed for the database must be the same as number of threads specified for the database in Databases section of mascot.dat. Also, all CPUs listed here must belong to the set of CPUs specified by ProcessorSet parameter.

By default the list of databases is empty.

Returns:
number of databases
int getNumberOfProcessors (  ) const

Returns a number of processors specified in the ProcessorSet parameter.

The ProcessorSet line specifies the complete set of processors to be used. The number in this list must be less than or equal to the number processors licensed, or the system will not run.

There can be up to 64 CPUs specified in the bit mask. Each bit can be set either to 1 or 0 for a listed CPU or not listed one respectively. Following this parameter, the processors to be used for each database are specified in mascot.dat. These numbers must be a subset of the numbers in the ProcessorSet, and there must be the same number of values as the number of threads specified earlier in the database section.

See also:
ms_processors::getWhichForDB(), ms_processors::getDBValSetInMascotDat()

By default the list is empty.

Returns:
number of processors
Examples:
config_mascotdat.cpp.
std::string getPreceedingComments (  ) const [inherited]

Returns any comments preceeding the section.

Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.

Multiple line comments are supported by having a single string with newline characters

See also:
setPreceedingComments()
Returns:
any comments preceeding the section
bool isSectionAvailable (  ) const

Check whether the section has been actually read from the file.

By default the Processors section is unavailable until it has been set to a different state.

Returns:
true if the section is available, false otherwise
Examples:
config_mascotdat.cpp.
void setPreceedingComments ( const std::string &  comments ) [inherited]

Sets any comments preceeding the section.

Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.

Multiple line comments are supported by having a single string with newline characters

See also:
getPreceedingComments()
Parameters:
commentsany comments preceeding the section

The documentation for this class was generated from the following files:
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:53