Notes from Joanne:(See: MOOT Working Documents.) (Also see: Status Fields in MOOT.) Status-like database fields for objects in MOOTThis document is intended to address JIRA LCT-4
Note: currently the status and active_state fields of Config are the only status-like fields which may be modified directly by client code. However Vote files and Ancillary files may in effect be activated or de-activated by assigning or deassigning aliases to them. Status-like database fields for classes of objects in MOOT
There are more tables with status-like fields but, even more than the class tables referred to above, they are internal constructs not of much interest to clients.
(Also see http://www.slac.stanford.edu/exp/glast/ground/notes/moot/intent.shtml, which is a subset of above working documents) Relation tables
Several other relation tables will be added for various purposes: Vote_PClass_AClass, Container_Precinct, LATC_Backup. Other relationsSome relationships are more conveniently expressed with additional foreign keys.
Use Cases:Registering ancillary filesA typical ancillary file (e.g., ACD pedestal calibration; calorimeter calibration table) is created by the subsystem (or other delegate, but non-subsystem delegates tend to be simpler and might not need ancillary files at all), probably as a result of analyzing charge injection data or physics data or both. Ancillary files are at the beginning of the processing chain required to make a new Config. Most likely all that's needed here is a simple function taking as arguments the file path, the ancillary class it belongs to, and other mundane items. The function will copy the file to the MOOT archive in SLAC afs space.Managing precincts and votesThe set of precincts is expected to be relatively static. They will be defined by subsystem or other experts once and for all (or nearly) and corresponding rows will be added to Precincts by the MOOT maintainer. The collection of votes is likely to continue to increase, albeit slowly. A MOOT function will be provided so that experts can register them on their own. If all subsystems use Eric's scheme (and they will since Eric has done the work of defining precincts for them), a vote corresponds to an XML element, including its attributes and child elements, as serialized in a file. This file will be archived (that is, copied to MOOT's archive in SLAC afs space) upon registration just as parameter and ancillary files are archived. Creating and registering parameter filesParameter files may be derived from any number (including zero) of ancillary files. In the new scheme of things, they will always be related to a vote. Someone (subsystem expert to begin with; ultimately perhaps an operator) will determine which vote should be used to generate a parameter file or files. The vote should, directly or indirectly, specify the procedure to be run and the inputs: ancillary files and/or constants. At the close of the procedure whoever (or whatever) invoked it should have all information necessary to register the new parameter file(s) and indicate which ancillary files they depend upon. MOOT functions will be available to
Building a configThere is already a routine to build a new config which takes a list of keys from Parameters as input. We need to add facilities which will aid an operator in choosing the right collection of keys, based on some idea of intent. Intent in this scheme is represented as a collection of votes, one for each precinct, so one step in this process will be something which, given a particular vote and perhaps other constraints (e.g., on status, on creation time,..) will return a collection of parameter files. Then the operator's job becomes one of selecting votes rather than parameter files. To simplify the operator's life further, Vote_aliases can be used to keep track of a standard collection or collections of votes for each delegate. Then, for example, to configure for a CAL charge-injection run, the operator would specify a special set of votes for the precincts belonging to the CAL delegate, but might just ask for a standard set-up for some or all of the other delegates.Note that the complete process, all the way from generating ancillary files to coming out with a new config, takes place in a sequence of steps which can be spaced out in time. Steps or parts of steps which are done via MOOT services are indicated like this.
Recovering intentFor a given config, it is already possible to
The essential content (e.g., register settings) of the two sets of files will be identical, but other features, such as the votes associated with the parameter files when they were registered, may differ. A new MOOT query will be added to return the key of the vote associated with a parameter file, making it possible to recover the complete set of votes (= intent) associated with a config. Glossary and examplesDelegates, precincts and votesA Delegate is a sphere of influence or control within the universe of configurable quantities. The most typical example is a subsystem, such as the ACD. Delegates don't show up much in the implementation of MOOT because the concept is too coarse.A precinct is defined by the quantities it determines, and by the kinds of inputs (e.g., data like ACD pedestal calibrations or settings like "number of counts above pedestal") used to determine them. Register values or other quantities controlled by a precinct would normally be established all at the same time by means of a single procedure. A vote describes the particular inputs and (perhaps) procedure to be used (e.g., "run program X, using the most recent good pedestal calibration, establishing thresholds 17 counts above pedestal"). A vote file corresponds to the intent for the items (e.g. registers; flight software parameters) it controls. Roughly speaking, precinct/vote have a class/instance relationship. A global intent file is another xml file whose only content is a list of references to vote aliases. At any given time these may be resolved using MOOT's vote_alias table. Ancillary file, ancillary classAncillary files are typically generated as a result of analysis of one or more data sets from physics running or special charge-injection runs. They are in turn input to procedures producing configuration source files (aka parameter files, q.v.), such as those for LATC, and offline calibrations (e.g., ACD pedestals). Each ancillary file belongs to a particular ancillary class. Examples of ancillary classes are ACD_BiasDacCalibration, CAL_trg_alignment, TKR_Mask.FSW input file, classA FSW input file is a binary which, if all goes well, will be registered with fmx and ultimately uploaded to the instrument. Each file belongs to one of the known FSW input classes. Examples of such classes are latc_SPT, lci_ACD.Parameter file, classA parameter file is source used to produce an FSW (binary) input, typically by running a flight software program like LATC_parser. Several parameter files may be used to produce a single FSW input (but not the other way around; that is, the association of {parameter files} to {FSW inputs} may be many-to-one, but never one-to-many). Like ancillary files or FSW inputs, parameter files always belong to one of the known set of types, called parameter classes (e.g., latc_CFE_CAL_FLE, latc_DFT_GNL_Timing, lci_TKR).
|