lsst.datarel  14.0+71
Public Member Functions | List of all members
lsst.datarel.datasetScanner.HfsScanner Class Reference
Inheritance diagram for lsst.datarel.datasetScanner.HfsScanner:
lsst.datarel.datasetScanner.DatasetScanner

Public Member Functions

def __init__ (self, template)
 
def walk (self, root, rules=None)
 

Detailed Description

A hierarchical scanner for paths matching a template, optionally
also restricting visited paths to those matching a list of dataId rules.

Constructor & Destructor Documentation

◆ __init__()

def lsst.datarel.datasetScanner.HfsScanner.__init__ (   self,
  template 
)
Build an FsScanner for given a path template. The path template
should be a Python string with named format substitution
specifications, as used in mapper policy files. For example:

deepCoadd-results/%(filter)s/%(tract)d/%(patch)s/calexp-%(filter)s-%(tract)d-%(patch)s.fits

Note that a key may appear multiple times. If it does,
the value for each occurrence should be identical (the formatting
specs must be identical). Octal, binary, hexadecimal, and floating
point formats are not supported.

Member Function Documentation

◆ walk()

def lsst.datarel.datasetScanner.HfsScanner.walk (   self,
  root,
  rules = None 
)
Generator that descends the given root directory in top-down
fashion, matching paths corresponding to the template and satisfying
the given rule list. The generator yields tuples of the form
(path, dataId), where path is a dataset file name relative to root,
and dataId is a key value dictionary identifying the file.

The documentation for this class was generated from the following file: