示例#1
0
        private SnapshotsProcess RefreshSnapshotsProcess()
        {
            SnapshotsProcess process = new SnapshotsProcess(globalParameters);

            process.inPath = txtSnapshotSourceDir.Text;
            process.outPath = txtSnapshotTargetDir.Text;
            process.snapshotFilePrefix = txtSnapshotFilePrefix.Text;
            process.firstSnapshotFile = Int32.Parse(txtFirstSnapshotFile.Text);
            process.lastSnapshotFile = Int32.Parse(txtLastSnapshotFile.Text);
            process.firstSnap = Int16.Parse(txtFirstSnap.Text);
            process.lastSnap = Int16.Parse(txtLastSnap.Text);
            process.writeArrays = chbWriteArrays.Checked;
            return process;
        }
示例#2
0
        /// <summary>
        /// Creates a new SnapshotsProcess to process the main snapshot files
        /// </summary>
        /// <param name="gp">The global parameters</param>
        /// <param name="inpath">Where the snapshot files are located on disk</param>
        /// <param name="outpath">Where the processed files should be written to before
        /// being bulk loaded into the database</param>
        /// <param name="opts">The command line options</param>
        /// <returns>A new SnapshotsProcess ready to be executed</returns>
        private static SnapshotsProcess RefreshSnapshotsProcess(GlobalParameters gp, string inpath, string outpath, CommandLineOptions opts)
        {
            SnapshotsProcess process = new SnapshotsProcess(gp);

            process.inPath = inpath;
            process.outPath = outpath;

            process.snapshotFilePrefix = LoaderParamSingleton.getInstance().snapFilePrefix;

            /* If we don't set the first and last snapshot files manually, the loader
             * will read how many subfiles the snapshot is supposed to have and read
             * that many*/

            //process.firstSnapshotFile = LoaderParamSingleton.getInstance().snapStartFile;
            //process.lastSnapshotFile = LoaderParamSingleton.getInstance().snapEndFile;
            process.snapNumber = opts.timestep;

            //TODO: HARDCODED
            process.writeArrays = true;

            return process;
        }