Skip to content

ArtdaqDatabaseAPI findglobalconfigurations

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

find_global_configurations

The find_global_configurations function returns a list of global configuration names satisfying the search criteria specified in the argument.
Users can retrieve a list of global configurations stored in the database in either a CSV or a GUI JSON format (see examples below).

<code class="cpp">
std::pair<bool, std::string> find_global_configurations(
  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_findglobalconfigurations-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 global configuration names satisfying the search criteria. Otherwise, the second element contains an error message.

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

The results in the GUI JSON format provide the “query” object that can be forwarded to the ArtdaqDatabaseAPI_build_global_configuration_search_filter function, which in its turn retrieves the composition of the global configuration returned in the “name” element.

Clone this wiki locally