![]() |
OpenMS
|
Registry of TOPP tools and their TOPPAS categories. More...
#include <OpenMS/APPLICATIONS/ToolHandler.h>
Static Public Member Functions | |
| static ToolListType | getTOPPToolList () |
| List every TOPP tool enabled in this build, keyed by tool name. | |
| static const ToolListType & | getTOPPToolListRef () |
| The registry of getTOPPToolList without copying it. | |
| static StringList | getTypes (const std::string &toolname) |
| Return the alternative "types" / sub-commands a tool supports, or an empty list if it has none. | |
| static std::string | getCategory (const std::string &toolname) |
| Return the category string of a tool. | |
| static std::string | getToolRegistryPath () |
Resolved file-system path of the tool registry directory (root of the .tsv search). | |
Static Private Member Functions | |
| static ToolListType | loadRegistry_ () |
| static StringList | getToolRegistryFiles_ () |
Registry of TOPP tools and their TOPPAS categories.
The registry is data, not code: it is assembled from the tab-separated .tsv files under ToolHandler::getToolRegistryPath ([OpenMS share]/TOOLS plus an OS-specific subdirectory, .../LINUX on Mac and Linux and .../WINDOWS on Windows). The search path can be augmented through the OPENMS_TOOL_REGISTRY_PATH environment variable (OPENMS_TTD_INTERNAL_PATH, its name in earlier releases, is still read as well). A directory that the search reaches twice contributes its files once.
An entry carries only what the registry is for – the tool's name and the category TOPPAS groups it under, plus the tool's -type sub-modes where it has any:
Everything else about a tool (its description, parameters, valid formats, citations) is self-described by its binary through -write_ctd, so a tool does not have to be built from the same source tree, or even the same repository, as the library: installing its binary and a .tsv naming it is enough to register it.
OpenMS' own tools are registered by share/OpenMS/TOOLS/OpenMS.tsv, which the build generates from the openms_topp_tool() declarations in src/topp/executables.cmake (see cmake/topp_tool_macros.cmake). That file is therefore never edited by hand and lists exactly the tools the build produced, so a tool that a build option did not build is not registered either. A build tree that was never installed has no share/OpenMS/TOOLS of its own; there the generated file is read from the build tree.
Used by TOPPAS for the visual workflow editor's tool palette and by the TOPP runtime to look up tools and their categories.
|
static |
Return the category string of a tool.
| [in] | toolname | Name of the TOPP tool to query. |
"Quantitation") or an empty string if toolname is unknown.
|
staticprivate |
Enumerate the .tsv files to read: everything under getToolRegistryPath (and its OS-specific subdirectory), or under the build tree's generated registry when this build was never installed, plus the directories the environment variables add. A directory the search reaches more than once contributes its files once.
|
static |
Resolved file-system path of the tool registry directory (root of the .tsv search).
File::getOpenMSDataPath() + "/TOOLS".
|
static |
List every TOPP tool enabled in this build, keyed by tool name.
Assembled from the .tsv files under getToolRegistryPath (a name collision between two of them throws Exception::InvalidValue, naming both files). Each value carries the tool's category string (e.g. "Quantitation", "File Converter") used by TOPPAS for grouping. Every .tsv of the directory is read, so a tool of another repository is listed as soon as its file is installed there.
Prefer getTOPPToolListRef when a copy is not needed.
toolname -> Internal::ToolDescription for every tool enabled in this build. Referenced by TOPPASBase::createTOPPToolsTreeWidget().
|
static |
The registry of getTOPPToolList without copying it.
Same content as getTOPPToolList, served from the process-wide cache. Use this for membership tests and lookups; the reference stays valid for the lifetime of the process.
toolname -> Internal::ToolDescription. Referenced by INIUpdater::getNewToolName().
|
static |
Return the alternative "types" / sub-commands a tool supports, or an empty list if it has none.
Most tools have a single behaviour; a small number expose multiple sub-modes via -type (e.g. FeatureFinderCentroided vs. FeatureFinderIsotopeWavelet sharing infrastructure).
| [in] | toolname | Name of the TOPP tool to query. |
Referenced by TOPPASBase::createTOPPToolsTreeWidget().
|
staticprivate |
Parse every file of getToolRegistryFiles_ into the registry map. Throws Exception::InvalidValue when two files register the same tool name.