atef.config.PreparedComparison

class atef.config.PreparedComparison(cache: ~atef.cache.DataCache, identifier: str = '', comparison: ~atef.check.Comparison = <factory>, name: str | None = None, parent: ~atef.config.PreparedGroup | None = None, result: ~atef.result.Result = <factory>)[source]

A unified representation of comparisons for device signals and standalone PVs.

Attributes:
name
parent

Methods

compare()

Run the comparison and return the Result.

get_data_async()

Get the data according to the comparison's configuration.

Methods

__init__(cache: ~atef.cache.DataCache, identifier: str = '', comparison: ~atef.check.Comparison = <factory>, name: str | None = None, parent: ~atef.config.PreparedGroup | None = None, result: ~atef.result.Result = <factory>) None
async compare() Result[source]

Run the comparison and return the Result.

Returns:
Result

The result of the comparison.

async get_data_async() Any[source]

Get the data according to the comparison’s configuration.

To be implemented in subclass.

Returns:
dataAny

The acquired data.

Attributes

identifier: str = ''

The identifier used for the comparison.

name: str | None = None

The name of the associated configuration.

parent: PreparedGroup | None = None

The hierarhical parent of this comparison.

cache: DataCache

The data cache to use for the preparation step.

comparison: Comparison

The comparison itself.

result: Result

The last result of the comparison, if run.