fixed plugin resolution pattern for fx plugin in plots

This commit is contained in:
darksnake 2016-12-19 17:37:59 +03:00
parent 04ef70f487
commit 6cd3ef7846
3 changed files with 14 additions and 17 deletions

View File

@ -23,6 +23,7 @@ import hep.dataforge.tables.TableTransform;
import hep.dataforge.workspace.AbstractTask; import hep.dataforge.workspace.AbstractTask;
import hep.dataforge.workspace.TaskModel; import hep.dataforge.workspace.TaskModel;
import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.Map; import java.util.Map;
@ -81,12 +82,12 @@ public class NumassFitScanSummaryTask extends AbstractTask<Table> {
Table res = TableTransform.sort(builder.build(), "msterile2", true); Table res = TableTransform.sort(builder.build(), "msterile2", true);
OutputStream stream = buildActionOutput(context, nodeName); try (OutputStream stream = buildActionOutput(context, nodeName)) {
String head = "Sterile neutrino mass scan summary\n" + meta.toString();
String head = "Sterile neutrino mass scan summary\n" + meta.toString(); ColumnedDataWriter.writeDataSet(stream, res, head);
} catch (IOException e) {
getLogger(meta).error("Failed to close output stream", e);
ColumnedDataWriter.writeDataSet(stream, res, head); }
return res; return res;
} }

View File

@ -242,6 +242,7 @@ public class NumassDataLoader extends AbstractLoader implements ObjectLoader<Env
if (!segmented && events.size() > MAX_EVENTS_PER_POINT) { if (!segmented && events.size() > MAX_EVENTS_PER_POINT) {
pointTime = events.get(events.size() - 1).getTime() - events.get(0).getTime(); pointTime = events.get(events.size() - 1).getTime() - events.get(0).getTime();
} }
return new RawNMPoint(u, u, return new RawNMPoint(u, u,
events, events,
pointTime, pointTime,

View File

@ -15,18 +15,11 @@
*/ */
package inr.numass.storage; package inr.numass.storage;
import inr.numass.storage.NMEvent;
import inr.numass.storage.RawNMFile;
import inr.numass.storage.RawNMPoint;
import hep.dataforge.data.FileDataFactory; import hep.dataforge.data.FileDataFactory;
import hep.dataforge.data.binary.Binary; import hep.dataforge.data.binary.Binary;
import hep.dataforge.meta.Meta; import hep.dataforge.meta.Meta;
import java.io.BufferedInputStream;
import java.io.File; import java.io.*;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
@ -38,8 +31,8 @@ import java.util.Scanner;
*/ */
public class NumassDataReader { public class NumassDataReader {
private String name;
private final InputStream stream; private final InputStream stream;
private String name;
private double HVdev = 2.468555393226049; private double HVdev = 2.468555393226049;
private boolean noUset = false; private boolean noUset = false;
@ -66,7 +59,9 @@ public class NumassDataReader {
} }
public RawNMFile read() throws IOException { public RawNMFile read() throws IOException {
return readFile(name); RawNMFile res = readFile(name);
stream.close();
return res;
} }
private int[] readBlock(int length) throws IOException { private int[] readBlock(int length) throws IOException {