public final class SvtTimingConstantsLoader extends Object
Be very careful about running this, because it will create many new conditions records that may already be present in the database. In fact, don't run this at all without talking to me first. :-)
Modifier and Type | Field and Description |
---|---|
private static Set<String> |
FIELDS
The fields from the run spreadsheet for SVT timing constants.
|
private static DatabaseConditionsManager |
MANAGER
Setup conditions.
|
Constructor and Description |
---|
SvtTimingConstantsLoader() |
Modifier and Type | Method and Description |
---|---|
private static List<SvtTimingConstants.SvtTimingConstantsCollection> |
createCollections(List<Collection<String>> uniqueValues)
Create the conditions collections from the unique values found in the spreadsheet.
|
private static SvtTimingConstants.SvtTimingConstantsCollection |
findCollection(List<SvtTimingConstants.SvtTimingConstantsCollection> timingConstantsList,
int offsetPhase,
double offsetTime)
Find a timing constants collection from offset phase and time.
|
static void |
main(String[] args)
Load the SVT timing constants for time and phase offsets into the conditions database.
|
private static final Set<String> FIELDS
private static final DatabaseConditionsManager MANAGER
private static List<SvtTimingConstants.SvtTimingConstantsCollection> createCollections(List<Collection<String>> uniqueValues)
uniqueValues
- the list of unique raw valuesprivate static SvtTimingConstants.SvtTimingConstantsCollection findCollection(List<SvtTimingConstants.SvtTimingConstantsCollection> timingConstantsList, int offsetPhase, double offsetTime)
Each collection has a single object in it.
timingConstantsList
- the list of collectionsoffsetPhase
- the offset phaseoffsetTime
- the offset timenull
if not foundpublic static void main(String[] args)
args
- the command line arguments (requires one argument which is CSV file name)Copyright © 2019. All rights reserved.