From 69d1a3a8486ffbb0dfb6178bb74719d6745feb8f Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 1 Mar 2017 18:11:55 +0300 Subject: [PATCH] New envelope format, FileStorage overhaul --- .../inr/numass/actions/PrepareDataAction.java | 2 +- .../numass/actions/ReadLegacyDataAction.java | 6 ++--- .../inr/numass/storage/NumassDataLoader.java | 26 ++++++++++--------- .../viewer/NumassLoaderViewComponent.java | 2 +- .../main/java/inr/numass/viewer/Viewer.java | 8 ++++-- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java b/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java index 6047d0e5..fbfa281c 100644 --- a/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java +++ b/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java @@ -160,7 +160,7 @@ public class PrepareDataAction extends OneToOneAction { } else { head = dataFile.getName(); } - head = head + "\n" + new XMLMetaWriter().writeString(meta, null) + "\n"; + head = head + "\n" + new XMLMetaWriter().writeString(meta) + "\n"; ListTable data = new ListTable(format, dataList); diff --git a/numass-main/src/main/java/inr/numass/actions/ReadLegacyDataAction.java b/numass-main/src/main/java/inr/numass/actions/ReadLegacyDataAction.java index bb83357d..e0476947 100644 --- a/numass-main/src/main/java/inr/numass/actions/ReadLegacyDataAction.java +++ b/numass-main/src/main/java/inr/numass/actions/ReadLegacyDataAction.java @@ -45,9 +45,9 @@ public class ReadLegacyDataAction extends OneToOneAction { protected NMFile execute(Context context, String name, Binary source, Laminate meta) throws ContentException { // log.logString("File '%s' started", source.getName()); RawNMFile raw = getNumassData(source, meta); - if (meta.getBoolean("paw", false)) { - raw.generatePAW(buildActionOutput(context, name + ".paw")); - } +// if (meta.getBoolean("paw", false)) { +// raw.generatePAW(buildActionOutput(context, name + ".paw")); +// } if (meta.getNodeNames(false).contains("debunch")) { DebunchAction debunch = new DebunchAction(); diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassDataLoader.java b/numass-storage/src/main/java/inr/numass/storage/NumassDataLoader.java index cb4045fd..5b618050 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NumassDataLoader.java +++ b/numass-storage/src/main/java/inr/numass/storage/NumassDataLoader.java @@ -26,7 +26,6 @@ import hep.dataforge.storage.api.Storage; import hep.dataforge.storage.filestorage.FileEnvelope; import hep.dataforge.storage.loaders.AbstractLoader; import hep.dataforge.tables.Table; -import hep.dataforge.values.Value; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.VFS; import org.slf4j.LoggerFactory; @@ -189,7 +188,7 @@ public class NumassDataLoader extends AbstractLoader implements ObjectLoader 0) { buffer.flip(); @@ -329,17 +328,20 @@ public class NumassDataLoader extends AbstractLoader implements ObjectLoader