|
| bool | AddDataSource (const std::string &dataProviderName, const std::string &dataSource) |
| | Adds a output configuration string for a given persistence service. More...
|
| |
| bool | AddOutput (const std::string &persistenceName, const std::string &output) |
| | Adds an output configuration string for a given persistence service. More...
|
| |
| bool | AddParameter (const std::string &algoName, const std::string ¶mName, const std::string ¶meter) |
| | Adds a parameter setting string for a given configurable object. More...
|
| |
| const std::string & | GetDataSource (const std::string &dataProviderName) const |
| | Gets the output string for the given data provider. More...
|
| |
| std::vector< std::string > | GetProviders () const |
| | Get a list of providers whose data source has been specified on the command line. More...
|
| |
| const std::string & | GetOutput (const std::string &persistenceName) const |
| | Gets the output string for the given persistence service. More...
|
| |
| std::vector< std::string > | GetPersistences () const |
| | Get a list of persistence services whose output has been specified on the command line. More...
|
| |
| const std::string & | GetParameter (const std::string &confObjName, const std::string &parName) const |
| | Gets the value of the given parameter for the given configurable object. More...
|
| |
| std::vector< std::pair< std::string, std::vector< std::string > > > | GetParameters () const |
| | Get a list of parameters for configurable objects that has been specified on the command line. More...
|
| |
| std::vector< std::string > | GetParameters (const std::string &confObjName) const |
| | Get a list of parameters for configurable objects that has been specified on the command line for a given configurable object. More...
|
| |
A class to store parameters passed from command line.
Configuring an analysis only with a configuration file might be awkward in some situations, e.g. when launching different jobs each one with different input or output. In this case it is impractical to produce one configuration file per job; a better solution is to specify these "variable parameters" on the command line. This class is a container for these command line parameters. Currently the class handles the definitions of: data sources for data providers, output for persistence services, parameter values for algorithms.
| const std::string & EA::CommandLineParameters::GetParameter |
( |
const std::string & |
confObjName, |
|
|
const std::string & |
parName |
|
) |
| const |
Gets the value of the given parameter for the given configurable object.
A configurable object is an object of a class which inherits from Configurable, like an algorithm or a data provider. The value is searched among those given on command line by matching both the configurable object name and the parameter name separately. On failure, eventual command line configurable object names given as glob expression are matched to confObjName, and in case of success the parameter name is matched. If the desired parameter is defined by two or more matching glob configurable object names then an exception is thrown, e.g. the following two parameter definitions:
confObj*,par,value confObj?,par,value
will make GetParameter("confObj1", "par") throw.
- Parameters
-
| confObjName | The configurable object. |
| parName | The parameter. |
- Returns
- The value string of the parameter.
- Exceptions
-
| std::vector< std::pair< std::string, std::vector< std::string > > > EA::CommandLineParameters::GetParameters |
( |
| ) |
const |
Get a list of parameters for configurable objects that has been specified on the command line.
A configurable object is an object of a class which inherits from Configurable, like an algorithm or a data provider. Each element of the returned vector is a pair, the first element being the name of the configurable object and the second one being the vector of the parameters defined for that object.
Each element of the returned vector is a pair, whose first object is the name of the configurable object and the second one is a vector containing the names of the parameters that have been given in the command line.
- Returns
- The parameters of the configurable object.