Fix output

This commit is contained in:
Alexander Nozik 2018-07-11 21:05:27 +03:00
parent 4efeac7657
commit e738dc9472
2 changed files with 8 additions and 4 deletions

View File

@ -40,6 +40,8 @@ import java.util.Map.Entry;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import static hep.dataforge.io.output.Output.TEXT_MODE;
/** /**
* @author Darksnake * @author Darksnake
*/ */
@ -129,7 +131,7 @@ public class MonitorCorrectAction extends OneToOneAction<Table, Table> {
// } // }
Table res = ListTable.infer(dataList); Table res = ListTable.infer(dataList);
context.getOutput().get(getName(), name).render(NumassUtils.INSTANCE.wrap(res, meta), Meta.empty()); context.getOutput().get(getName(), name, TEXT_MODE).render(NumassUtils.INSTANCE.wrap(res, meta), Meta.empty());
return res; return res;
} }
@ -194,7 +196,7 @@ public class MonitorCorrectAction extends OneToOneAction<Table, Table> {
String monitorFileName = meta.getString("monitorFile", "monitor"); String monitorFileName = meta.getString("monitorFile", "monitor");
ListTable data = ListTable.infer(monitorPoints); ListTable data = ListTable.infer(monitorPoints);
context.getOutput().get(getName(), monitorFileName).render(NumassUtils.INSTANCE.wrap(data, meta), Meta.empty()); context.getOutput().get(getName(), monitorFileName, TEXT_MODE).render(NumassUtils.INSTANCE.wrap(data, meta), Meta.empty());
// ColumnedDataWriter.writeTable(stream, TableTransform.sort(data, "Timestamp", true), "Monitor points", monitorNames); // ColumnedDataWriter.writeTable(stream, TableTransform.sort(data, "Timestamp", true), "Monitor points", monitorNames);
} }
} }

View File

@ -21,6 +21,8 @@ import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Optional; import java.util.Optional;
import static hep.dataforge.io.output.Output.TEXT_MODE;
/** /**
* @author <a href="mailto:altavir@gmail.com">Alexander Nozik</a> * @author <a href="mailto:altavir@gmail.com">Alexander Nozik</a>
*/ */
@ -49,7 +51,7 @@ public class SubstractSpectrumAction extends OneToOneAction<Table, Table> {
Table res = builder.build(); Table res = builder.build();
context.getOutput().get(getName(), name).render(NumassUtils.INSTANCE.wrap(res, inputMeta), Meta.empty()); context.getOutput().get(getName(), name, TEXT_MODE).render(NumassUtils.INSTANCE.wrap(res, inputMeta), Meta.empty());
return res; return res;
} catch (IOException ex) { } catch (IOException ex) {
throw new RuntimeException("Could not read reference file", ex); throw new RuntimeException("Could not read reference file", ex);