Integration of SAM with the D0 framework
The framework application interacts with the SAM client part in two ways:
through the name expanders and through the fileOpen/fileClose messages.
The name expanders are registered with the AllFileNameExpander class in
the name_translation package. The AllFileNameExpander class is used by
the d0StreamName (not shown) which in turn is used by the ReadEvent class
(not shown) from io_packages, or similar class that "generates" (in the
framework sense) events by reading input files, see the top of the picture.
The same event reading class is responsible for generating fileOpen/fileClose
framework messages which again trigger SAM code to be executed (SAM manager
implements the said framework interfaces, see the bottom of the picture).
Symmetrically, the event writing package such as WriteEvent from io_packages
uses indirectly SAM's name expander for oiutput files and generates fileOpen/fileClose
messsages for the output files.
The initial purposes of the sam_manager package are:
-
Provide the name of the next input file name to the framework by communicating
with the Project Master.
-
Track lineage and other "meta-data" for the output data files created by
the application. Generate SAM meta-date in some format.
-
Initiate file store upon closing of an output files (optional), if the
file is to be stored and catalogued with SAM in real time.
-
Determine the location of the output file if output buffer space is managed
by SAM.
The last item requires a new interface with a SAM station server and thefore
will be deferred until the station prototype is complete.