#include <config.h>
Public Member Functions | |
QListIterator< ConfigOption > | iterator () |
void | writeTemplate (FTextStream &t, bool shortIndex, bool updateOnly) |
void | setHeader (const char *header) |
void | convertStrToVal () |
void | substituteEnvironmentVars () |
void | check () |
void | init () |
bool | parseString (const char *fn, const char *str, bool upd=FALSE) |
bool | parse (const char *fn, bool upd=FALSE) |
void | create () |
void | appendStartComment (const QCString &u) |
void | appendUserComment (const QCString &u) |
QCString | takeStartComment () |
QCString | takeUserComment () |
Config (const fhicl::ParameterSet &pset) | |
Config (const fhicl::ParameterSet &pset) | |
Getting configuration values. | |
QCString & | getString (const char *fileName, int num, const char *name) const |
QStrList & | getList (const char *fileName, int num, const char *name) const |
QCString & | getEnum (const char *fileName, int num, const char *name) const |
int & | getInt (const char *fileName, int num, const char *name) const |
bool & | getBool (const char *fileName, int num, const char *name) const |
ConfigOption * | get (const char *name) const |
Adding configuration options. | |
ConfigInfo * | addInfo (const char *name, const char *doc) |
ConfigString * | addString (const char *name, const char *doc) |
ConfigEnum * | addEnum (const char *name, const char *doc, const char *defVal) |
ConfigList * | addList (const char *name, const char *doc) |
ConfigInt * | addInt (const char *name, const char *doc, int minVal, int maxVal, int defVal) |
ConfigBool * | addBool (const char *name, const char *doc, bool defVal) |
ConfigOption * | addObsolete (const char *name) |
ConfigOption * | addDisabled (const char *name) |
Static Public Member Functions | |
static Config * | instance () |
static void | deleteInstance () |
Protected Member Functions | |
Config () | |
~Config () | |
Private Member Functions | |
void | checkFileName (const char *) |
Private Attributes | |
QList< ConfigOption > * | m_options |
QList< ConfigOption > * | m_obsolete |
QList< ConfigOption > * | m_disabled |
QDict< ConfigOption > * | m_dict |
QCString | m_startComment |
QCString | m_userComment |
bool | m_initialized |
QCString | m_header |
Static Private Attributes | |
static Config * | m_instance = 0 |
Singleton for configuration variables.
This object holds the global static variables read from a user-supplied configuration file. The static member instance() can be used to get a pointer to the one and only instance.
Set all variables to their default values by calling Config::instance()->init()
|
inline |
Definition at line 63 of file cvnCreateDB.cc.
|
inline |
Definition at line 41 of file cvnCreateZlibImages.cc.
|
inline |
Adds a new boolean option with name and documentation doc. The boolean has a default value of defVal.
Definition at line 435 of file config.h.
|
inline |
Adds an option that has been disabled at compile time.
Definition at line 453 of file config.h.
|
inline |
Adds a new enumeration option with name and documentation doc and initial value defVal.
Definition at line 394 of file config.h.
|
inline |
Starts a new configuration section with name and description doc.
Definition at line 371 of file config.h.
|
inline |
Adds a new integer option with name and documentation doc. The integer has a range between minVal and maxVal and a default value of defVal.
Definition at line 421 of file config.h.
|
inline |
Adds a new string option with name and documentation doc.
Definition at line 407 of file config.h.
|
inline |
Adds an option that has become obsolete.
Definition at line 445 of file config.h.
|
inline |
Adds a new string option with name and documentation doc.
Definition at line 381 of file config.h.
|
inline |
|
inline |
void Config::check | ( | ) |
Checks if the values of the variable are correct, adjusts them if needed, and report any errors.
Definition at line 3084 of file config.cpp.
|
private |
Definition at line 3072 of file config.cpp.
void Config::convertStrToVal | ( | ) |
Converts the string values read from the configuration file to real values for non-string type options (like int, and bools)
Definition at line 2887 of file config.cpp.
void Config::create | ( | ) |
Called from the constructor, will add doxygen's default options to the configuration object
Definition at line 3641 of file config.cpp.
|
inlinestatic |
|
inline |
Returns the ConfigOption corresponding with name or 0 if the option is not supported.
Definition at line 357 of file config.h.
bool & Config::getBool | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
Returns the value of the boolean option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getBool() for this.
Definition at line 892 of file config.cpp.
QCString & Config::getEnum | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
Returns the value of the enum option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getEnum() for this.
Definition at line 860 of file config.cpp.
int & Config::getInt | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
Returns the value of the integer option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getInt() for this.
Definition at line 876 of file config.cpp.
QStrList & Config::getList | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
Returns the value of the list option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getList() for this.
Definition at line 844 of file config.cpp.
QCString & Config::getString | ( | const char * | fileName, |
int | num, | ||
const char * | name | ||
) | const |
Returns the value of the string option with name fileName. The arguments num and name are for debugging purposes only. There is a convenience function Config_getString() for this.
Definition at line 828 of file config.cpp.
void Config::init | ( | ) |
Initialize config variables to their default value
Definition at line 3615 of file config.cpp.
|
inlinestatic |
|
inline |
Returns an iterator that can by used to iterate over the configuration options.
Parse a configuration file with name fn.
Definition at line 3726 of file config.cpp.
Parse a configuration data in string str.
Definition at line 3707 of file config.cpp.
void Config::substituteEnvironmentVars | ( | ) |
Replaces references to environment variable by the actual value of the environment variable.
Definition at line 3027 of file config.cpp.
|
inline |
Take the user start comment and reset it internally
Definition at line 525 of file config.h.
|
inline |
Take the user comment and reset it internally
Definition at line 534 of file config.h.
void Config::writeTemplate | ( | FTextStream & | t, |
bool | shortIndex, | ||
bool | updateOnly | ||
) |
Writes a template configuration to stream t. If shortIndex is TRUE
the description of each configuration option will be omitted.
Definition at line 2861 of file config.cpp.
bool Config::fCreateIfMissing |
Definition at line 109 of file cvnCreateDB.cc.
bool Config::fErrorIfExists |
Definition at line 107 of file cvnCreateDB.cc.
std::string Config::fLabeling |
Definition at line 114 of file cvnCreateDB.cc.
unsigned int Config::fLabelingMode |
Definition at line 115 of file cvnCreateDB.cc.
float Config::fMaxEnergyForLabel |
Definition at line 123 of file cvnCreateDB.cc.
unsigned int Config::fMaxKeyLength |
Definition at line 111 of file cvnCreateDB.cc.
unsigned int Config::fNEvents |
Limit the number of entries in the tree to consider.
Flag to control whether or not we write HDF5 regression features Limit the number of entries in the tree to consider
Definition at line 125 of file cvnCreateDB.cc.
unsigned int Config::fNTrainPerTest |
Number of training examples for each test sample, e.g. 4 for 80/20 split.
Definition at line 103 of file cvnCreateDB.cc.
std::string Config::fOutputDir |
Definition at line 54 of file cvnCreateZlibImages.cc.
std::string Config::fOutputFormat |
Definition at line 93 of file cvnCreateDB.cc.
int Config::fPlaneLimit |
Limit the number of wires in the output image.
Definition at line 127 of file cvnCreateDB.cc.
unsigned int Config::fProgressInterval |
Number of examples in between progress updates (% complete)
Definition at line 105 of file cvnCreateDB.cc.
std::string Config::fRegressionHDF5NameTest |
Definition at line 122 of file cvnCreateDB.cc.
std::string Config::fRegressionHDF5NameTrain |
Definition at line 121 of file cvnCreateDB.cc.
std::vector< bool > Config::fReverseViews |
Views to reverse.
Definition at line 131 of file cvnCreateDB.cc.
bool Config::fSetLog |
Number of training examples for each test sample, e.g. 4 for 80/20 split Number of examples in between progress updates (% complete)
Definition at line 108 of file cvnCreateDB.cc.
int Config::fTDCLimit |
Limit the number of TDCs in the output image.
Definition at line 129 of file cvnCreateDB.cc.
std::string Config::fTestOutputDir |
Definition at line 99 of file cvnCreateDB.cc.
std::string Config::fTrainingBranchObjectName |
Definition at line 98 of file cvnCreateDB.cc.
std::string Config::fTrainOutputDir |
Definition at line 100 of file cvnCreateDB.cc.
std::string Config::fTreeName |
Definition at line 97 of file cvnCreateDB.cc.
bool Config::fUseGeV |
Definition at line 117 of file cvnCreateDB.cc.
unsigned int Config::fWriteBufferSize |
Definition at line 112 of file cvnCreateDB.cc.
bool Config::fWriteRegressionHDF5 |
Flag to control whether or not we write HDF5 regression features.
Definition at line 120 of file cvnCreateDB.cc.
bool Config::fWriteSync |
Definition at line 110 of file cvnCreateDB.cc.
|
private |
|
private |
|
private |
|
private |