protected virtual void FinishReportGeneration() { try { // t.rows has the list of rows t.CreateReport(NC.App.AppContext.LogResults); } catch (Exception e) { ctrllog.TraceException(e); } finally { t.CloseOutputFile(); } }
public void GenerateReport(LMDAQ.HVControl.HVCalibrationParameters hvc, List <HVControl.HVStatus> HVSteps, DateTime time, String instId) { TabularReport t = new TabularReport(typeof(HVVals), NC.App.Loggers); // default file output type is CSV try { t.CreateOutputFile(NC.App.Opstate.Measurement.AcquireState.lm.Results, instId + " HV " + time.ToString("yyyyMMddHHmmss"), null); t.rows = new Row[HVSteps.Count + 4 + 2]; // header, steps, space, header, current params, space, header, config // first, the column header int cols = System.Enum.GetValues(typeof(HVVals)).Length; int i = 0; // now for each hvcalib row for (i = 0; i < HVSteps.Count; i++) { HVControl.HVStatus h = HVSteps[i]; Row row = CreateRow(h, i); t.rows[i] = row; } // then do the current parameters t.rows[i++] = new Row(); t.rows[i] = new Row(); t.rows[i++].GenFromEnum(typeof(HVCalibVals)); t.rows[i++] = CreateRow(hvc, i); t.rows[i++] = new Row(); // lastly, add the full software version state t.rows[i] = new Row(); t.rows[i++].Add(0, "Software application configuration details"); Row[] temp = AnalysisDefs.SimpleReport.GenSoftwareConfigRows(); Array.Resize(ref t.rows, temp.Length + t.rows.Length + 2); Array.Copy(temp, 0, t.rows, i, temp.Length); t.CreateReport(3); } catch (Exception e) { ctrllog.TraceException(e); } finally { t.CloseOutputFile(); } }
public void GenerateReport(LMDAQ.HVControl.HVCalibrationParameters hvc, List<HVControl.HVStatus> HVSteps, DateTime time, String instId) { TabularReport t = new TabularReport(typeof(HVVals), NC.App.Loggers); // default file output type is CSV try { t.CreateOutputFile(NC.App.Opstate.Measurement.AcquireState.lm.Results, instId + " HV " + time.ToString("yyyyMMddHHmmss"), null); t.rows = new Row[HVSteps.Count + 4 + 2]; // header, steps, space, header, current params, space, header, config // first, the column header int cols = System.Enum.GetValues(typeof(HVVals)).Length; int i = 0; // now for each hvcalib row for (i = 0; i < HVSteps.Count; i++) { HVControl.HVStatus h = HVSteps[i]; Row row = CreateRow(h, i); t.rows[i] = row; } // then do the current parameters t.rows[i++] = new Row(); t.rows[i] = new Row(); t.rows[i++].GenFromEnum(typeof(HVCalibVals)); t.rows[i++] = CreateRow(hvc, i); t.rows[i++] = new Row(); // lastly, add the full software version state t.rows[i] = new Row(); t.rows[i++].Add(0, "Software application configuration details"); Row[] temp = AnalysisDefs.SimpleReport.GenSoftwareConfigRows(); Array.Resize(ref t.rows, temp.Length + t.rows.Length + 2); Array.Copy(temp, 0, t.rows, i, temp.Length); t.CreateReport(3); } catch (Exception e) { ctrllog.TraceException(e); } finally { t.CloseOutputFile(); } }