LALBurst 2.0.7.1-eeff03c
lalburst.cafe.CafePacker Class Reference

Detailed Description

Packing algorithm implementing the ligolw_cafe file list packing algorithm.

Definition at line 237 of file cafe.py.

Inherits lalburst.packing.Packer.

Public Member Functions

def set_offset_vectors (self, offset_vectors)
 Set the list of offset vectors to be considered when deciding the bins in which each file belongs. More...
 
def pack (self, cache_entry)
 Find all bins in which this lal.utils.CacheEntry instance belongs, merge them, and add this cache entry to the result. More...
 
- Public Member Functions inherited from lalburst.packing.Packer
def __init__ (self, bins)
 Set the list of bins on which we shall operate. More...
 
def pack (self, size, obj)
 Pack an object of given size into the bins. More...
 
def packlist (self, size_object_pairs)
 Pack a list of (size, object) tuples into the bins. More...
 

Data Fields

 offset_vectors
 
 max_gap
 
- Data Fields inherited from lalburst.packing.Packer
 bins
 

Member Function Documentation

◆ set_offset_vectors()

def lalburst.cafe.CafePacker.set_offset_vectors (   self,
  offset_vectors 
)

Set the list of offset vectors to be considered when deciding the bins in which each file belongs.

Must be called before packing any files. The input is a list of dictionaries, each mapping instruments to offsets.

Definition at line 244 of file cafe.py.

◆ pack()

def lalburst.cafe.CafePacker.pack (   self,
  cache_entry 
)

Find all bins in which this lal.utils.CacheEntry instance belongs, merge them, and add this cache entry to the result.

Create a new bin for this cache entry if it does not belong in any of the existing bins.

The cache entry "belongs" in a bin if after each of the preset offset vectors (see the .set_offset_vectors() method) is applied to both the contents of a bin and the cache entry, any of the segment lists of the bin and cache entry are found to intersect. When checking for intersection, only the segment lists whose instrument names are listed in the offset vector are compared.

Reimplemented from lalburst.packing.Packer.

Definition at line 277 of file cafe.py.

Field Documentation

◆ offset_vectors

lalburst.cafe.CafePacker.offset_vectors

Definition at line 250 of file cafe.py.

◆ max_gap

lalburst.cafe.CafePacker.max_gap

Definition at line 260 of file cafe.py.