Skip to content

ArtdaqDatabaseAPI findconfigurationversions

Eric Flumerfelt edited this page Jun 17, 2022 · 1 revision

find_configuration_versions

The find_configuration_versions function returns a list of version names satisfying the search criteria specified in the argument. Users can retrieve a list of version names of the requested configuration type (e.g. BoardReaders, Aggregators, etc.) in either a CSV or a GUI JSON format (see examples below).

<code class="cpp">
std::pair<bool, std::string> find_configuration_versions(
  std::string const& search_filter);
</code>

Argument:

search_filter - a non-empty string argument containing a JSON object whose members must conform to the database API grammar.

Examples:
{{include(ArtdaqDatabaseAPI_findconfigurationversions-searchfiter)}}

Returned value:

Returns a pair of a boolean and a string.

The first element of the pair is “true” if the function succeeded, and is “false” otherwise.

If the first element is “true”, then the second element of the pair contains a list of version names of configurations satisfying the search criteria. Otherwise, the second element contains an error message.

Examples:
{{include(ArtdaqDatabaseAPI_findconfigurationversions-results)}}
{{include(ArtdaqDatabaseAPI_errormessage)}}

The results in the GUI JSON format provide the “query” object that can be forwarded to the ArtdaqDatabaseAPI_loadconfiguration function, which in its turn retrieves the configuration document.

Clone this wiki locally