Skip to content

Product lookup

Kyle Knoepfel edited this page May 9, 2023 · 7 revisions

Generally, there are 5 pieces of information (or fields) used to locate data:

  1. Data-processing level (sometimes optional)
  2. Full name of the user-defined operation that created the data product (sometimes optional; when required, it may also be necessary to specify the module name)
  3. Product name (required)
  4. Process name (not yet used)
  5. C++ type (not yet used)

Up until now, Meld requires items 1, 2 and 3. The process name is not yet required, and although the product's C++ type is necessary, it is not (yet) used to disambiguate between different types. For example, it is not possible for the same function to create two products with the same name but different C++ types.

In what follows below, we define a Name to be any sequence of characters that matches the regular expression [A-Za-z_][A-Za-z0-9_]*.

Product-lookup specification

For the framework to lookup a data product, the above fields are encoded in a string of the form:

    $\tt{\textcolor{red}{[level\ path\ spec/]}[\textcolor{gray}{[module\ name]}\textcolor{blue}{[@function\ name]}:]product\ name}$
  • level path spec denotes the data-processing level in which the data product should be searched. Allowed options include:

    • the wildcard character (*), which indicates that any data-processing level may be searched
    • a single Name (e.g. event), which indicates that any levels with the name event may be searched
    • a path with Names separated by a forward slash (e.g. run/subrun/event), which indicates a more restricted level in which products can be searched. For example, if run/subrun/event is the level path spec, the event may be searched for the product so long as that event is contained by a subrun, which is (in turn) contained by a run.

    Not specifying the level path spec/ field is equivalent to specifying the wildcard pattern (*/). In addition, the first character of the level path spec may not be the forward slash character (/).

  • module name (type Name) denotes the name of the module which contained the function that produced the data product.

  • function name (type Name) denotes the name of the user-specified operation that produced the data product.

  • product name (type Name) denotes the name of the data product.

Lookup policy

  • The product name is always required.
  • The function name is always required for looking up products created in a previous process; it is not required if looking up products in the current process so long as the framework can unambiguously infer which function is intended by the user.
  • The module name is always required when looking up products created in a previous process. It is not required for looking up products created in the current process if no modules are used.
  • If module name and/or function name are specified, the colon (:) is required

Clone this wiki locally