/// <summary> /// Initialize this global parameter using the param type enum value /// </summary> /// <param name="paramType">Param key type enum</param> private void InitializeByType(GlobalParamKeyType paramType) { ParamType = paramType; var dataType = GlobalParamUtilities.GetGlobalParamKeyDataType(paramType); switch (paramType) { case GlobalParamKeyType.InstrumentName: InitializeByType("InstrumentName", dataType, "Instrument name"); break; case GlobalParamKeyType.DateStarted: // Format has traditionally been M/d/yyyy hh:mm:ss tt // For example, 6/4/2014 12:56:44 PM InitializeByType("DateStarted", dataType, "Time that the data acquisition started"); break; case GlobalParamKeyType.NumFrames: InitializeByType("NumFrames", dataType, "Number of frames in the dataset"); break; case GlobalParamKeyType.TimeOffset: InitializeByType("TimeOffset", dataType, "Time offset from 0 (in nanoseconds). All bin numbers must be offset by this amount"); break; case GlobalParamKeyType.BinWidth: InitializeByType("BinWidth", dataType, "Width of TOF bins (in ns)"); break; case GlobalParamKeyType.Bins: InitializeByType("Bins", dataType, "Total number of TOF bins in frame"); break; case GlobalParamKeyType.TOFCorrectionTime: InitializeByType("TOFCorrectionTime", dataType, "TOF correction time"); break; case GlobalParamKeyType.TOFIntensityType: InitializeByType("TOFIntensityType", dataType, "Data type of intensity in each TOF record (ADC is int, TDC is short, FOLDED is float)"); break; case GlobalParamKeyType.DatasetType: InitializeByType("DatasetType", dataType, "Type of dataset (HMS, HMSn, or HMS-HMSn)"); break; case GlobalParamKeyType.PrescanTOFPulses: InitializeByType("PrescanTOFPulses", dataType, "Prescan TOF pulses; this tracks the maximum scan number in any frame"); break; case GlobalParamKeyType.PrescanAccumulations: InitializeByType("PrescanAccumulations", dataType, "Number of prescan accumulations"); break; case GlobalParamKeyType.PrescanTICThreshold: InitializeByType("PrescanTICThreshold", dataType, "Prescan TIC threshold"); break; case GlobalParamKeyType.PrescanContinuous: InitializeByType("PrescanContinuous", dataType, "Prescan Continuous flag (0 is false, 1 is true)"); break; case GlobalParamKeyType.PrescanProfile: InitializeByType("PrescanProfile", dataType, "Profile used when PrescanContinuous is 1"); break; case GlobalParamKeyType.InstrumentClass: InitializeByType("InstrumentClass", dataType, "Instrument class (0 for TOF, 1 for ppm bin-based)"); break; case GlobalParamKeyType.PpmBinBasedStartMz: InitializeByType("PpmBinBasedStartMz", dataType, "Starting m/z value for ppm bin-based mode"); break; case GlobalParamKeyType.PpmBinBasedEndMz: InitializeByType("PpmBinBasedEndMz", dataType, "Ending m/z value for ppm bin-based mode"); break; case GlobalParamKeyType.DriftTubeLength: InitializeByType("DriftTubeLength", dataType, "IMS Drift tube length in centimeters"); break; case GlobalParamKeyType.DriftGas: InitializeByType("DriftGas", dataType, "Drift gas (i.e., N2)"); break; case GlobalParamKeyType.Unknown: throw new ArgumentOutOfRangeException(nameof(paramType), "Cannot initialize a global parameter of type Unknown: " + (int)paramType); default: throw new ArgumentOutOfRangeException(nameof(paramType), "Unrecognized global param enum for paramType: " + (int)paramType); } }