DimensionRecordsAccumulator¶
- class lsst.daf.butler.DimensionRecordsAccumulator¶
Bases:
object
Class used to accumulate dimension records for serialization.
This class generates an auto increment key for each unique dimension record added to it. This allows serialization of dimension records to occur once for each record but be refereed to multiple times.
Methods Summary
addRecord
(record)Add a dimension record to the accumulator if it has not already been added.
Methods Documentation
- addRecord(record: DimensionRecord) int ¶
Add a dimension record to the accumulator if it has not already been added. When a record is inserted for the first time it is assigned a unique integer key.
This function returns the key associated with the record (either the newly allocated key, or the existing one).
- Parameters:
- record
DimensionRecord
The record to add to the accumulator.
- record
- Returns:
- accumulatorKeyint
The key that is associated with the supplied record.
- makeSerializedDimensionRecordMapping() dict[int, lsst.daf.butler.dimensions._records.SerializedDimensionRecord] ¶