From 9a1de9b6f2ef257cbf637ac6bd3e02c95e3e426a Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 15 Apr 2017 22:15:53 +0300 Subject: [PATCH] Viewer redone --- .hgignore | 2 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 54212 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 172 + gradlew.bat | 84 + .../build.gradle | 2 +- .../src/main/java/inr/numass/client/Cli.java | 0 .../java/inr/numass/client/ClientUtils.java | 0 .../java/inr/numass/client/NumassClient.java | 0 .../numass/client/RemoteNumassStorage.java | 0 numass-control/build.gradle | 2 +- {numass-storage => numass-core}/build.gradle | 2 + .../docs/server_commands.md | 0 .../java/inr/numass/data/NumassProto.java | 4450 +++++++++++++++++ .../java/inr/numass/NumassProperties.java | 0 .../main/java/inr/numass/data}/NMEvent.java | 2 +- .../main/java/inr/numass/data}/NMFile.java | 4 +- .../main/java/inr/numass/data}/NMPoint.java | 39 +- .../java/inr/numass/data}/NumassData.java | 2 +- .../inr/numass/data}/NumassDataReader.java | 2 +- .../java/inr/numass/data/NumassDataUtils.java | 134 + .../java/inr/numass/data}/NumassPoint.java | 2 +- .../java/inr/numass/data/PointBuilders.java | 53 + .../main/java/inr/numass/data}/RawNMFile.java | 2 +- .../java/inr/numass/data}/RawNMPoint.java | 2 +- .../inr/numass/data}/SetDirectionUtility.java | 2 +- .../inr/numass/data/SpectrumDataAdapter.java | 0 .../inr/numass/storage/NumassDataFactory.java | 1 + .../inr/numass/storage/NumassDataLoader.java | 6 +- .../inr/numass/storage/NumassStorage.java | 2 + .../main/proto/inr/numas}/numass-proto.proto | 2 +- .../services/hep.dataforge.data.DataLoader | 0 numass-main/build.gradle | 2 +- .../DetectorSpectrumSubstraction.groovy | 4 +- .../inr/numass/scripts/FindBorder.groovy | 7 +- .../groovy/inr/numass/scripts/Loss2014.groovy | 30 - .../inr/numass/scripts/ReadTextFile.groovy | 2 +- .../groovy/inr/numass/scripts/Simulate.groovy | 2 +- .../inr/numass/scripts/SimulatePileup.groovy | 4 +- .../inr/numass/scripts/Underflow.groovy | 6 +- .../plotfit/PlotFitResultAction.java | 4 +- .../src/main/java/inr/numass/NumassIO.java | 4 +- .../main/java/inr/numass/NumassPlugin.java | 1 - .../inr/numass/actions/DebunchAction.java | 4 +- .../inr/numass/actions/FindBorderAction.java | 8 +- .../numass/actions/JoinNumassDataAction.java | 6 +- .../inr/numass/actions/MergeDataAction.java | 4 +- .../numass/actions/MonitorCorrectAction.java | 6 +- .../inr/numass/actions/PrepareDataAction.java | 14 +- .../numass/actions/ReadLegacyDataAction.java | 4 +- .../actions/ShowEnergySpectrumAction.java | 6 +- .../actions/ShowLossSpectrumAction.java | 275 - .../java/inr/numass/actions/SlicedData.java | 90 - .../inr/numass/actions/SlicingAction.java | 81 - .../actions/SubstractSpectrumAction.java | 2 +- .../inr/numass/actions/SummaryAction.java | 2 +- .../main/java/inr/numass/data/ESpectrum.java | 84 - .../java/inr/numass/data/ESpectrumUtils.java | 42 - .../java/inr/numass/data/NumassPawReader.java | 2 +- .../inr/numass/data/SpectrumInformation.java | 8 +- .../java/inr/numass/debunch/DebunchData.java | 5 +- .../java/inr/numass/debunch/DebunchEvent.java | 2 +- .../inr/numass/debunch/DebunchReport.java | 5 +- .../inr/numass/debunch/DebunchReportImpl.java | 5 +- .../java/inr/numass/debunch/Debuncher.java | 2 +- .../main/java/inr/numass/debunch/Frame.java | 5 +- .../inr/numass/debunch/FrameAnalizer.java | 2 +- .../tasks/NumassFitScanSummaryTask.java | 2 +- .../inr/numass/tasks/NumassPrepareTask.java | 2 +- .../tasks/NumassSubstractEmptySourceTask.java | 2 +- .../java/inr/numass/utils/BunchGenerator.java | 7 +- .../inr/numass/utils/NMEventGenerator.java | 6 +- .../utils/NMEventGeneratorWithPulser.java | 2 +- .../inr/numass/utils/PileUpSimulator.java | 14 +- .../java/inr/numass/utils/TritiumUtils.java | 68 +- .../inr/numass/utils/UnderflowCorrection.java | 2 +- .../build.gradle | 2 +- .../java/inr/numass/server/HandlerUtils.java | 0 .../java/inr/numass/server/NumassNote.java | 0 .../inr/numass/server/NumassRootHandler.java | 0 .../java/inr/numass/server/NumassRun.java | 0 .../java/inr/numass/server/NumassServer.java | 0 .../inr/numass/server/NumassServerDaemon.java | 0 .../inr/numass/server/NumassServerUtils.java | 0 .../numass/server/NumassStorageHandler.java | 2 +- .../java/inr/numass/server/ServerRunner.java | 0 .../server/UnknownNumassActionException.java | 0 .../main/resources/templates/NoteLoader.ftl | 0 .../main/resources/templates/NumassLoader.ftl | 0 .../main/resources/templates/NumassRoot.ftl | 0 .../inr/numass/storage/NumassDataUtils.java | 69 - .../java/inr/numass/storage/ProtoUtils.java | 22 - .../test => numass-test}/build.gradle | 9 +- .../inr/numass/scripts/FixStampEndings.groovy | 0 .../groovy/inr/numass/scripts/StartRun.groovy | 0 .../inr/numass/scripts/TestClient.groovy | 0 .../numass/scripts/TestFileTransfer.groovy | 0 .../inr/numass/scripts/TestNotes.groovy | 0 .../numass/scripts/TestRemoteClient.groovy | 0 .../inr/numass/scripts/TestServer.groovy | 0 .../inr/numass/scripts/TestStateChange.groovy | 0 .../numass/scripts/TestStorageAccess.groovy | 0 numass-viewer/build.gradle | 27 +- numass-viewer/proguard.cfg | 9 - .../numass/viewer/MainViewerController.java | 253 - .../viewer/NumassLoaderTreeBuilder.java | 241 - .../viewer/NumassLoaderViewComponent.java | 433 -- .../numass/viewer/TestDirectoryViewer.java | 5 +- .../main/java/inr/numass/viewer/Viewer.java | 71 - .../main/kotlin/inr/numass/viewer/MainView.kt | 228 + .../inr/numass/viewer/NumassLoaderView.kt | 383 ++ .../kotlin/inr/numass/viewer/TreeBuilder.kt | 120 + .../main/kotlin/inr/numass/viewer/Viewer.kt | 22 + .../src/main/resources/fxml/MainView.fxml | 64 +- .../main/resources/fxml/NumassLoaderView.fxml | 22 +- settings.gradle | 10 +- 116 files changed, 5806 insertions(+), 1996 deletions(-) create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat rename {numass-storage/numass-client => numass-client}/build.gradle (82%) rename {numass-storage/numass-client => numass-client}/src/main/java/inr/numass/client/Cli.java (100%) rename {numass-storage/numass-client => numass-client}/src/main/java/inr/numass/client/ClientUtils.java (100%) rename {numass-storage/numass-client => numass-client}/src/main/java/inr/numass/client/NumassClient.java (100%) rename {numass-storage/numass-client => numass-client}/src/main/java/inr/numass/client/RemoteNumassStorage.java (100%) rename {numass-storage => numass-core}/build.gradle (87%) rename {numass-storage => numass-core}/docs/server_commands.md (100%) create mode 100644 numass-core/gen/main/java/inr/numass/data/NumassProto.java rename {numass-main => numass-core}/src/main/java/inr/numass/NumassProperties.java (100%) rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/NMEvent.java (93%) rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/NMFile.java (92%) rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/NMPoint.java (69%) rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/NumassData.java (98%) rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/NumassDataReader.java (95%) create mode 100644 numass-core/src/main/java/inr/numass/data/NumassDataUtils.java rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/NumassPoint.java (94%) create mode 100644 numass-core/src/main/java/inr/numass/data/PointBuilders.java rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/RawNMFile.java (95%) rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/RawNMPoint.java (95%) rename {numass-storage/src/main/java/inr/numass/storage => numass-core/src/main/java/inr/numass/data}/SetDirectionUtility.java (96%) rename {numass-main => numass-core}/src/main/java/inr/numass/data/SpectrumDataAdapter.java (100%) rename {numass-storage => numass-core}/src/main/java/inr/numass/storage/NumassDataFactory.java (93%) rename {numass-storage => numass-core}/src/main/java/inr/numass/storage/NumassDataLoader.java (95%) rename {numass-storage => numass-core}/src/main/java/inr/numass/storage/NumassStorage.java (96%) rename {numass-storage/src/main/proto/inr/numas/storage/proto => numass-core/src/main/proto/inr/numas}/numass-proto.proto (96%) rename {numass-storage => numass-core}/src/main/resources/META-INF/services/hep.dataforge.data.DataLoader (100%) delete mode 100644 numass-main/src/main/groovy/inr/numass/scripts/Loss2014.groovy delete mode 100644 numass-main/src/main/java/inr/numass/actions/ShowLossSpectrumAction.java delete mode 100644 numass-main/src/main/java/inr/numass/actions/SlicedData.java delete mode 100644 numass-main/src/main/java/inr/numass/actions/SlicingAction.java delete mode 100644 numass-main/src/main/java/inr/numass/data/ESpectrum.java delete mode 100644 numass-main/src/main/java/inr/numass/data/ESpectrumUtils.java rename {numass-storage/numass-server => numass-server}/build.gradle (89%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/HandlerUtils.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/NumassNote.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/NumassRootHandler.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/NumassRun.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/NumassServer.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/NumassServerDaemon.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/NumassServerUtils.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/NumassStorageHandler.java (96%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/ServerRunner.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/java/inr/numass/server/UnknownNumassActionException.java (100%) rename {numass-storage/numass-server => numass-server}/src/main/resources/templates/NoteLoader.ftl (100%) rename {numass-storage/numass-server => numass-server}/src/main/resources/templates/NumassLoader.ftl (100%) rename {numass-storage/numass-server => numass-server}/src/main/resources/templates/NumassRoot.ftl (100%) delete mode 100644 numass-storage/src/main/java/inr/numass/storage/NumassDataUtils.java delete mode 100644 numass-storage/src/main/java/inr/numass/storage/ProtoUtils.java rename {numass-storage/test => numass-test}/build.gradle (85%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/FixStampEndings.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/StartRun.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/TestClient.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/TestFileTransfer.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/TestNotes.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/TestRemoteClient.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/TestServer.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/TestStateChange.groovy (100%) rename {numass-storage/test => numass-test}/src/main/groovy/inr/numass/scripts/TestStorageAccess.groovy (100%) delete mode 100644 numass-viewer/proguard.cfg delete mode 100644 numass-viewer/src/main/java/inr/numass/viewer/MainViewerController.java delete mode 100644 numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderTreeBuilder.java delete mode 100644 numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java delete mode 100644 numass-viewer/src/main/java/inr/numass/viewer/Viewer.java create mode 100644 numass-viewer/src/main/kotlin/inr/numass/viewer/MainView.kt create mode 100644 numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt create mode 100644 numass-viewer/src/main/kotlin/inr/numass/viewer/TreeBuilder.kt create mode 100644 numass-viewer/src/main/kotlin/inr/numass/viewer/Viewer.kt diff --git a/.hgignore b/.hgignore index ccb1ce15..d05d0a78 100644 --- a/.hgignore +++ b/.hgignore @@ -11,3 +11,5 @@ private/* .nb-gradle/* .idea/ *.iml + +/numass-core/gen/ diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..b5a3db4d21b5c54292b1e3122aff331d44aa7b88 GIT binary patch literal 54212 zcmaI7W3XjgkTrT(b!^+VZQHhOvyN@swr$(CZTqW^?*97Se)qi=aD0)rp{0Dyr30B0LY0Q|jx{^R!d0{?5$!b<$q;xZz%zyNapa0Id{I^zH9pz_!L zhX0SFG{20vh_Ip(jkL&v^yGw;BsI+(v?Mjf^yEx~0^K6x?$P}u^{Dui^c1By6(GcU zuu<}1p$2&?Dsk~)p}}Z>6UIf_Df+#`ode+iWc@n?a0CnhAn~t1*}sRV{%5GLo3Wv@ldS`dp_RU) zW0Go^C*lhHPgNY1yE@b;S}lDT0I)zjy=!Yc5~kwjyBsy9#lo<B-drm>rrDIyfBIgDHmdTOlynaj^YNC~(=kX-xq)OEg=^y(@<7VNN5aU3ByadzwJkakX$q zXreb7ob9Or&(~c~cQ;(e9o*sHZag!bxQ9z2{cg!8un)I!blC@QKn*!3OQHj>XfwDc zdx-j8@h7r(w`XuXh{L99e`e}lPmC`IQC9~eI^PLux{-!c);?=$dsPKrF=lj4pBeEx z@eE;)Q@zE9S#PC(bx|Ea92+OvGe_Ero3U?Z;NYBJVW3}QW1-=qpJU2GLl=7l2a6I5 zy~~uBEKO&o=bTGv7H8*h;OUFE#L;S4Y;zPJOQZ)bQ~aqGJi~z%U}khSdo2xVYY$K3 z@i6lmx#m7Ni}L}m81_&+INR&X%hnKrE%_xwlPbc`NUcpNp=O?;Q~#)CI=)5vfJvz! z`iQl*VZmf2c#7r++8#xv-rOiVV+mZ820n$QLb|#vmJ=uM zIHIIzy1r)AgWZLsSU&(LwZx|3D>rko42;0CqIQH^PCY^-=2W?s0K#p`sL^-FrYC)Y zbo$)kXl~rM2vJ^!y&RD!hDiJio!%LI!a&ms)P3q43;p~Ek_>~GQL!x@LevG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W&x=pSdmErnADGs ziUhUF=N9j##k)Ez0*4%CC06eEwZxyIr7flLGMdP zVxZYs$+t24c~km$3$Dn&n)!40*7CUqW>hEkDrq-7KAWr&9=nxM0h2U9)d7eA@bjmh zJwW#EpSA2apDWlyK|ulenFUAyF#eYS0r`M*9ZbyiX>ASk3{0%;e^$kpq@@}e8a<^R zmX@HcVVPkXX95Fw=s`lke{lJV2FM6-+z0#)41x*-C?5bEG(+z{;DB-Sp9JvndX}Vx z75HhzWkdkFn}5v)VxGUr5BOsxz|W7DeM&#X!Ty&`nqNj-L|9(om9)su2&VuamLEC( zOAIhk{FKrF&sMfZf8l(d17H~aDRlszf8_X6*Z-fWe$>HJ`UZIXDdV3p2Yz9me+UBZ zhXMk656JyPx$!CC1J+8v0Z_Kpv9>m_6?QhzbNHXG=<{N2@2l9A0H78CKg3UvfG290 z-=c~O0d#ZBt#tJNSZY1T)4ejG-T|x-uwVS)5Ag(v2B@yzl=2NAssg{Aoq>g}`F{oX zo@46G9j4d-FcIPY(29S;b|8MDj zKja`R2vYC>lfpir)(HOsXA025`VHKl?ecrH=V4c$0DIs57ESc`L0F$R$@3srPq>wu z|A70ukXO&4p9dy-f>zT0E%cu=<8Q(gJ%@fC7v>3?QSX0W)jwzK-+ozt2K?bQ`2*lb zKl+gX?N%BuuXP+1U`K_BLs=Jh5sGhGneyY3wqwSyH1bLzv1uWQ~ z&7MEO{@Emde=p>h_j%^r{zPPu^$XE|(ErZW{W)>{7+PWV@Q7v|J(-r1h3foPw;<^zu#MgpOZW{ zqdk#0ef)*wzZ3jVz54%{L!O&Pp5Q^c{W7gKU?xNY0;&M~EfCQE1MD`{?f?J) literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..96936931 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Apr 05 18:15:59 MSK 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip diff --git a/gradlew b/gradlew new file mode 100644 index 00000000..4453ccea --- /dev/null +++ b/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save ( ) { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..e95643d6 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,84 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/numass-storage/numass-client/build.gradle b/numass-client/build.gradle similarity index 82% rename from numass-storage/numass-client/build.gradle rename to numass-client/build.gradle index f727accd..ee95af75 100644 --- a/numass-storage/numass-client/build.gradle +++ b/numass-client/build.gradle @@ -7,7 +7,7 @@ if (!hasProperty('mainClass')) { mainClassName = mainClass dependencies { - compile project(':numass-storage') + compile project(':numass-core') compile 'commons-cli:commons-cli:1.3.1' compile 'org.zeroturnaround:zt-zip:1.9' } \ No newline at end of file diff --git a/numass-storage/numass-client/src/main/java/inr/numass/client/Cli.java b/numass-client/src/main/java/inr/numass/client/Cli.java similarity index 100% rename from numass-storage/numass-client/src/main/java/inr/numass/client/Cli.java rename to numass-client/src/main/java/inr/numass/client/Cli.java diff --git a/numass-storage/numass-client/src/main/java/inr/numass/client/ClientUtils.java b/numass-client/src/main/java/inr/numass/client/ClientUtils.java similarity index 100% rename from numass-storage/numass-client/src/main/java/inr/numass/client/ClientUtils.java rename to numass-client/src/main/java/inr/numass/client/ClientUtils.java diff --git a/numass-storage/numass-client/src/main/java/inr/numass/client/NumassClient.java b/numass-client/src/main/java/inr/numass/client/NumassClient.java similarity index 100% rename from numass-storage/numass-client/src/main/java/inr/numass/client/NumassClient.java rename to numass-client/src/main/java/inr/numass/client/NumassClient.java diff --git a/numass-storage/numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java b/numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java similarity index 100% rename from numass-storage/numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java rename to numass-client/src/main/java/inr/numass/client/RemoteNumassStorage.java diff --git a/numass-control/build.gradle b/numass-control/build.gradle index c95858cc..4e5b9b82 100644 --- a/numass-control/build.gradle +++ b/numass-control/build.gradle @@ -6,7 +6,7 @@ configurations { } dependencies { - compile project(':numass-storage:numass-client') + compile project(':numass-client') compile "hep.dataforge:plots-jfc" // project(':dataforge-plots:plots-jfc') compile "hep.dataforge:dataforge-control" //project(':dataforge-control') compile "hep.dataforge:dataforge-fx" //project(':dataforge-fx') diff --git a/numass-storage/build.gradle b/numass-core/build.gradle similarity index 87% rename from numass-storage/build.gradle rename to numass-core/build.gradle index 6b2a84d6..228afaec 100644 --- a/numass-storage/build.gradle +++ b/numass-core/build.gradle @@ -9,6 +9,8 @@ buildscript { apply plugin: 'com.google.protobuf' +description = "A bse package with minimal dependencies for numass" + dependencies { compile "hep.dataforge:dataforge-storage" //project(':dataforge-storage') diff --git a/numass-storage/docs/server_commands.md b/numass-core/docs/server_commands.md similarity index 100% rename from numass-storage/docs/server_commands.md rename to numass-core/docs/server_commands.md diff --git a/numass-core/gen/main/java/inr/numass/data/NumassProto.java b/numass-core/gen/main/java/inr/numass/data/NumassProto.java new file mode 100644 index 00000000..fbc1e409 --- /dev/null +++ b/numass-core/gen/main/java/inr/numass/data/NumassProto.java @@ -0,0 +1,4450 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: inr/numas/numass-proto.proto + +package inr.numass.data; + +public final class NumassProto { + private NumassProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PointOrBuilder extends + // @@protoc_insertion_point(interface_extends:inr.numass.data.Point) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + java.util.List + getChannelsList(); + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + inr.numass.data.NumassProto.Point.Channel getChannels(int index); + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + int getChannelsCount(); + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + java.util.List + getChannelsOrBuilderList(); + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + inr.numass.data.NumassProto.Point.ChannelOrBuilder getChannelsOrBuilder( + int index); + } + /** + * Protobuf type {@code inr.numass.data.Point} + */ + public static final class Point extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:inr.numass.data.Point) + PointOrBuilder { + // Use Point.newBuilder() to construct. + private Point(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Point() { + channels_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Point( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + channels_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + channels_.add( + input.readMessage(inr.numass.data.NumassProto.Point.Channel.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + channels_ = java.util.Collections.unmodifiableList(channels_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.class, inr.numass.data.NumassProto.Point.Builder.class); + } + + public interface ChannelOrBuilder extends + // @@protoc_insertion_point(interface_extends:inr.numass.data.Point.Channel) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +       * номер канала
    +       * 
    + * + * uint64 num = 1; + */ + long getNum(); + + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + java.util.List + getBlocksList(); + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + inr.numass.data.NumassProto.Point.Channel.Block getBlocks(int index); + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + int getBlocksCount(); + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + java.util.List + getBlocksOrBuilderList(); + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + inr.numass.data.NumassProto.Point.Channel.BlockOrBuilder getBlocksOrBuilder( + int index); + } + /** + * Protobuf type {@code inr.numass.data.Point.Channel} + */ + public static final class Channel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:inr.numass.data.Point.Channel) + ChannelOrBuilder { + // Use Channel.newBuilder() to construct. + private Channel(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Channel() { + num_ = 0L; + blocks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Channel( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + num_ = input.readUInt64(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + blocks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + blocks_.add( + input.readMessage(inr.numass.data.NumassProto.Point.Channel.Block.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.class, inr.numass.data.NumassProto.Point.Channel.Builder.class); + } + + public interface BlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:inr.numass.data.Point.Channel.Block) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +         * время начала блока в наносекундах с начала эпохи
    +         * 
    + * + * uint64 time = 1; + */ + long getTime(); + + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + java.util.List + getEventsList(); + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + inr.numass.data.NumassProto.Point.Channel.Block.Event getEvents(int index); + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + int getEventsCount(); + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + java.util.List + getEventsOrBuilderList(); + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + inr.numass.data.NumassProto.Point.Channel.Block.EventOrBuilder getEventsOrBuilder( + int index); + + /** + *
    +         * массив обработанных событий
    +         * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + boolean hasPeaks(); + /** + *
    +         * массив обработанных событий
    +         * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + inr.numass.data.NumassProto.Point.Channel.Block.Peaks getPeaks(); + /** + *
    +         * массив обработанных событий
    +         * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + inr.numass.data.NumassProto.Point.Channel.Block.PeaksOrBuilder getPeaksOrBuilder(); + } + /** + * Protobuf type {@code inr.numass.data.Point.Channel.Block} + */ + public static final class Block extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:inr.numass.data.Point.Channel.Block) + BlockOrBuilder { + // Use Block.newBuilder() to construct. + private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Block() { + time_ = 0L; + events_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Block( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + time_ = input.readUInt64(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + events_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + events_.add( + input.readMessage(inr.numass.data.NumassProto.Point.Channel.Block.Event.parser(), extensionRegistry)); + break; + } + case 26: { + inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder subBuilder = null; + if (peaks_ != null) { + subBuilder = peaks_.toBuilder(); + } + peaks_ = input.readMessage(inr.numass.data.NumassProto.Point.Channel.Block.Peaks.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(peaks_); + peaks_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + events_ = java.util.Collections.unmodifiableList(events_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.Block.class, inr.numass.data.NumassProto.Point.Channel.Block.Builder.class); + } + + public interface EventOrBuilder extends + // @@protoc_insertion_point(interface_extends:inr.numass.data.Point.Channel.Block.Event) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * uint64 time = 1; + */ + long getTime(); + + /** + *
    +           * массив кадра события в формате int16
    +           * 
    + * + * bytes data = 2; + */ + com.google.protobuf.ByteString getData(); + } + /** + *
    +         * Необработанное событие
    +         * 
    + * + * Protobuf type {@code inr.numass.data.Point.Channel.Block.Event} + */ + public static final class Event extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:inr.numass.data.Point.Channel.Block.Event) + EventOrBuilder { + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Event() { + time_ = 0L; + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Event( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + time_ = input.readUInt64(); + break; + } + case 18: { + + data_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Event_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.Block.Event.class, inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_; + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * uint64 time = 1; + */ + public long getTime() { + return time_; + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_; + /** + *
    +           * массив кадра события в формате int16
    +           * 
    + * + * bytes data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, data_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof inr.numass.data.NumassProto.Point.Channel.Block.Event)) { + return super.equals(obj); + } + inr.numass.data.NumassProto.Point.Channel.Block.Event other = (inr.numass.data.NumassProto.Point.Channel.Block.Event) obj; + + boolean result = true; + result = result && (getTime() + == other.getTime()); + result = result && getData() + .equals(other.getData()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(inr.numass.data.NumassProto.Point.Channel.Block.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +           * Необработанное событие
    +           * 
    + * + * Protobuf type {@code inr.numass.data.Point.Channel.Block.Event} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:inr.numass.data.Point.Channel.Block.Event) + inr.numass.data.NumassProto.Point.Channel.Block.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Event_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.Block.Event.class, inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder.class); + } + + // Construct using inr.numass.data.NumassProto.Point.Channel.Block.Event.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + time_ = 0L; + + data_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Event_descriptor; + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Event getDefaultInstanceForType() { + return inr.numass.data.NumassProto.Point.Channel.Block.Event.getDefaultInstance(); + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Event build() { + inr.numass.data.NumassProto.Point.Channel.Block.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Event buildPartial() { + inr.numass.data.NumassProto.Point.Channel.Block.Event result = new inr.numass.data.NumassProto.Point.Channel.Block.Event(this); + result.time_ = time_; + result.data_ = data_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof inr.numass.data.NumassProto.Point.Channel.Block.Event) { + return mergeFrom((inr.numass.data.NumassProto.Point.Channel.Block.Event)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(inr.numass.data.NumassProto.Point.Channel.Block.Event other) { + if (other == inr.numass.data.NumassProto.Point.Channel.Block.Event.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + inr.numass.data.NumassProto.Point.Channel.Block.Event parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (inr.numass.data.NumassProto.Point.Channel.Block.Event) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long time_ ; + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * uint64 time = 1; + */ + public long getTime() { + return time_; + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * uint64 time = 1; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * uint64 time = 1; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
    +             * массив кадра события в формате int16
    +             * 
    + * + * bytes data = 2; + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
    +             * массив кадра события в формате int16
    +             * 
    + * + * bytes data = 2; + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
    +             * массив кадра события в формате int16
    +             * 
    + * + * bytes data = 2; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:inr.numass.data.Point.Channel.Block.Event) + } + + // @@protoc_insertion_point(class_scope:inr.numass.data.Point.Channel.Block.Event) + private static final inr.numass.data.NumassProto.Point.Channel.Block.Event DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new inr.numass.data.NumassProto.Point.Channel.Block.Event(); + } + + public static inr.numass.data.NumassProto.Point.Channel.Block.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Event(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PeaksOrBuilder extends + // @@protoc_insertion_point(interface_extends:inr.numass.data.Point.Channel.Block.Peaks) + com.google.protobuf.MessageOrBuilder { + + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * repeated uint64 times = 1; + */ + java.util.List getTimesList(); + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * repeated uint64 times = 1; + */ + int getTimesCount(); + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * repeated uint64 times = 1; + */ + long getTimes(int index); + + /** + *
    +           *амплитуда события в каналах
    +           * 
    + * + * repeated uint64 amplitudes = 2; + */ + java.util.List getAmplitudesList(); + /** + *
    +           *амплитуда события в каналах
    +           * 
    + * + * repeated uint64 amplitudes = 2; + */ + int getAmplitudesCount(); + /** + *
    +           *амплитуда события в каналах
    +           * 
    + * + * repeated uint64 amplitudes = 2; + */ + long getAmplitudes(int index); + } + /** + *
    +         * Обработанные события. Содержат только время и амплитуду сигналов.
    +         * Для экономии места при сериализации амплитуды и времена лежат в
    +         * разных массивах. Амплитуда и время имеющие одинаковые индексы
    +         * соответствуют одному событию
    +         * 
    + * + * Protobuf type {@code inr.numass.data.Point.Channel.Block.Peaks} + */ + public static final class Peaks extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:inr.numass.data.Point.Channel.Block.Peaks) + PeaksOrBuilder { + // Use Peaks.newBuilder() to construct. + private Peaks(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Peaks() { + times_ = java.util.Collections.emptyList(); + amplitudes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Peaks( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + times_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + times_.add(input.readUInt64()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { + times_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + times_.add(input.readUInt64()); + } + input.popLimit(limit); + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + amplitudes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + amplitudes_.add(input.readUInt64()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { + amplitudes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + amplitudes_.add(input.readUInt64()); + } + input.popLimit(limit); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + times_ = java.util.Collections.unmodifiableList(times_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + amplitudes_ = java.util.Collections.unmodifiableList(amplitudes_); + } + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Peaks_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Peaks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.Block.Peaks.class, inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder.class); + } + + public static final int TIMES_FIELD_NUMBER = 1; + private java.util.List times_; + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * repeated uint64 times = 1; + */ + public java.util.List + getTimesList() { + return times_; + } + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * repeated uint64 times = 1; + */ + public int getTimesCount() { + return times_.size(); + } + /** + *
    +           *время в наносекундах от начала блока
    +           * 
    + * + * repeated uint64 times = 1; + */ + public long getTimes(int index) { + return times_.get(index); + } + private int timesMemoizedSerializedSize = -1; + + public static final int AMPLITUDES_FIELD_NUMBER = 2; + private java.util.List amplitudes_; + /** + *
    +           *амплитуда события в каналах
    +           * 
    + * + * repeated uint64 amplitudes = 2; + */ + public java.util.List + getAmplitudesList() { + return amplitudes_; + } + /** + *
    +           *амплитуда события в каналах
    +           * 
    + * + * repeated uint64 amplitudes = 2; + */ + public int getAmplitudesCount() { + return amplitudes_.size(); + } + /** + *
    +           *амплитуда события в каналах
    +           * 
    + * + * repeated uint64 amplitudes = 2; + */ + public long getAmplitudes(int index) { + return amplitudes_.get(index); + } + private int amplitudesMemoizedSerializedSize = -1; + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getTimesList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(timesMemoizedSerializedSize); + } + for (int i = 0; i < times_.size(); i++) { + output.writeUInt64NoTag(times_.get(i)); + } + if (getAmplitudesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(amplitudesMemoizedSerializedSize); + } + for (int i = 0; i < amplitudes_.size(); i++) { + output.writeUInt64NoTag(amplitudes_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < times_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(times_.get(i)); + } + size += dataSize; + if (!getTimesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + timesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < amplitudes_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(amplitudes_.get(i)); + } + size += dataSize; + if (!getAmplitudesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + amplitudesMemoizedSerializedSize = dataSize; + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof inr.numass.data.NumassProto.Point.Channel.Block.Peaks)) { + return super.equals(obj); + } + inr.numass.data.NumassProto.Point.Channel.Block.Peaks other = (inr.numass.data.NumassProto.Point.Channel.Block.Peaks) obj; + + boolean result = true; + result = result && getTimesList() + .equals(other.getTimesList()); + result = result && getAmplitudesList() + .equals(other.getAmplitudesList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTimesCount() > 0) { + hash = (37 * hash) + TIMES_FIELD_NUMBER; + hash = (53 * hash) + getTimesList().hashCode(); + } + if (getAmplitudesCount() > 0) { + hash = (37 * hash) + AMPLITUDES_FIELD_NUMBER; + hash = (53 * hash) + getAmplitudesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(inr.numass.data.NumassProto.Point.Channel.Block.Peaks prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
    +           * Обработанные события. Содержат только время и амплитуду сигналов.
    +           * Для экономии места при сериализации амплитуды и времена лежат в
    +           * разных массивах. Амплитуда и время имеющие одинаковые индексы
    +           * соответствуют одному событию
    +           * 
    + * + * Protobuf type {@code inr.numass.data.Point.Channel.Block.Peaks} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:inr.numass.data.Point.Channel.Block.Peaks) + inr.numass.data.NumassProto.Point.Channel.Block.PeaksOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Peaks_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Peaks_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.Block.Peaks.class, inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder.class); + } + + // Construct using inr.numass.data.NumassProto.Point.Channel.Block.Peaks.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + times_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + amplitudes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_Peaks_descriptor; + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Peaks getDefaultInstanceForType() { + return inr.numass.data.NumassProto.Point.Channel.Block.Peaks.getDefaultInstance(); + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Peaks build() { + inr.numass.data.NumassProto.Point.Channel.Block.Peaks result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Peaks buildPartial() { + inr.numass.data.NumassProto.Point.Channel.Block.Peaks result = new inr.numass.data.NumassProto.Point.Channel.Block.Peaks(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + times_ = java.util.Collections.unmodifiableList(times_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.times_ = times_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + amplitudes_ = java.util.Collections.unmodifiableList(amplitudes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.amplitudes_ = amplitudes_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof inr.numass.data.NumassProto.Point.Channel.Block.Peaks) { + return mergeFrom((inr.numass.data.NumassProto.Point.Channel.Block.Peaks)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(inr.numass.data.NumassProto.Point.Channel.Block.Peaks other) { + if (other == inr.numass.data.NumassProto.Point.Channel.Block.Peaks.getDefaultInstance()) return this; + if (!other.times_.isEmpty()) { + if (times_.isEmpty()) { + times_ = other.times_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTimesIsMutable(); + times_.addAll(other.times_); + } + onChanged(); + } + if (!other.amplitudes_.isEmpty()) { + if (amplitudes_.isEmpty()) { + amplitudes_ = other.amplitudes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAmplitudesIsMutable(); + amplitudes_.addAll(other.amplitudes_); + } + onChanged(); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + inr.numass.data.NumassProto.Point.Channel.Block.Peaks parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (inr.numass.data.NumassProto.Point.Channel.Block.Peaks) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List times_ = java.util.Collections.emptyList(); + private void ensureTimesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + times_ = new java.util.ArrayList(times_); + bitField0_ |= 0x00000001; + } + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * repeated uint64 times = 1; + */ + public java.util.List + getTimesList() { + return java.util.Collections.unmodifiableList(times_); + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * repeated uint64 times = 1; + */ + public int getTimesCount() { + return times_.size(); + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * repeated uint64 times = 1; + */ + public long getTimes(int index) { + return times_.get(index); + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * repeated uint64 times = 1; + */ + public Builder setTimes( + int index, long value) { + ensureTimesIsMutable(); + times_.set(index, value); + onChanged(); + return this; + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * repeated uint64 times = 1; + */ + public Builder addTimes(long value) { + ensureTimesIsMutable(); + times_.add(value); + onChanged(); + return this; + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * repeated uint64 times = 1; + */ + public Builder addAllTimes( + java.lang.Iterable values) { + ensureTimesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, times_); + onChanged(); + return this; + } + /** + *
    +             *время в наносекундах от начала блока
    +             * 
    + * + * repeated uint64 times = 1; + */ + public Builder clearTimes() { + times_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private java.util.List amplitudes_ = java.util.Collections.emptyList(); + private void ensureAmplitudesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + amplitudes_ = new java.util.ArrayList(amplitudes_); + bitField0_ |= 0x00000002; + } + } + /** + *
    +             *амплитуда события в каналах
    +             * 
    + * + * repeated uint64 amplitudes = 2; + */ + public java.util.List + getAmplitudesList() { + return java.util.Collections.unmodifiableList(amplitudes_); + } + /** + *
    +             *амплитуда события в каналах
    +             * 
    + * + * repeated uint64 amplitudes = 2; + */ + public int getAmplitudesCount() { + return amplitudes_.size(); + } + /** + *
    +             *амплитуда события в каналах
    +             * 
    + * + * repeated uint64 amplitudes = 2; + */ + public long getAmplitudes(int index) { + return amplitudes_.get(index); + } + /** + *
    +             *амплитуда события в каналах
    +             * 
    + * + * repeated uint64 amplitudes = 2; + */ + public Builder setAmplitudes( + int index, long value) { + ensureAmplitudesIsMutable(); + amplitudes_.set(index, value); + onChanged(); + return this; + } + /** + *
    +             *амплитуда события в каналах
    +             * 
    + * + * repeated uint64 amplitudes = 2; + */ + public Builder addAmplitudes(long value) { + ensureAmplitudesIsMutable(); + amplitudes_.add(value); + onChanged(); + return this; + } + /** + *
    +             *амплитуда события в каналах
    +             * 
    + * + * repeated uint64 amplitudes = 2; + */ + public Builder addAllAmplitudes( + java.lang.Iterable values) { + ensureAmplitudesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, amplitudes_); + onChanged(); + return this; + } + /** + *
    +             *амплитуда события в каналах
    +             * 
    + * + * repeated uint64 amplitudes = 2; + */ + public Builder clearAmplitudes() { + amplitudes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:inr.numass.data.Point.Channel.Block.Peaks) + } + + // @@protoc_insertion_point(class_scope:inr.numass.data.Point.Channel.Block.Peaks) + private static final inr.numass.data.NumassProto.Point.Channel.Block.Peaks DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new inr.numass.data.NumassProto.Point.Channel.Block.Peaks(); + } + + public static inr.numass.data.NumassProto.Point.Channel.Block.Peaks getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Peaks parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Peaks(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public inr.numass.data.NumassProto.Point.Channel.Block.Peaks getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int TIME_FIELD_NUMBER = 1; + private long time_; + /** + *
    +         * время начала блока в наносекундах с начала эпохи
    +         * 
    + * + * uint64 time = 1; + */ + public long getTime() { + return time_; + } + + public static final int EVENTS_FIELD_NUMBER = 2; + private java.util.List events_; + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public java.util.List getEventsList() { + return events_; + } + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public java.util.List + getEventsOrBuilderList() { + return events_; + } + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public int getEventsCount() { + return events_.size(); + } + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Event getEvents(int index) { + return events_.get(index); + } + /** + *
    +         * массив необработанных событий
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.EventOrBuilder getEventsOrBuilder( + int index) { + return events_.get(index); + } + + public static final int PEAKS_FIELD_NUMBER = 3; + private inr.numass.data.NumassProto.Point.Channel.Block.Peaks peaks_; + /** + *
    +         * массив обработанных событий
    +         * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public boolean hasPeaks() { + return peaks_ != null; + } + /** + *
    +         * массив обработанных событий
    +         * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Peaks getPeaks() { + return peaks_ == null ? inr.numass.data.NumassProto.Point.Channel.Block.Peaks.getDefaultInstance() : peaks_; + } + /** + *
    +         * массив обработанных событий
    +         * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.PeaksOrBuilder getPeaksOrBuilder() { + return getPeaks(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + for (int i = 0; i < events_.size(); i++) { + output.writeMessage(2, events_.get(i)); + } + if (peaks_ != null) { + output.writeMessage(3, getPeaks()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + for (int i = 0; i < events_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, events_.get(i)); + } + if (peaks_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPeaks()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof inr.numass.data.NumassProto.Point.Channel.Block)) { + return super.equals(obj); + } + inr.numass.data.NumassProto.Point.Channel.Block other = (inr.numass.data.NumassProto.Point.Channel.Block) obj; + + boolean result = true; + result = result && (getTime() + == other.getTime()); + result = result && getEventsList() + .equals(other.getEventsList()); + result = result && (hasPeaks() == other.hasPeaks()); + if (hasPeaks()) { + result = result && getPeaks() + .equals(other.getPeaks()); + } + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + if (getEventsCount() > 0) { + hash = (37 * hash) + EVENTS_FIELD_NUMBER; + hash = (53 * hash) + getEventsList().hashCode(); + } + if (hasPeaks()) { + hash = (37 * hash) + PEAKS_FIELD_NUMBER; + hash = (53 * hash) + getPeaks().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel.Block parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(inr.numass.data.NumassProto.Point.Channel.Block prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code inr.numass.data.Point.Channel.Block} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:inr.numass.data.Point.Channel.Block) + inr.numass.data.NumassProto.Point.Channel.BlockOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.Block.class, inr.numass.data.NumassProto.Point.Channel.Block.Builder.class); + } + + // Construct using inr.numass.data.NumassProto.Point.Channel.Block.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getEventsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + time_ = 0L; + + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + eventsBuilder_.clear(); + } + if (peaksBuilder_ == null) { + peaks_ = null; + } else { + peaks_ = null; + peaksBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_Block_descriptor; + } + + public inr.numass.data.NumassProto.Point.Channel.Block getDefaultInstanceForType() { + return inr.numass.data.NumassProto.Point.Channel.Block.getDefaultInstance(); + } + + public inr.numass.data.NumassProto.Point.Channel.Block build() { + inr.numass.data.NumassProto.Point.Channel.Block result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public inr.numass.data.NumassProto.Point.Channel.Block buildPartial() { + inr.numass.data.NumassProto.Point.Channel.Block result = new inr.numass.data.NumassProto.Point.Channel.Block(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.time_ = time_; + if (eventsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + events_ = java.util.Collections.unmodifiableList(events_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.events_ = events_; + } else { + result.events_ = eventsBuilder_.build(); + } + if (peaksBuilder_ == null) { + result.peaks_ = peaks_; + } else { + result.peaks_ = peaksBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof inr.numass.data.NumassProto.Point.Channel.Block) { + return mergeFrom((inr.numass.data.NumassProto.Point.Channel.Block)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(inr.numass.data.NumassProto.Point.Channel.Block other) { + if (other == inr.numass.data.NumassProto.Point.Channel.Block.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (eventsBuilder_ == null) { + if (!other.events_.isEmpty()) { + if (events_.isEmpty()) { + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEventsIsMutable(); + events_.addAll(other.events_); + } + onChanged(); + } + } else { + if (!other.events_.isEmpty()) { + if (eventsBuilder_.isEmpty()) { + eventsBuilder_.dispose(); + eventsBuilder_ = null; + events_ = other.events_; + bitField0_ = (bitField0_ & ~0x00000002); + eventsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getEventsFieldBuilder() : null; + } else { + eventsBuilder_.addAllMessages(other.events_); + } + } + } + if (other.hasPeaks()) { + mergePeaks(other.getPeaks()); + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + inr.numass.data.NumassProto.Point.Channel.Block parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (inr.numass.data.NumassProto.Point.Channel.Block) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long time_ ; + /** + *
    +           * время начала блока в наносекундах с начала эпохи
    +           * 
    + * + * uint64 time = 1; + */ + public long getTime() { + return time_; + } + /** + *
    +           * время начала блока в наносекундах с начала эпохи
    +           * 
    + * + * uint64 time = 1; + */ + public Builder setTime(long value) { + + time_ = value; + onChanged(); + return this; + } + /** + *
    +           * время начала блока в наносекундах с начала эпохи
    +           * 
    + * + * uint64 time = 1; + */ + public Builder clearTime() { + + time_ = 0L; + onChanged(); + return this; + } + + private java.util.List events_ = + java.util.Collections.emptyList(); + private void ensureEventsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + events_ = new java.util.ArrayList(events_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block.Event, inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder, inr.numass.data.NumassProto.Point.Channel.Block.EventOrBuilder> eventsBuilder_; + + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public java.util.List getEventsList() { + if (eventsBuilder_ == null) { + return java.util.Collections.unmodifiableList(events_); + } else { + return eventsBuilder_.getMessageList(); + } + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public int getEventsCount() { + if (eventsBuilder_ == null) { + return events_.size(); + } else { + return eventsBuilder_.getCount(); + } + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Event getEvents(int index) { + if (eventsBuilder_ == null) { + return events_.get(index); + } else { + return eventsBuilder_.getMessage(index); + } + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder setEvents( + int index, inr.numass.data.NumassProto.Point.Channel.Block.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.set(index, value); + onChanged(); + } else { + eventsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder setEvents( + int index, inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.set(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder addEvents(inr.numass.data.NumassProto.Point.Channel.Block.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(value); + onChanged(); + } else { + eventsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder addEvents( + int index, inr.numass.data.NumassProto.Point.Channel.Block.Event value) { + if (eventsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventsIsMutable(); + events_.add(index, value); + onChanged(); + } else { + eventsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder addEvents( + inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder addEvents( + int index, inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder builderForValue) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.add(index, builderForValue.build()); + onChanged(); + } else { + eventsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder addAllEvents( + java.lang.Iterable values) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, events_); + onChanged(); + } else { + eventsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder clearEvents() { + if (eventsBuilder_ == null) { + events_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + eventsBuilder_.clear(); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public Builder removeEvents(int index) { + if (eventsBuilder_ == null) { + ensureEventsIsMutable(); + events_.remove(index); + onChanged(); + } else { + eventsBuilder_.remove(index); + } + return this; + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder getEventsBuilder( + int index) { + return getEventsFieldBuilder().getBuilder(index); + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.EventOrBuilder getEventsOrBuilder( + int index) { + if (eventsBuilder_ == null) { + return events_.get(index); } else { + return eventsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public java.util.List + getEventsOrBuilderList() { + if (eventsBuilder_ != null) { + return eventsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(events_); + } + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder addEventsBuilder() { + return getEventsFieldBuilder().addBuilder( + inr.numass.data.NumassProto.Point.Channel.Block.Event.getDefaultInstance()); + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder addEventsBuilder( + int index) { + return getEventsFieldBuilder().addBuilder( + index, inr.numass.data.NumassProto.Point.Channel.Block.Event.getDefaultInstance()); + } + /** + *
    +           * массив необработанных событий
    +           * 
    + * + * repeated .inr.numass.data.Point.Channel.Block.Event events = 2; + */ + public java.util.List + getEventsBuilderList() { + return getEventsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block.Event, inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder, inr.numass.data.NumassProto.Point.Channel.Block.EventOrBuilder> + getEventsFieldBuilder() { + if (eventsBuilder_ == null) { + eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block.Event, inr.numass.data.NumassProto.Point.Channel.Block.Event.Builder, inr.numass.data.NumassProto.Point.Channel.Block.EventOrBuilder>( + events_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + events_ = null; + } + return eventsBuilder_; + } + + private inr.numass.data.NumassProto.Point.Channel.Block.Peaks peaks_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block.Peaks, inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder, inr.numass.data.NumassProto.Point.Channel.Block.PeaksOrBuilder> peaksBuilder_; + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public boolean hasPeaks() { + return peaksBuilder_ != null || peaks_ != null; + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Peaks getPeaks() { + if (peaksBuilder_ == null) { + return peaks_ == null ? inr.numass.data.NumassProto.Point.Channel.Block.Peaks.getDefaultInstance() : peaks_; + } else { + return peaksBuilder_.getMessage(); + } + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public Builder setPeaks(inr.numass.data.NumassProto.Point.Channel.Block.Peaks value) { + if (peaksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + peaks_ = value; + onChanged(); + } else { + peaksBuilder_.setMessage(value); + } + + return this; + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public Builder setPeaks( + inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder builderForValue) { + if (peaksBuilder_ == null) { + peaks_ = builderForValue.build(); + onChanged(); + } else { + peaksBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public Builder mergePeaks(inr.numass.data.NumassProto.Point.Channel.Block.Peaks value) { + if (peaksBuilder_ == null) { + if (peaks_ != null) { + peaks_ = + inr.numass.data.NumassProto.Point.Channel.Block.Peaks.newBuilder(peaks_).mergeFrom(value).buildPartial(); + } else { + peaks_ = value; + } + onChanged(); + } else { + peaksBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public Builder clearPeaks() { + if (peaksBuilder_ == null) { + peaks_ = null; + onChanged(); + } else { + peaks_ = null; + peaksBuilder_ = null; + } + + return this; + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder getPeaksBuilder() { + + onChanged(); + return getPeaksFieldBuilder().getBuilder(); + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.PeaksOrBuilder getPeaksOrBuilder() { + if (peaksBuilder_ != null) { + return peaksBuilder_.getMessageOrBuilder(); + } else { + return peaks_ == null ? + inr.numass.data.NumassProto.Point.Channel.Block.Peaks.getDefaultInstance() : peaks_; + } + } + /** + *
    +           * массив обработанных событий
    +           * 
    + * + * .inr.numass.data.Point.Channel.Block.Peaks peaks = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block.Peaks, inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder, inr.numass.data.NumassProto.Point.Channel.Block.PeaksOrBuilder> + getPeaksFieldBuilder() { + if (peaksBuilder_ == null) { + peaksBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block.Peaks, inr.numass.data.NumassProto.Point.Channel.Block.Peaks.Builder, inr.numass.data.NumassProto.Point.Channel.Block.PeaksOrBuilder>( + getPeaks(), + getParentForChildren(), + isClean()); + peaks_ = null; + } + return peaksBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:inr.numass.data.Point.Channel.Block) + } + + // @@protoc_insertion_point(class_scope:inr.numass.data.Point.Channel.Block) + private static final inr.numass.data.NumassProto.Point.Channel.Block DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new inr.numass.data.NumassProto.Point.Channel.Block(); + } + + public static inr.numass.data.NumassProto.Point.Channel.Block getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Block parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Block(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public inr.numass.data.NumassProto.Point.Channel.Block getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int NUM_FIELD_NUMBER = 1; + private long num_; + /** + *
    +       * номер канала
    +       * 
    + * + * uint64 num = 1; + */ + public long getNum() { + return num_; + } + + public static final int BLOCKS_FIELD_NUMBER = 2; + private java.util.List blocks_; + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public java.util.List getBlocksList() { + return blocks_; + } + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public java.util.List + getBlocksOrBuilderList() { + return blocks_; + } + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public int getBlocksCount() { + return blocks_.size(); + } + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block getBlocks(int index) { + return blocks_.get(index); + } + /** + *
    +       * набранные блоки
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.BlockOrBuilder getBlocksOrBuilder( + int index) { + return blocks_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (num_ != 0L) { + output.writeUInt64(1, num_); + } + for (int i = 0; i < blocks_.size(); i++) { + output.writeMessage(2, blocks_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (num_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, num_); + } + for (int i = 0; i < blocks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, blocks_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof inr.numass.data.NumassProto.Point.Channel)) { + return super.equals(obj); + } + inr.numass.data.NumassProto.Point.Channel other = (inr.numass.data.NumassProto.Point.Channel) obj; + + boolean result = true; + result = result && (getNum() + == other.getNum()); + result = result && getBlocksList() + .equals(other.getBlocksList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NUM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNum()); + if (getBlocksCount() > 0) { + hash = (37 * hash) + BLOCKS_FIELD_NUMBER; + hash = (53 * hash) + getBlocksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static inr.numass.data.NumassProto.Point.Channel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point.Channel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point.Channel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point.Channel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(inr.numass.data.NumassProto.Point.Channel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code inr.numass.data.Point.Channel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:inr.numass.data.Point.Channel) + inr.numass.data.NumassProto.Point.ChannelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.Channel.class, inr.numass.data.NumassProto.Point.Channel.Builder.class); + } + + // Construct using inr.numass.data.NumassProto.Point.Channel.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBlocksFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + num_ = 0L; + + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + blocksBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_Channel_descriptor; + } + + public inr.numass.data.NumassProto.Point.Channel getDefaultInstanceForType() { + return inr.numass.data.NumassProto.Point.Channel.getDefaultInstance(); + } + + public inr.numass.data.NumassProto.Point.Channel build() { + inr.numass.data.NumassProto.Point.Channel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public inr.numass.data.NumassProto.Point.Channel buildPartial() { + inr.numass.data.NumassProto.Point.Channel result = new inr.numass.data.NumassProto.Point.Channel(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.num_ = num_; + if (blocksBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + blocks_ = java.util.Collections.unmodifiableList(blocks_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.blocks_ = blocks_; + } else { + result.blocks_ = blocksBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof inr.numass.data.NumassProto.Point.Channel) { + return mergeFrom((inr.numass.data.NumassProto.Point.Channel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(inr.numass.data.NumassProto.Point.Channel other) { + if (other == inr.numass.data.NumassProto.Point.Channel.getDefaultInstance()) return this; + if (other.getNum() != 0L) { + setNum(other.getNum()); + } + if (blocksBuilder_ == null) { + if (!other.blocks_.isEmpty()) { + if (blocks_.isEmpty()) { + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBlocksIsMutable(); + blocks_.addAll(other.blocks_); + } + onChanged(); + } + } else { + if (!other.blocks_.isEmpty()) { + if (blocksBuilder_.isEmpty()) { + blocksBuilder_.dispose(); + blocksBuilder_ = null; + blocks_ = other.blocks_; + bitField0_ = (bitField0_ & ~0x00000002); + blocksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBlocksFieldBuilder() : null; + } else { + blocksBuilder_.addAllMessages(other.blocks_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + inr.numass.data.NumassProto.Point.Channel parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (inr.numass.data.NumassProto.Point.Channel) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private long num_ ; + /** + *
    +         * номер канала
    +         * 
    + * + * uint64 num = 1; + */ + public long getNum() { + return num_; + } + /** + *
    +         * номер канала
    +         * 
    + * + * uint64 num = 1; + */ + public Builder setNum(long value) { + + num_ = value; + onChanged(); + return this; + } + /** + *
    +         * номер канала
    +         * 
    + * + * uint64 num = 1; + */ + public Builder clearNum() { + + num_ = 0L; + onChanged(); + return this; + } + + private java.util.List blocks_ = + java.util.Collections.emptyList(); + private void ensureBlocksIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + blocks_ = new java.util.ArrayList(blocks_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block, inr.numass.data.NumassProto.Point.Channel.Block.Builder, inr.numass.data.NumassProto.Point.Channel.BlockOrBuilder> blocksBuilder_; + + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public java.util.List getBlocksList() { + if (blocksBuilder_ == null) { + return java.util.Collections.unmodifiableList(blocks_); + } else { + return blocksBuilder_.getMessageList(); + } + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public int getBlocksCount() { + if (blocksBuilder_ == null) { + return blocks_.size(); + } else { + return blocksBuilder_.getCount(); + } + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block getBlocks(int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); + } else { + return blocksBuilder_.getMessage(index); + } + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder setBlocks( + int index, inr.numass.data.NumassProto.Point.Channel.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.set(index, value); + onChanged(); + } else { + blocksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder setBlocks( + int index, inr.numass.data.NumassProto.Point.Channel.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.set(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder addBlocks(inr.numass.data.NumassProto.Point.Channel.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(value); + onChanged(); + } else { + blocksBuilder_.addMessage(value); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder addBlocks( + int index, inr.numass.data.NumassProto.Point.Channel.Block value) { + if (blocksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBlocksIsMutable(); + blocks_.add(index, value); + onChanged(); + } else { + blocksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder addBlocks( + inr.numass.data.NumassProto.Point.Channel.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder addBlocks( + int index, inr.numass.data.NumassProto.Point.Channel.Block.Builder builderForValue) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.add(index, builderForValue.build()); + onChanged(); + } else { + blocksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder addAllBlocks( + java.lang.Iterable values) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, blocks_); + onChanged(); + } else { + blocksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder clearBlocks() { + if (blocksBuilder_ == null) { + blocks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + blocksBuilder_.clear(); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public Builder removeBlocks(int index) { + if (blocksBuilder_ == null) { + ensureBlocksIsMutable(); + blocks_.remove(index); + onChanged(); + } else { + blocksBuilder_.remove(index); + } + return this; + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Builder getBlocksBuilder( + int index) { + return getBlocksFieldBuilder().getBuilder(index); + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.BlockOrBuilder getBlocksOrBuilder( + int index) { + if (blocksBuilder_ == null) { + return blocks_.get(index); } else { + return blocksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public java.util.List + getBlocksOrBuilderList() { + if (blocksBuilder_ != null) { + return blocksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(blocks_); + } + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Builder addBlocksBuilder() { + return getBlocksFieldBuilder().addBuilder( + inr.numass.data.NumassProto.Point.Channel.Block.getDefaultInstance()); + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public inr.numass.data.NumassProto.Point.Channel.Block.Builder addBlocksBuilder( + int index) { + return getBlocksFieldBuilder().addBuilder( + index, inr.numass.data.NumassProto.Point.Channel.Block.getDefaultInstance()); + } + /** + *
    +         * набранные блоки
    +         * 
    + * + * repeated .inr.numass.data.Point.Channel.Block blocks = 2; + */ + public java.util.List + getBlocksBuilderList() { + return getBlocksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block, inr.numass.data.NumassProto.Point.Channel.Block.Builder, inr.numass.data.NumassProto.Point.Channel.BlockOrBuilder> + getBlocksFieldBuilder() { + if (blocksBuilder_ == null) { + blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel.Block, inr.numass.data.NumassProto.Point.Channel.Block.Builder, inr.numass.data.NumassProto.Point.Channel.BlockOrBuilder>( + blocks_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + blocks_ = null; + } + return blocksBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:inr.numass.data.Point.Channel) + } + + // @@protoc_insertion_point(class_scope:inr.numass.data.Point.Channel) + private static final inr.numass.data.NumassProto.Point.Channel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new inr.numass.data.NumassProto.Point.Channel(); + } + + public static inr.numass.data.NumassProto.Point.Channel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Channel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Channel(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public inr.numass.data.NumassProto.Point.Channel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CHANNELS_FIELD_NUMBER = 1; + private java.util.List channels_; + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public java.util.List getChannelsList() { + return channels_; + } + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public java.util.List + getChannelsOrBuilderList() { + return channels_; + } + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public int getChannelsCount() { + return channels_.size(); + } + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public inr.numass.data.NumassProto.Point.Channel getChannels(int index) { + return channels_.get(index); + } + /** + *
    +     * массив событий по каналам
    +     * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public inr.numass.data.NumassProto.Point.ChannelOrBuilder getChannelsOrBuilder( + int index) { + return channels_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < channels_.size(); i++) { + output.writeMessage(1, channels_.get(i)); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < channels_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, channels_.get(i)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof inr.numass.data.NumassProto.Point)) { + return super.equals(obj); + } + inr.numass.data.NumassProto.Point other = (inr.numass.data.NumassProto.Point) obj; + + boolean result = true; + result = result && getChannelsList() + .equals(other.getChannelsList()); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getChannelsCount() > 0) { + hash = (37 * hash) + CHANNELS_FIELD_NUMBER; + hash = (53 * hash) + getChannelsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static inr.numass.data.NumassProto.Point parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static inr.numass.data.NumassProto.Point parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static inr.numass.data.NumassProto.Point parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static inr.numass.data.NumassProto.Point parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(inr.numass.data.NumassProto.Point prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code inr.numass.data.Point} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:inr.numass.data.Point) + inr.numass.data.NumassProto.PointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_fieldAccessorTable + .ensureFieldAccessorsInitialized( + inr.numass.data.NumassProto.Point.class, inr.numass.data.NumassProto.Point.Builder.class); + } + + // Construct using inr.numass.data.NumassProto.Point.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getChannelsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (channelsBuilder_ == null) { + channels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + channelsBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return inr.numass.data.NumassProto.internal_static_inr_numass_data_Point_descriptor; + } + + public inr.numass.data.NumassProto.Point getDefaultInstanceForType() { + return inr.numass.data.NumassProto.Point.getDefaultInstance(); + } + + public inr.numass.data.NumassProto.Point build() { + inr.numass.data.NumassProto.Point result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public inr.numass.data.NumassProto.Point buildPartial() { + inr.numass.data.NumassProto.Point result = new inr.numass.data.NumassProto.Point(this); + int from_bitField0_ = bitField0_; + if (channelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + channels_ = java.util.Collections.unmodifiableList(channels_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.channels_ = channels_; + } else { + result.channels_ = channelsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof inr.numass.data.NumassProto.Point) { + return mergeFrom((inr.numass.data.NumassProto.Point)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(inr.numass.data.NumassProto.Point other) { + if (other == inr.numass.data.NumassProto.Point.getDefaultInstance()) return this; + if (channelsBuilder_ == null) { + if (!other.channels_.isEmpty()) { + if (channels_.isEmpty()) { + channels_ = other.channels_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChannelsIsMutable(); + channels_.addAll(other.channels_); + } + onChanged(); + } + } else { + if (!other.channels_.isEmpty()) { + if (channelsBuilder_.isEmpty()) { + channelsBuilder_.dispose(); + channelsBuilder_ = null; + channels_ = other.channels_; + bitField0_ = (bitField0_ & ~0x00000001); + channelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getChannelsFieldBuilder() : null; + } else { + channelsBuilder_.addAllMessages(other.channels_); + } + } + } + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + inr.numass.data.NumassProto.Point parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (inr.numass.data.NumassProto.Point) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List channels_ = + java.util.Collections.emptyList(); + private void ensureChannelsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + channels_ = new java.util.ArrayList(channels_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel, inr.numass.data.NumassProto.Point.Channel.Builder, inr.numass.data.NumassProto.Point.ChannelOrBuilder> channelsBuilder_; + + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public java.util.List getChannelsList() { + if (channelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(channels_); + } else { + return channelsBuilder_.getMessageList(); + } + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public int getChannelsCount() { + if (channelsBuilder_ == null) { + return channels_.size(); + } else { + return channelsBuilder_.getCount(); + } + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public inr.numass.data.NumassProto.Point.Channel getChannels(int index) { + if (channelsBuilder_ == null) { + return channels_.get(index); + } else { + return channelsBuilder_.getMessage(index); + } + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder setChannels( + int index, inr.numass.data.NumassProto.Point.Channel value) { + if (channelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChannelsIsMutable(); + channels_.set(index, value); + onChanged(); + } else { + channelsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder setChannels( + int index, inr.numass.data.NumassProto.Point.Channel.Builder builderForValue) { + if (channelsBuilder_ == null) { + ensureChannelsIsMutable(); + channels_.set(index, builderForValue.build()); + onChanged(); + } else { + channelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder addChannels(inr.numass.data.NumassProto.Point.Channel value) { + if (channelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChannelsIsMutable(); + channels_.add(value); + onChanged(); + } else { + channelsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder addChannels( + int index, inr.numass.data.NumassProto.Point.Channel value) { + if (channelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChannelsIsMutable(); + channels_.add(index, value); + onChanged(); + } else { + channelsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder addChannels( + inr.numass.data.NumassProto.Point.Channel.Builder builderForValue) { + if (channelsBuilder_ == null) { + ensureChannelsIsMutable(); + channels_.add(builderForValue.build()); + onChanged(); + } else { + channelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder addChannels( + int index, inr.numass.data.NumassProto.Point.Channel.Builder builderForValue) { + if (channelsBuilder_ == null) { + ensureChannelsIsMutable(); + channels_.add(index, builderForValue.build()); + onChanged(); + } else { + channelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder addAllChannels( + java.lang.Iterable values) { + if (channelsBuilder_ == null) { + ensureChannelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, channels_); + onChanged(); + } else { + channelsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder clearChannels() { + if (channelsBuilder_ == null) { + channels_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + channelsBuilder_.clear(); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public Builder removeChannels(int index) { + if (channelsBuilder_ == null) { + ensureChannelsIsMutable(); + channels_.remove(index); + onChanged(); + } else { + channelsBuilder_.remove(index); + } + return this; + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public inr.numass.data.NumassProto.Point.Channel.Builder getChannelsBuilder( + int index) { + return getChannelsFieldBuilder().getBuilder(index); + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public inr.numass.data.NumassProto.Point.ChannelOrBuilder getChannelsOrBuilder( + int index) { + if (channelsBuilder_ == null) { + return channels_.get(index); } else { + return channelsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public java.util.List + getChannelsOrBuilderList() { + if (channelsBuilder_ != null) { + return channelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(channels_); + } + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public inr.numass.data.NumassProto.Point.Channel.Builder addChannelsBuilder() { + return getChannelsFieldBuilder().addBuilder( + inr.numass.data.NumassProto.Point.Channel.getDefaultInstance()); + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public inr.numass.data.NumassProto.Point.Channel.Builder addChannelsBuilder( + int index) { + return getChannelsFieldBuilder().addBuilder( + index, inr.numass.data.NumassProto.Point.Channel.getDefaultInstance()); + } + /** + *
    +       * массив событий по каналам
    +       * 
    + * + * repeated .inr.numass.data.Point.Channel channels = 1; + */ + public java.util.List + getChannelsBuilderList() { + return getChannelsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel, inr.numass.data.NumassProto.Point.Channel.Builder, inr.numass.data.NumassProto.Point.ChannelOrBuilder> + getChannelsFieldBuilder() { + if (channelsBuilder_ == null) { + channelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + inr.numass.data.NumassProto.Point.Channel, inr.numass.data.NumassProto.Point.Channel.Builder, inr.numass.data.NumassProto.Point.ChannelOrBuilder>( + channels_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + channels_ = null; + } + return channelsBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:inr.numass.data.Point) + } + + // @@protoc_insertion_point(class_scope:inr.numass.data.Point) + private static final inr.numass.data.NumassProto.Point DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new inr.numass.data.NumassProto.Point(); + } + + public static inr.numass.data.NumassProto.Point getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Point parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Point(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public inr.numass.data.NumassProto.Point getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_inr_numass_data_Point_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_inr_numass_data_Point_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_inr_numass_data_Point_Channel_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_inr_numass_data_Point_Channel_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_inr_numass_data_Point_Channel_Block_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_inr_numass_data_Point_Channel_Block_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_inr_numass_data_Point_Channel_Block_Event_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_inr_numass_data_Point_Channel_Block_Event_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_inr_numass_data_Point_Channel_Block_Peaks_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_inr_numass_data_Point_Channel_Block_Peaks_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034inr/numas/numass-proto.proto\022\017inr.numa" + + "ss.data\"\350\002\n\005Point\0220\n\010channels\030\001 \003(\0132\036.in" + + "r.numass.data.Point.Channel\032\254\002\n\007Channel\022" + + "\013\n\003num\030\001 \001(\004\0224\n\006blocks\030\002 \003(\0132$.inr.numas" + + "s.data.Point.Channel.Block\032\335\001\n\005Block\022\014\n\004" + + "time\030\001 \001(\004\022:\n\006events\030\002 \003(\0132*.inr.numass." + + "data.Point.Channel.Block.Event\0229\n\005peaks\030" + + "\003 \001(\0132*.inr.numass.data.Point.Channel.Bl" + + "ock.Peaks\032#\n\005Event\022\014\n\004time\030\001 \001(\004\022\014\n\004data" + + "\030\002 \001(\014\032*\n\005Peaks\022\r\n\005times\030\001 \003(\004\022\022\n\namplit", + "udes\030\002 \003(\004b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_inr_numass_data_Point_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_inr_numass_data_Point_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_inr_numass_data_Point_descriptor, + new java.lang.String[] { "Channels", }); + internal_static_inr_numass_data_Point_Channel_descriptor = + internal_static_inr_numass_data_Point_descriptor.getNestedTypes().get(0); + internal_static_inr_numass_data_Point_Channel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_inr_numass_data_Point_Channel_descriptor, + new java.lang.String[] { "Num", "Blocks", }); + internal_static_inr_numass_data_Point_Channel_Block_descriptor = + internal_static_inr_numass_data_Point_Channel_descriptor.getNestedTypes().get(0); + internal_static_inr_numass_data_Point_Channel_Block_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_inr_numass_data_Point_Channel_Block_descriptor, + new java.lang.String[] { "Time", "Events", "Peaks", }); + internal_static_inr_numass_data_Point_Channel_Block_Event_descriptor = + internal_static_inr_numass_data_Point_Channel_Block_descriptor.getNestedTypes().get(0); + internal_static_inr_numass_data_Point_Channel_Block_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_inr_numass_data_Point_Channel_Block_Event_descriptor, + new java.lang.String[] { "Time", "Data", }); + internal_static_inr_numass_data_Point_Channel_Block_Peaks_descriptor = + internal_static_inr_numass_data_Point_Channel_Block_descriptor.getNestedTypes().get(1); + internal_static_inr_numass_data_Point_Channel_Block_Peaks_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_inr_numass_data_Point_Channel_Block_Peaks_descriptor, + new java.lang.String[] { "Times", "Amplitudes", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/numass-main/src/main/java/inr/numass/NumassProperties.java b/numass-core/src/main/java/inr/numass/NumassProperties.java similarity index 100% rename from numass-main/src/main/java/inr/numass/NumassProperties.java rename to numass-core/src/main/java/inr/numass/NumassProperties.java diff --git a/numass-storage/src/main/java/inr/numass/storage/NMEvent.java b/numass-core/src/main/java/inr/numass/data/NMEvent.java similarity index 93% rename from numass-storage/src/main/java/inr/numass/storage/NMEvent.java rename to numass-core/src/main/java/inr/numass/data/NMEvent.java index e7b89851..c1224746 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NMEvent.java +++ b/numass-core/src/main/java/inr/numass/data/NMEvent.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package inr.numass.storage; +package inr.numass.data; /** * diff --git a/numass-storage/src/main/java/inr/numass/storage/NMFile.java b/numass-core/src/main/java/inr/numass/data/NMFile.java similarity index 92% rename from numass-storage/src/main/java/inr/numass/storage/NMFile.java rename to numass-core/src/main/java/inr/numass/data/NMFile.java index 315437bb..50be0479 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NMFile.java +++ b/numass-core/src/main/java/inr/numass/data/NMFile.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package inr.numass.storage; +package inr.numass.data; import hep.dataforge.description.ValueDef; import hep.dataforge.meta.Meta; @@ -42,7 +42,7 @@ public class NMFile extends NamedMetaHolder implements NumassData { super(file.getName(), file.meta()); points = new ArrayList<>(); for (RawNMPoint point : file.getData()) { - points.add(new NMPoint(point)); + points.add(PointBuilders.readRawPoint(point)); } } diff --git a/numass-storage/src/main/java/inr/numass/storage/NMPoint.java b/numass-core/src/main/java/inr/numass/data/NMPoint.java similarity index 69% rename from numass-storage/src/main/java/inr/numass/storage/NMPoint.java rename to numass-core/src/main/java/inr/numass/data/NMPoint.java index af6bcbce..0b82486c 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NMPoint.java +++ b/numass-core/src/main/java/inr/numass/data/NMPoint.java @@ -13,14 +13,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package inr.numass.storage; +package inr.numass.data; import hep.dataforge.tables.DataPoint; import hep.dataforge.tables.MapPoint; import java.time.Instant; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.stream.IntStream; @@ -43,34 +42,6 @@ public class NMPoint implements NumassPoint { this.eventsCount = IntStream.of(spectrum).sum(); } - public NMPoint(RawNMPoint point) { - if (point == null) { - throw new IllegalArgumentException(); - } - - this.pointLength = point.getLength(); - this.u = point.getUset(); -// this.uread = point.getUread(); - this.startTime = point.getStartTime(); - this.eventsCount = point.getEventsCount(); - spectrum = calculateSpectrum(point); - } - - private int[] calculateSpectrum(RawNMPoint point) { - assert point.getEventsCount() > 0; - - int[] result = new int[RawNMPoint.MAX_CHANEL + 1]; - Arrays.fill(result, 0); - point.getEvents().stream().forEach((event) -> { - if (event.getChanel() >= RawNMPoint.MAX_CHANEL) { - result[RawNMPoint.MAX_CHANEL]++; - } else { - result[event.getChanel()]++; - } - }); - return result; - } - /** * @return the absouteTime */ @@ -105,7 +76,6 @@ public class NMPoint implements NumassPoint { List data = new ArrayList<>(); for (int i = 0; i < RawNMPoint.MAX_CHANEL; i++) { data.add(new MapPoint(dataNames, i, spectrum[i])); - } return data; } @@ -121,13 +91,6 @@ public class NMPoint implements NumassPoint { } - /** - * @return the overflow - */ - public int getOverflow() { - return spectrum[RawNMPoint.MAX_CHANEL]; - } - /** * @return the pointLength */ diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassData.java b/numass-core/src/main/java/inr/numass/data/NumassData.java similarity index 98% rename from numass-storage/src/main/java/inr/numass/storage/NumassData.java rename to numass-core/src/main/java/inr/numass/data/NumassData.java index 75099124..a791aac0 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NumassData.java +++ b/numass-core/src/main/java/inr/numass/data/NumassData.java @@ -3,7 +3,7 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ -package inr.numass.storage; +package inr.numass.data; import hep.dataforge.meta.Annotated; import hep.dataforge.meta.Meta; diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassDataReader.java b/numass-core/src/main/java/inr/numass/data/NumassDataReader.java similarity index 95% rename from numass-storage/src/main/java/inr/numass/storage/NumassDataReader.java rename to numass-core/src/main/java/inr/numass/data/NumassDataReader.java index 38abc704..6ed61ea6 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NumassDataReader.java +++ b/numass-core/src/main/java/inr/numass/data/NumassDataReader.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package inr.numass.storage; +package inr.numass.data; import hep.dataforge.data.FileDataFactory; import hep.dataforge.data.binary.Binary; diff --git a/numass-core/src/main/java/inr/numass/data/NumassDataUtils.java b/numass-core/src/main/java/inr/numass/data/NumassDataUtils.java new file mode 100644 index 00000000..5e6627f2 --- /dev/null +++ b/numass-core/src/main/java/inr/numass/data/NumassDataUtils.java @@ -0,0 +1,134 @@ +package inr.numass.data; + +import hep.dataforge.tables.DataPoint; +import hep.dataforge.tables.ListTable; +import hep.dataforge.tables.Table; + +import java.time.Instant; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * Created by darksnake on 30-Jan-17. + */ +public class NumassDataUtils { + + public static Collection joinSpectra(Stream spectra) { + Map map = new LinkedHashMap<>(); + spectra.forEach(datum -> { + datum.forEach(point -> { + double uset = point.getVoltage(); + if (map.containsKey(uset)) { + map.put(uset, join(point, map.get(uset))); + } else { + map.put(uset, point); + } + }); + }); + return map.values(); + } + + /** + * Spectral sum of two points + * + * @param first + * @param second + * @return + */ + public static NumassPoint join(NumassPoint first, NumassPoint second) { + if (first.getVoltage() != second.getVoltage()) { + throw new RuntimeException("Voltage mismatch"); + } + int[] newArray = new int[first.getSpectrum().length]; + Arrays.setAll(newArray, i -> first.getSpectrum()[i] + second.getSpectrum()[i]); + return new NMPoint( + first.getVoltage(), + Instant.EPOCH, + first.getLength() + second.getLength(), + newArray + ); + } + + public static NumassPoint substractPoint(NumassPoint point, NumassPoint reference) { + int[] array = new int[point.getSpectrum().length]; + Arrays.setAll(array, i -> Math.max(0, point.getSpectrum()[i] - reference.getSpectrum()[i])); + return new NMPoint( + point.getVoltage(), + point.getStartTime(), + point.getLength(), + array + ); + } + + public static Collection substractReferencePoint(Collection points, double uset) { + NumassPoint reference = points.stream().filter(it -> it.getVoltage() == uset).findFirst() + .orElseThrow(() -> new RuntimeException("Reference point not found")); + return points.stream().map(it -> substractPoint(it, reference)).collect(Collectors.toList()); + } + + + /** + * Поправка масштаба высокого. + * + * @param data + * @param beta + * @return + */ + public static Table setHVScale(ListTable data, double beta) { + SpectrumDataAdapter reader = adapter(); + ListTable.Builder res = new ListTable.Builder(data.getFormat()); + for (DataPoint dp : data) { + double corrFactor = 1 + beta; + res.row(reader.buildSpectrumDataPoint(reader.getX(dp).doubleValue() * corrFactor, reader.getCount(dp), reader.getTime(dp))); + } + return res.build(); + } + + public static SpectrumDataAdapter adapter() { + return new SpectrumDataAdapter("Uset", "CR", "CRerr", "Time"); + } + + public static Table correctForDeadTime(ListTable data, double dtime) { + return correctForDeadTime(data, adapter(), dtime); + } + + /** + * Коррекция на мертвое время в секундах + * + * @param data + * @param dtime + * @return + */ + public static Table correctForDeadTime(ListTable data, SpectrumDataAdapter adapter, double dtime) { +// SpectrumDataAdapter adapter = adapter(); + ListTable.Builder res = new ListTable.Builder(data.getFormat()); + for (DataPoint dp : data) { + double corrFactor = 1 / (1 - dtime * adapter.getCount(dp) / adapter.getTime(dp)); + res.row(adapter.buildSpectrumDataPoint(adapter.getX(dp).doubleValue(), (long) (adapter.getCount(dp) * corrFactor), adapter.getTime(dp))); + } + return res.build(); + } + + public static double countRateWithDeadTime(NumassPoint p, int from, int to, double deadTime) { + double wind = p.getCountInWindow(from, to) / p.getLength(); + double res; + if (deadTime > 0) { + double total = p.getTotalCount(); +// double time = p.getLength(); +// res = wind / (1 - total * deadTime / time); + double timeRatio = deadTime / p.getLength(); + res = wind / total * (1d - Math.sqrt(1d - 4d * total * timeRatio)) / 2d / timeRatio; + } else { + res = wind; + } + return res; + } + + public static double countRateWithDeadTimeErr(NumassPoint p, int from, int to, double deadTime) { + return Math.sqrt(countRateWithDeadTime(p, from, to, deadTime) / p.getLength()); + } +} diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassPoint.java b/numass-core/src/main/java/inr/numass/data/NumassPoint.java similarity index 94% rename from numass-storage/src/main/java/inr/numass/storage/NumassPoint.java rename to numass-core/src/main/java/inr/numass/data/NumassPoint.java index 51307324..9367eec0 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NumassPoint.java +++ b/numass-core/src/main/java/inr/numass/data/NumassPoint.java @@ -1,4 +1,4 @@ -package inr.numass.storage; +package inr.numass.data; import hep.dataforge.tables.DataPoint; import hep.dataforge.tables.MapPoint; diff --git a/numass-core/src/main/java/inr/numass/data/PointBuilders.java b/numass-core/src/main/java/inr/numass/data/PointBuilders.java new file mode 100644 index 00000000..c6e57ece --- /dev/null +++ b/numass-core/src/main/java/inr/numass/data/PointBuilders.java @@ -0,0 +1,53 @@ +package inr.numass.data; + +import org.jetbrains.annotations.NotNull; + +import java.io.IOException; +import java.io.InputStream; +import java.time.Instant; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Function; +import java.util.stream.IntStream; + +/** + * Created by darksnake on 13-Apr-17. + */ +public class PointBuilders { + public static NumassPoint readProtoPoint(double u, Instant startTime, double pointLength, InputStream stream, Function peakFinder) throws IOException { + NumassProto.Point point = NumassProto.Point.parseFrom(stream); + NumassProto.Point.Channel ch = point.getChannels(0); + int[] spectrum = count(ch.getBlocksList().stream() + .flatMapToInt(block -> IntStream.concat( + block.getPeaks().getAmplitudesList() + .stream().mapToInt(it -> it.intValue()), + block.getEventsList().stream() + .mapToInt(event -> peakFinder.apply(event)) + )) + ); + + return new NMPoint(u, startTime, pointLength, spectrum); + } + + private static int[] calculateSpectrum(RawNMPoint point) { + assert point.getEventsCount() > 0; + return count(point.getEvents().stream().mapToInt(event -> event.getChanel())); + } + + @NotNull + public static NumassPoint readRawPoint(@NotNull RawNMPoint point) { + return new NMPoint(point.getUset(), point.getStartTime(), point.getLength(), calculateSpectrum(point)); + } + + private static int[] count(IntStream stream) { + List list = new ArrayList<>(); + stream.forEach(i -> { + while (list.size() <= i) { + list.add(new AtomicInteger(0)); + } + list.get(i).incrementAndGet(); + }); + return list.stream().mapToInt(i -> i.get()).toArray(); + } +} diff --git a/numass-storage/src/main/java/inr/numass/storage/RawNMFile.java b/numass-core/src/main/java/inr/numass/data/RawNMFile.java similarity index 95% rename from numass-storage/src/main/java/inr/numass/storage/RawNMFile.java rename to numass-core/src/main/java/inr/numass/data/RawNMFile.java index 7bdf11f1..86ef7a28 100644 --- a/numass-storage/src/main/java/inr/numass/storage/RawNMFile.java +++ b/numass-core/src/main/java/inr/numass/data/RawNMFile.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package inr.numass.storage; +package inr.numass.data; import hep.dataforge.description.ValueDef; import hep.dataforge.meta.Meta; diff --git a/numass-storage/src/main/java/inr/numass/storage/RawNMPoint.java b/numass-core/src/main/java/inr/numass/data/RawNMPoint.java similarity index 95% rename from numass-storage/src/main/java/inr/numass/storage/RawNMPoint.java rename to numass-core/src/main/java/inr/numass/data/RawNMPoint.java index da652534..a853257d 100644 --- a/numass-storage/src/main/java/inr/numass/storage/RawNMPoint.java +++ b/numass-core/src/main/java/inr/numass/data/RawNMPoint.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package inr.numass.storage; +package inr.numass.data; import java.time.Instant; import java.util.ArrayList; diff --git a/numass-storage/src/main/java/inr/numass/storage/SetDirectionUtility.java b/numass-core/src/main/java/inr/numass/data/SetDirectionUtility.java similarity index 96% rename from numass-storage/src/main/java/inr/numass/storage/SetDirectionUtility.java rename to numass-core/src/main/java/inr/numass/data/SetDirectionUtility.java index 89a8b22f..1b3db017 100644 --- a/numass-storage/src/main/java/inr/numass/storage/SetDirectionUtility.java +++ b/numass-core/src/main/java/inr/numass/data/SetDirectionUtility.java @@ -3,7 +3,7 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ -package inr.numass.storage; +package inr.numass.data; import hep.dataforge.context.Context; import hep.dataforge.context.Global; diff --git a/numass-main/src/main/java/inr/numass/data/SpectrumDataAdapter.java b/numass-core/src/main/java/inr/numass/data/SpectrumDataAdapter.java similarity index 100% rename from numass-main/src/main/java/inr/numass/data/SpectrumDataAdapter.java rename to numass-core/src/main/java/inr/numass/data/SpectrumDataAdapter.java diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassDataFactory.java b/numass-core/src/main/java/inr/numass/storage/NumassDataFactory.java similarity index 93% rename from numass-storage/src/main/java/inr/numass/storage/NumassDataFactory.java rename to numass-core/src/main/java/inr/numass/storage/NumassDataFactory.java index c4da4ba3..13083bca 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NumassDataFactory.java +++ b/numass-core/src/main/java/inr/numass/storage/NumassDataFactory.java @@ -6,6 +6,7 @@ import hep.dataforge.data.DataFilter; import hep.dataforge.data.DataTree; import hep.dataforge.meta.Meta; import hep.dataforge.storage.commons.StorageUtils; +import inr.numass.data.NumassData; /** * Created by darksnake on 03-Feb-17. diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassDataLoader.java b/numass-core/src/main/java/inr/numass/storage/NumassDataLoader.java similarity index 95% rename from numass-storage/src/main/java/inr/numass/storage/NumassDataLoader.java rename to numass-core/src/main/java/inr/numass/storage/NumassDataLoader.java index 544f77b7..23cf402d 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NumassDataLoader.java +++ b/numass-core/src/main/java/inr/numass/storage/NumassDataLoader.java @@ -26,6 +26,7 @@ import hep.dataforge.storage.api.Storage; import hep.dataforge.storage.filestorage.FileEnvelope; import hep.dataforge.storage.loaders.AbstractLoader; import hep.dataforge.tables.Table; +import inr.numass.data.*; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.VFS; import org.slf4j.LoggerFactory; @@ -44,7 +45,6 @@ import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.Stream; -import static inr.numass.storage.RawNMPoint.MAX_EVENTS_PER_POINT; import static org.apache.commons.vfs2.FileType.FOLDER; /** @@ -218,7 +218,7 @@ public class NumassDataLoader extends AbstractLoader implements ObjectLoader MAX_EVENTS_PER_POINT) { + if (!segmented && events.size() > RawNMPoint.MAX_EVENTS_PER_POINT) { pointTime = events.get(events.size() - 1).getTime() - events.get(0).getTime(); } @@ -235,7 +235,7 @@ public class NumassDataLoader extends AbstractLoader implements ObjectLoader> getItems() { diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassStorage.java b/numass-core/src/main/java/inr/numass/storage/NumassStorage.java similarity index 96% rename from numass-storage/src/main/java/inr/numass/storage/NumassStorage.java rename to numass-core/src/main/java/inr/numass/storage/NumassStorage.java index 49b589f8..9d02c3cb 100644 --- a/numass-storage/src/main/java/inr/numass/storage/NumassStorage.java +++ b/numass-core/src/main/java/inr/numass/storage/NumassStorage.java @@ -23,6 +23,8 @@ import hep.dataforge.meta.MetaBuilder; import hep.dataforge.storage.filestorage.FilePointLoader; import hep.dataforge.storage.filestorage.FileStorage; import hep.dataforge.storage.filestorage.VFSUtils; +import inr.numass.data.NMFile; +import inr.numass.data.NumassData; import org.apache.commons.io.FilenameUtils; import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; diff --git a/numass-storage/src/main/proto/inr/numas/storage/proto/numass-proto.proto b/numass-core/src/main/proto/inr/numas/numass-proto.proto similarity index 96% rename from numass-storage/src/main/proto/inr/numas/storage/proto/numass-proto.proto rename to numass-core/src/main/proto/inr/numas/numass-proto.proto index 28614ff9..1ce566ef 100644 --- a/numass-storage/src/main/proto/inr/numas/storage/proto/numass-proto.proto +++ b/numass-core/src/main/proto/inr/numas/numass-proto.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package inr.numass.storage; +package inr.numass.data; message Point { message Channel { diff --git a/numass-storage/src/main/resources/META-INF/services/hep.dataforge.data.DataLoader b/numass-core/src/main/resources/META-INF/services/hep.dataforge.data.DataLoader similarity index 100% rename from numass-storage/src/main/resources/META-INF/services/hep.dataforge.data.DataLoader rename to numass-core/src/main/resources/META-INF/services/hep.dataforge.data.DataLoader diff --git a/numass-main/build.gradle b/numass-main/build.gradle index d4a977f5..ea851034 100644 --- a/numass-main/build.gradle +++ b/numass-main/build.gradle @@ -11,7 +11,7 @@ description = "Main numass project" dependencies { compile group: 'commons-cli', name: 'commons-cli', version: '1.+' compile group: 'commons-io', name: 'commons-io', version: '2.+' - compile project(':numass-storage') + compile project(':numass-core') compile "hep.dataforge:dataforge-minuit" //project(':dataforge-stat:dataforge-minuit') compile "hep.dataforge:grind-terminal" //project(':dataforge-grind:grind-terminal') } diff --git a/numass-main/src/main/groovy/inr/numass/scripts/DetectorSpectrumSubstraction.groovy b/numass-main/src/main/groovy/inr/numass/scripts/DetectorSpectrumSubstraction.groovy index bb030571..02d27260 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/DetectorSpectrumSubstraction.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/DetectorSpectrumSubstraction.groovy @@ -10,7 +10,7 @@ import hep.dataforge.io.ColumnedDataWriter import hep.dataforge.tables.ListTable import hep.dataforge.tables.MapPoint import hep.dataforge.tables.TableFormatBuilder -import inr.numass.storage.NumassData +import inr.numass.data.NumassData NumassData.metaClass.findPoint{double u -> delegate.getNMPoints().getWork { it.getVoltage() == u }.getMap(20, true) @@ -56,7 +56,7 @@ NumassData data2 = NMFile.readFile(new File("D:\\Work\\Numass\\transmission 2013 double[] points = [14500,15000,15500,16000,18100,18200,18300] -ColumnedDataWriter.writeDataSet(System.out, buildSet(data1,data2,points), "Detector spectrum substraction"); +ColumnedDataWriter.writeTable(System.out, buildSet(data1,data2,points), "Detector spectrum substraction"); diff --git a/numass-main/src/main/groovy/inr/numass/scripts/FindBorder.groovy b/numass-main/src/main/groovy/inr/numass/scripts/FindBorder.groovy index e4d3859f..5a8db3e5 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/FindBorder.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/FindBorder.groovy @@ -6,12 +6,11 @@ package inr.numass.scripts -import inr.numass.storage.NMFile -import inr.numass.storage.NumassData -import inr.numass.storage.NumassDataLoader +import hep.dataforge.grind.GrindMetaBuilder import hep.dataforge.meta.Meta import inr.numass.actions.FindBorderAction -import hep.dataforge.grind.GrindMetaBuilder +import inr.numass.data.NumassData +import inr.numass.storage.NumassDataLoader File dataDir = new File("D:\\Work\\Numass\\data\\2016_04\\T2_data\\Fill_2_2\\set_6_e26d123e54010000") if(!dataDir.exists()){ diff --git a/numass-main/src/main/groovy/inr/numass/scripts/Loss2014.groovy b/numass-main/src/main/groovy/inr/numass/scripts/Loss2014.groovy deleted file mode 100644 index 2b12c0d6..00000000 --- a/numass-main/src/main/groovy/inr/numass/scripts/Loss2014.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.scripts - -import hep.dataforge.context.Context -import hep.dataforge.data.DataNode -import hep.dataforge.stat.fit.FitTaskResult -import inr.numass.Main -import inr.numass.Numass - - -//Main.main("-lc") -Context context = Numass.buildContext(); -context.putValue("integralThreshold", 15d); -DataNode resultPack = Main.run(context, "-c","D:\\sterile-new\\loss2014-11\\d2_19_1.xml") -FitTaskResult result = resultPack.getData().get() -result.print(new PrintWriter(System.out)) diff --git a/numass-main/src/main/groovy/inr/numass/scripts/ReadTextFile.groovy b/numass-main/src/main/groovy/inr/numass/scripts/ReadTextFile.groovy index 8c37ee13..eefff99e 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/ReadTextFile.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/ReadTextFile.groovy @@ -12,4 +12,4 @@ import hep.dataforge.tables.Table File file = new File("D:\\Work\\Numass\\sterile2016\\empty.dat" ) Table referenceTable = new ColumnedDataReader(file).toTable(); -ColumnedDataWriter.writeDataSet(System.out, referenceTable,"") \ No newline at end of file +ColumnedDataWriter.writeTable(System.out, referenceTable,"") \ No newline at end of file diff --git a/numass-main/src/main/groovy/inr/numass/scripts/Simulate.groovy b/numass-main/src/main/groovy/inr/numass/scripts/Simulate.groovy index 99078fd9..e9ef2c18 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/Simulate.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/Simulate.groovy @@ -88,7 +88,7 @@ data = TritiumUtils.correctForDeadTime(data, new SpectrumDataAdapter(), 10e-9); // allPars.setParValue("X", 0.4); -ColumnedDataWriter.writeDataSet(System.out,data,"--- DATA ---"); +ColumnedDataWriter.writeTable(System.out,data,"--- DATA ---"); FitState state = new FitState(data, model, allPars); //new PlotFitResultAction().eval(state); diff --git a/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy b/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy index bd2c43c2..d579ae6b 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/SimulatePileup.groovy @@ -8,9 +8,9 @@ package inr.numass.scripts import hep.dataforge.grind.Grind import hep.dataforge.tables.DataPoint -import inr.numass.storage.NMPoint +import inr.numass.data.NMPoint +import inr.numass.data.RawNMPoint import inr.numass.storage.NumassDataLoader -import inr.numass.storage.RawNMPoint import inr.numass.utils.NMEventGeneratorWithPulser import inr.numass.utils.PileUpSimulator import inr.numass.utils.TritiumUtils diff --git a/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy b/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy index c3e6a54f..f0b5c6d1 100644 --- a/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy +++ b/numass-main/src/main/groovy/inr/numass/scripts/Underflow.groovy @@ -9,8 +9,8 @@ package inr.numass.scripts import hep.dataforge.io.ColumnedDataWriter import hep.dataforge.storage.commons.StorageUtils import hep.dataforge.tables.Table -import inr.numass.storage.NMPoint -import inr.numass.storage.NumassDataUtils +import inr.numass.data.NMPoint +import inr.numass.data.NumassDataUtils import inr.numass.storage.NumassStorage import inr.numass.utils.UnderflowCorrection @@ -85,5 +85,5 @@ printPoint(data, [14000d, 14500d, 15000d, 15500d, 16500d]) println() Table t = new UnderflowCorrection().fitAllPoints(data, 400, 600, 3100, 20); -ColumnedDataWriter.writeDataSet(System.out, t, "underflow parameters") +ColumnedDataWriter.writeTable(System.out, t, "underflow parameters") diff --git a/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java b/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java index 1e71859a..b4506623 100644 --- a/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java +++ b/numass-main/src/main/java/hep/dataforge/plotfit/PlotFitResultAction.java @@ -29,7 +29,7 @@ import hep.dataforge.plots.data.PlottableData; import hep.dataforge.plots.data.PlottableXYFunction; import hep.dataforge.stat.fit.FitState; import hep.dataforge.stat.models.XYModel; -import hep.dataforge.tables.PointSource; +import hep.dataforge.tables.NavigablePointSource; import hep.dataforge.tables.XYAdapter; import java.util.function.Function; @@ -46,7 +46,7 @@ public class PlotFitResultAction extends OneToOneAction { @Override protected FitState execute(Context context, String name, FitState input, Laminate metaData) { - PointSource data = input.getDataSet(); + NavigablePointSource data = input.getDataSet(); if (!(input.getModel() instanceof XYModel)) { getReport(context, name).reportError("The fit model should be instance of XYModel for this action. Action failed!"); return input; diff --git a/numass-main/src/main/java/inr/numass/NumassIO.java b/numass-main/src/main/java/inr/numass/NumassIO.java index 1a3e8190..ee77c034 100644 --- a/numass-main/src/main/java/inr/numass/NumassIO.java +++ b/numass-main/src/main/java/inr/numass/NumassIO.java @@ -20,9 +20,9 @@ import hep.dataforge.data.binary.Binary; import hep.dataforge.io.BasicIOManager; import hep.dataforge.meta.Meta; import hep.dataforge.names.Name; +import inr.numass.data.NumassDataReader; import inr.numass.data.NumassPawReader; -import inr.numass.storage.NumassDataReader; -import inr.numass.storage.RawNMFile; +import inr.numass.data.RawNMFile; import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.output.TeeOutputStream; diff --git a/numass-main/src/main/java/inr/numass/NumassPlugin.java b/numass-main/src/main/java/inr/numass/NumassPlugin.java index 5600ed29..3074efbe 100644 --- a/numass-main/src/main/java/inr/numass/NumassPlugin.java +++ b/numass-main/src/main/java/inr/numass/NumassPlugin.java @@ -80,7 +80,6 @@ public class NumassPlugin extends BasicPlugin { ActionManager actions = context.pluginManager().getOrLoad(ActionManager.class); actions.attach(context); - actions.register(SlicingAction.class); actions.register(PrepareDataAction.class); actions.register(ReadLegacyDataAction.class); actions.register(MergeDataAction.class); diff --git a/numass-main/src/main/java/inr/numass/actions/DebunchAction.java b/numass-main/src/main/java/inr/numass/actions/DebunchAction.java index 2893e2a8..535739f6 100644 --- a/numass-main/src/main/java/inr/numass/actions/DebunchAction.java +++ b/numass-main/src/main/java/inr/numass/actions/DebunchAction.java @@ -21,10 +21,10 @@ import hep.dataforge.description.TypedActionDef; import hep.dataforge.description.ValueDef; import hep.dataforge.exceptions.ContentException; import hep.dataforge.meta.Laminate; +import inr.numass.data.RawNMFile; +import inr.numass.data.RawNMPoint; import inr.numass.debunch.DebunchReport; import inr.numass.debunch.FrameAnalizer; -import inr.numass.storage.RawNMFile; -import inr.numass.storage.RawNMPoint; import java.io.PrintWriter; diff --git a/numass-main/src/main/java/inr/numass/actions/FindBorderAction.java b/numass-main/src/main/java/inr/numass/actions/FindBorderAction.java index ad3efb9d..15eea4a8 100644 --- a/numass-main/src/main/java/inr/numass/actions/FindBorderAction.java +++ b/numass-main/src/main/java/inr/numass/actions/FindBorderAction.java @@ -25,9 +25,9 @@ import hep.dataforge.tables.ListTable; import hep.dataforge.tables.MapPoint; import hep.dataforge.tables.Table; import hep.dataforge.values.Value; -import inr.numass.storage.NMFile; -import inr.numass.storage.NumassData; -import inr.numass.storage.NumassPoint; +import inr.numass.data.NMFile; +import inr.numass.data.NumassData; +import inr.numass.data.NumassPoint; import org.apache.commons.math3.analysis.UnivariateFunction; import java.io.OutputStream; @@ -69,7 +69,7 @@ public class FindBorderAction extends OneToOneAction { OutputStream stream = buildActionOutput(context, name); - ColumnedDataWriter.writeDataSet(stream, bData, String.format("%s : lower = %d upper = %d", name, lowerBorder, upperBorder)); + ColumnedDataWriter.writeTable(stream, bData, String.format("%s : lower = %d upper = %d", name, lowerBorder, upperBorder)); report(context, name, "File {} completed", source.getName()); return bData; diff --git a/numass-main/src/main/java/inr/numass/actions/JoinNumassDataAction.java b/numass-main/src/main/java/inr/numass/actions/JoinNumassDataAction.java index 05bf9ef2..7e74937b 100644 --- a/numass-main/src/main/java/inr/numass/actions/JoinNumassDataAction.java +++ b/numass-main/src/main/java/inr/numass/actions/JoinNumassDataAction.java @@ -4,9 +4,9 @@ import hep.dataforge.actions.ManyToOneAction; import hep.dataforge.context.Context; import hep.dataforge.description.TypedActionDef; import hep.dataforge.meta.Laminate; -import inr.numass.storage.NMPoint; -import inr.numass.storage.NumassData; -import inr.numass.storage.NumassPoint; +import inr.numass.data.NMPoint; +import inr.numass.data.NumassData; +import inr.numass.data.NumassPoint; import java.util.Collection; import java.util.Map; diff --git a/numass-main/src/main/java/inr/numass/actions/MergeDataAction.java b/numass-main/src/main/java/inr/numass/actions/MergeDataAction.java index 3e760db8..aefe6852 100644 --- a/numass-main/src/main/java/inr/numass/actions/MergeDataAction.java +++ b/numass-main/src/main/java/inr/numass/actions/MergeDataAction.java @@ -61,7 +61,7 @@ public class MergeDataAction extends ManyToOneAction { @Override protected void afterGroup(Context context, String groupName, Meta outputMeta, Table output) { OutputStream stream = buildActionOutput(context, groupName); - ColumnedDataWriter.writeDataSet(stream, output, outputMeta.toString()); + ColumnedDataWriter.writeTable(stream, output, outputMeta.toString()); } // @Override @@ -135,7 +135,7 @@ public class MergeDataAction extends ManyToOneAction { private Table mergeDataSets(String name, Collection ds) { //Сливаем все точки в один набор данных Map> points = new LinkedHashMap<>(); - for (PointSource d : ds) { + for (Table d : ds) { if (!d.getFormat().names().contains(parnames)) { throw new IllegalArgumentException(); } diff --git a/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java b/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java index 686a6874..aff0cf4a 100644 --- a/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java +++ b/numass-main/src/main/java/inr/numass/actions/MonitorCorrectAction.java @@ -124,7 +124,7 @@ public class MonitorCorrectAction extends OneToOneAction { // // if (!dataList.isEmpty()) { // //Генерируем автоматический формат по первой строчке -// format = DataFormat.of(dataList.getRow(0)); +// format = DataFormat.of(dataList.getPoint(0)); // } else { // format = DataFormat.of(parnames); // } @@ -132,7 +132,7 @@ public class MonitorCorrectAction extends OneToOneAction { OutputStream stream = buildActionOutput(context, name); - ColumnedDataWriter.writeDataSet(stream, data, head); + ColumnedDataWriter.writeTable(stream, data, head); return data; } @@ -197,7 +197,7 @@ public class MonitorCorrectAction extends OneToOneAction { String monitorFileName = meta.getString("monitorFile", "monitor"); OutputStream stream = buildActionOutput(context, monitorFileName); ListTable data = new ListTable(monitorPoints); - ColumnedDataWriter.writeDataSet(stream, TableTransform.sort(data, "Timestamp", true), "Monitor points", monitorNames); + ColumnedDataWriter.writeTable(stream, TableTransform.sort(data, "Timestamp", true), "Monitor points", monitorNames); } } 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 cab2629b..86d5e411 100644 --- a/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java +++ b/numass-main/src/main/java/inr/numass/actions/PrepareDataAction.java @@ -26,9 +26,13 @@ import hep.dataforge.io.XMLMetaWriter; import hep.dataforge.meta.Laminate; import hep.dataforge.meta.Meta; import hep.dataforge.tables.*; +import inr.numass.data.NumassData; +import inr.numass.data.NumassPoint; +import inr.numass.data.PointBuilders; +import inr.numass.data.RawNMPoint; import inr.numass.debunch.DebunchReport; import inr.numass.debunch.FrameAnalizer; -import inr.numass.storage.*; +import inr.numass.storage.NumassDataLoader; import inr.numass.utils.ExpressionUtils; import java.io.OutputStream; @@ -112,7 +116,7 @@ public class PrepareDataAction extends OneToOneAction { long total = point.getTotalCount(); double uset = utransform.apply(point.getVoltage()); - double uread = utransform.apply(point.getUread()); + double uread = utransform.apply(point.getVoltage()); double time = point.getLength(); int a = getLowerBorder(meta, uset); int b = Math.min(upper, RawNMPoint.MAX_CHANEL); @@ -163,7 +167,7 @@ public class PrepareDataAction extends OneToOneAction { OutputStream stream = buildActionOutput(context, name); - ColumnedDataWriter.writeDataSet(stream, data, head); + ColumnedDataWriter.writeTable(stream, data, head); // log.logString("File %s completed", dataFile.getName()); return data; } @@ -201,9 +205,9 @@ public class PrepareDataAction extends OneToOneAction { double cr = point.selectChanels(lower, upper).getCR(); if (cr < maxCR) { DebunchReport report = new FrameAnalizer(rejectionprob, framelength, lower, upper).debunchPoint(point); - return new NMPoint(report.getPoint()); + return PointBuilders.readRawPoint(report.getPoint()); } else { - return new NMPoint(point); + return PointBuilders.readRawPoint(point); } } 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 e0476947..f923bb5e 100644 --- a/numass-main/src/main/java/inr/numass/actions/ReadLegacyDataAction.java +++ b/numass-main/src/main/java/inr/numass/actions/ReadLegacyDataAction.java @@ -23,8 +23,8 @@ import hep.dataforge.description.TypedActionDef; import hep.dataforge.description.ValueDef; import hep.dataforge.exceptions.ContentException; import hep.dataforge.meta.Laminate; -import inr.numass.storage.NMFile; -import inr.numass.storage.RawNMFile; +import inr.numass.data.NMFile; +import inr.numass.data.RawNMFile; import static inr.numass.NumassIO.getNumassData; diff --git a/numass-main/src/main/java/inr/numass/actions/ShowEnergySpectrumAction.java b/numass-main/src/main/java/inr/numass/actions/ShowEnergySpectrumAction.java index b7889bca..2897db84 100644 --- a/numass-main/src/main/java/inr/numass/actions/ShowEnergySpectrumAction.java +++ b/numass-main/src/main/java/inr/numass/actions/ShowEnergySpectrumAction.java @@ -18,8 +18,8 @@ import hep.dataforge.plots.data.PlottableData; import hep.dataforge.plots.data.XYPlottable; import hep.dataforge.tables.*; import hep.dataforge.values.ValueType; -import inr.numass.storage.NumassData; -import inr.numass.storage.NumassPoint; +import inr.numass.data.NumassData; +import inr.numass.data.NumassPoint; import java.io.OutputStream; import java.util.*; @@ -79,7 +79,7 @@ public class ShowEnergySpectrumAction extends OneToOneAction OutputStream out = buildActionOutput(context, name); Table table = builder.build(); - ColumnedDataWriter.writeDataSet(out, table, inputMeta.toString()); + ColumnedDataWriter.writeTable(out, table, inputMeta.toString()); if (inputMeta.hasMeta("plot") || inputMeta.getBoolean("plot", false)) { PlotFrame frame = PlotUtils.getPlotManager(context) diff --git a/numass-main/src/main/java/inr/numass/actions/ShowLossSpectrumAction.java b/numass-main/src/main/java/inr/numass/actions/ShowLossSpectrumAction.java deleted file mode 100644 index e55f9fdd..00000000 --- a/numass-main/src/main/java/inr/numass/actions/ShowLossSpectrumAction.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.actions; - -import hep.dataforge.actions.OneToOneAction; -import hep.dataforge.context.Context; -import hep.dataforge.description.TypedActionDef; -import hep.dataforge.io.ColumnedDataWriter; -import hep.dataforge.io.PrintFunction; -import hep.dataforge.maths.GridCalculator; -import hep.dataforge.maths.NamedMatrix; -import hep.dataforge.maths.integration.UnivariateIntegrator; -import hep.dataforge.meta.Laminate; -import hep.dataforge.meta.MetaBuilder; -import hep.dataforge.plots.PlotFrame; -import hep.dataforge.plots.PlotUtils; -import hep.dataforge.plots.data.PlottableXYFunction; -import hep.dataforge.stat.fit.FitState; -import hep.dataforge.stat.fit.FitTaskResult; -import hep.dataforge.stat.fit.Param; -import hep.dataforge.stat.fit.ParamSet; -import hep.dataforge.stat.simulation.GaussianParameterGenerator; -import hep.dataforge.tables.ListTable; -import hep.dataforge.tables.MapPoint; -import hep.dataforge.tables.Table; -import hep.dataforge.values.NamedValueSet; -import inr.numass.models.ExperimentalVariableLossSpectrum; -import inr.numass.models.LossCalculator; -import inr.numass.utils.NumassIntegrator; -import org.apache.commons.math3.analysis.UnivariateFunction; -import org.apache.commons.math3.analysis.interpolation.LinearInterpolator; -import org.apache.commons.math3.analysis.interpolation.UnivariateInterpolator; -import org.apache.commons.math3.stat.StatUtils; -import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics; -import org.slf4j.LoggerFactory; - -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.nio.charset.Charset; -import java.util.Arrays; - -/** - * @author darksnake - */ -@TypedActionDef(name = "showLoss", inputType = FitState.class, outputType = FitState.class, - info = "Show loss spectrum for fit with loss model. Calculate excitation to ionisation ratio.") -@Deprecated -public class ShowLossSpectrumAction extends OneToOneAction { - - private static final String[] names = {"X", "exPos", "ionPos", "exW", "ionW", "exIonRatio"}; - - public static double calcultateIonRatio(NamedValueSet set, double threshold) { - UnivariateIntegrator integrator = NumassIntegrator.getHighDensityIntegrator(); - UnivariateFunction integrand = LossCalculator.getSingleScatterFunction(set); - return 1d - integrator.integrate(integrand, 5d, threshold); - } - - public static Table generateSpread(PrintWriter writer, String name, NamedValueSet parameters, NamedMatrix covariance) { - int numCalls = 1000; - int gridPoints = 200; - double a = 8; - double b = 32; - - double[] grid = GridCalculator.getUniformUnivariateGrid(a, b, gridPoints); - - double[] upper = new double[gridPoints]; - double[] lower = new double[gridPoints]; - double[] dispersion = new double[gridPoints]; - - double[] central = new double[gridPoints]; - - UnivariateFunction func = LossCalculator.getSingleScatterFunction(parameters); - for (int j = 0; j < gridPoints; j++) { - central[j] = func.value(grid[j]); - } - - Arrays.fill(upper, Double.NEGATIVE_INFINITY); - Arrays.fill(lower, Double.POSITIVE_INFINITY); - Arrays.fill(dispersion, 0); - - GaussianParameterGenerator generator = new GaussianParameterGenerator(parameters, covariance); - - for (int i = 0; i < numCalls; i++) { - func = LossCalculator.getSingleScatterFunction(generator.generate()); - for (int j = 0; j < gridPoints; j++) { - double val = func.value(grid[j]); - upper[j] = Math.max(upper[j], val); - lower[j] = Math.min(lower[j], val); - dispersion[j] += (val - central[j]) * (val - central[j]) / numCalls; - } - } - String[] pointNames = {"e", "central", "lower", "upper", "dispersion"}; - ListTable.Builder res = new ListTable.Builder(pointNames); - for (int i = 0; i < gridPoints; i++) { - res.row(new MapPoint(pointNames, grid[i], central[i], lower[i], upper[i], dispersion[i])); - - } - return res.build(); - } - - @Override - protected FitState execute(Context context, String name, FitState input, Laminate meta) { - ParamSet pars = input.getParameters(); - if (!pars.names().contains(names)) { - LoggerFactory.getLogger(getClass()).error("Wrong input FitState. Must be loss spectrum fit."); - throw new RuntimeException("Wrong input FitState"); - } - - UnivariateFunction scatterFunction; - boolean calculateRatio = false; - PlotFrame frame = PlotUtils.getPlotManager(context) - .buildPlotFrame(getName(), name + ".loss", - new MetaBuilder("plot") - .setValue("plotTitle", "Differential scattering crossection for " + name) - ); - switch (input.getModel().meta().getString("name", "")) { - case "scatter-variable": - scatterFunction = LossCalculator.getSingleScatterFunction(pars); - calculateRatio = true; - - LossCalculator.plotScatter(frame, pars); - break; - case "scatter-empiric-experimental": - scatterFunction = new ExperimentalVariableLossSpectrum.Loss(0.3).total(pars); - - frame.add(PlottableXYFunction.plotFunction("Cross-section", (x) -> scatterFunction.value(x), 0, 100, 1000)); - break; - default: - throw new RuntimeException("Can work only with variable loss spectra"); - } - - double threshold = 0; - double ionRatio = -1; - double ionRatioError = -1; - if (calculateRatio) { - threshold = meta.getDouble("ionThreshold", 17); - ionRatio = calcultateIonRatio(pars, threshold); - report(context, name, "The ionization ratio (using threshold {}) is {}", threshold, ionRatio); - ionRatioError = calultateIonRatioError(context, name, input, threshold); - report(context, name, "the ionization ration standard deviation (using threshold {}) is {}", threshold, ionRatioError); - } - - if (meta.getBoolean("printResult", false)) { - PrintWriter writer = new PrintWriter(new OutputStreamWriter(buildActionOutput(context, name), Charset.forName("UTF-8"))); -// writer.println("*** FIT PARAMETERS ***"); - input.print(writer); -// for (Param param : pars.getSubSet(names).getParams()) { -// writer.println(param.toString()); -// } -// writer.println(); -// onComplete.printf("Chi squared over degrees of freedom: %g/%d = %g", input.getChi2(), input.ndf(), chi2 / this.ndf()); - - writer.println(); - - writer.println("*** LOSS SPECTRUM INFORMATION ***"); - writer.println(); - - if (calculateRatio) { - writer.printf("The ionization ratio (using threshold %f) is %f%n", threshold, ionRatio); - writer.printf("The ionization ratio standard deviation (using threshold %f) is %f%n", threshold, ionRatioError); - writer.println(); - } - -// double integralThreshold = reader.getDouble("numass.eGun", 19005d) - reader.getDouble("integralThreshold", 14.82); -// double integralRatio = calculateIntegralExIonRatio(input.getDataSet(), input.getParameters().getDouble("X"), integralThreshold); -// writer.printf("The excitation to ionization ratio from integral spectrum (using threshold %f) is %f%n", integralThreshold, integralRatio); - writer.println(); - - writer.println("*** SUMMARY ***"); - - writer.printf("%s\t", "name"); - - for (String parName : names) { - writer.printf("%s\t%s\t", parName, parName + "_err"); - } - if (calculateRatio) { - writer.printf("%s\t", "ionRatio"); - writer.printf("%s\t", "ionRatioErr"); - } - writer.printf("%s%n", "chi2"); - - writer.printf("%s\t", name); - - for (Param param : pars.getSubSet(names).getParams()) { - writer.printf("%f\t%f\t", param.value(), param.getErr()); - } - - if (calculateRatio) { - writer.printf("%f\t", ionRatio); - writer.printf("%f\t", ionRatioError); - } - - writer.printf("%f%n", input.getChi2() / ((FitTaskResult) input).ndf()); - writer.println(); - - writer.println("***LOSS SPECTRUM***"); - writer.println(); - PrintFunction.printFunctionSimple(writer, scatterFunction, 0, 100, 500); - - if (meta.getBoolean("showSpread", false)) { - writer.println("***SPECTRUM SPREAD***"); - writer.println(); - - ParamSet parameters = input.getParameters().getSubSet("exPos", "ionPos", "exW", "ionW", "exIonRatio"); - NamedMatrix covariance = input.getCovariance(); - Table spreadData = generateSpread(writer, name, parameters, covariance); - ColumnedDataWriter.writeDataSet(System.out, spreadData, "", spreadData.getFormat().namesAsArray()); - } - } - - return input; - } - - private double calculateIntegralExIonRatio(Table data, double X, double integralThreshold) { - double scatterProb = 1 - Math.exp(-X); - - double[] x = data.getColumn("Uset").asList().stream().mapToDouble((val) -> val.doubleValue()).toArray(); - double[] y = data.getColumn("CR").asList().stream().mapToDouble((val) -> val.doubleValue()).toArray(); - - double yMax = StatUtils.max(y); - - UnivariateInterpolator interpolator = new LinearInterpolator(); - UnivariateFunction interpolated = interpolator.interpolate(x, y); - - double thresholdValue = interpolated.value(integralThreshold); - - double one = 1 - X * Math.exp(-X); - - double ionProb = (one - thresholdValue / yMax); - double exProb = (thresholdValue / yMax - one + scatterProb); - return exProb / ionProb; - } - - public double calultateIonRatioError(Context context, String dataNeme, FitState state, double threshold) { - ParamSet parameters = state.getParameters().getSubSet("exPos", "ionPos", "exW", "ionW", "exIonRatio"); - NamedMatrix covariance = state.getCovariance(); - return calultateIonRatioError(context, dataNeme, parameters, covariance, threshold); - } - - @SuppressWarnings("Unchecked") - public double calultateIonRatioError(Context context, String name, NamedValueSet parameters, NamedMatrix covariance, double threshold) { - int number = 10000; - - double[] res = new GaussianParameterGenerator(parameters, covariance) - .generate(number) - .stream() - .mapToDouble((vector) -> calcultateIonRatio(vector, threshold)) - .filter(d -> !Double.isNaN(d)) - .toArray(); - -// Histogram hist = new Histogram(0.3, 0.5, 0.002); -// hist.fill(res); -// PlotFrame frame = PlotUtils.getPlotManager(context) -// .buildPlotFrame(getName(), name + ".ionRatio", -// new MetaBuilder("plot").setValue("plotTitle", "Ion ratio Distribution for " + name) -// ); -// frame.add(PlottableData.plot("ionRatio", new XYAdapter("binCenter", "count"), hist)); - - return new DescriptiveStatistics(res).getStandardDeviation(); - } - -} diff --git a/numass-main/src/main/java/inr/numass/actions/SlicedData.java b/numass-main/src/main/java/inr/numass/actions/SlicedData.java deleted file mode 100644 index 88a4ccee..00000000 --- a/numass-main/src/main/java/inr/numass/actions/SlicedData.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.actions; - -import hep.dataforge.tables.MapPoint; -import hep.dataforge.tables.SimplePointSource; -import hep.dataforge.tables.TableFormat; -import hep.dataforge.values.Value; -import inr.numass.storage.NMFile; -import inr.numass.storage.NumassPoint; -import org.apache.commons.math3.util.Pair; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -/** - * - * @author Darksnake - */ -public class SlicedData extends SimplePointSource { - private static final String TNAME = "Time"; - //format = {U,username1,username2, ...} - private static final String UNAME = "U"; - - - public SlicedData(NMFile file, Map> intervals, boolean normalize) { - super(prepateFormat(intervals)); - fill(file, intervals, normalize); - } - - private static TableFormat prepateFormat(Map> intervals){ - ArrayList names = new ArrayList<>(intervals.keySet()); - names.add(0, TNAME); - names.add(0, UNAME); - return TableFormat.forNames(names); - } - - private void fill(NMFile file, Map> intervals, boolean normalize){ - for (NumassPoint point : file) { - - //создаем основу для будущей точки - HashMap map = new HashMap<>(); - - //Кладем напряжение - map.put(UNAME, Value.of(point.getVoltage())); - double t = point.getLength(); - map.put(TNAME, Value.of(t)); - - for (Map.Entry> entry : intervals.entrySet()) { - String name = entry.getKey(); - Pair pair = entry.getValue(); - int a = pair.getFirst(); - int b = pair.getSecond(); - - int count; - // проверяем порядок границ и переворачиваем если нужно - if(b>a){ - count = point.getCountInWindow(a, b); - } else if(b { - - public static final String name = "slicing"; - - @Override - public String getName() { - return name; - } - - @Override - protected NMFile execute(Context context, String name, NMFile source, Laminate meta) throws ContentException { - boolean normalize; - Map> slicingConfig; - - LinkedHashMap> res = new LinkedHashMap<>(); - List list = meta.getMeta("sliceconfig").getMetaList("slicepoint"); - - for (Meta slice : list) { - String title = slice.getString("title", slice.getName()); - int from = slice.getInt("from", 0); - int to = slice.getInt("to", RawNMPoint.MAX_CHANEL); - res.put(title, new Pair<>(from, to)); - } - slicingConfig = res; - - normalize = meta.getBoolean("normalize", false); - - if (slicingConfig == null) { - throw new RuntimeException("Slice configuration not defined"); - } - report(context, name, "File {} started", source.getName()); - - SlicedData sData = new SlicedData(source, slicingConfig, normalize); - - OutputStream stream = buildActionOutput(context, name); - - ColumnedDataWriter.writeDataSet(stream, sData, null); - - report(context, name, "File {} completed", source.getName()); - - return source; - } - -} diff --git a/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java b/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java index 28247ff6..7c0c5de7 100644 --- a/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java +++ b/numass-main/src/main/java/inr/numass/actions/SubstractSpectrumAction.java @@ -49,7 +49,7 @@ public class SubstractSpectrumAction extends OneToOneAction { Table res = builder.build(); OutputStream stream = buildActionOutput(context, name); - ColumnedDataWriter.writeDataSet(stream, res, inputMeta.toString()); + ColumnedDataWriter.writeTable(stream, res, inputMeta.toString()); return res; } catch (IOException ex) { throw new RuntimeException("Could not read reference file", ex); diff --git a/numass-main/src/main/java/inr/numass/actions/SummaryAction.java b/numass-main/src/main/java/inr/numass/actions/SummaryAction.java index ae5e338c..033293ea 100644 --- a/numass-main/src/main/java/inr/numass/actions/SummaryAction.java +++ b/numass-main/src/main/java/inr/numass/actions/SummaryAction.java @@ -113,7 +113,7 @@ public class SummaryAction extends ManyToOneAction { @Override protected void afterGroup(Context context, String groupName, Meta outputMeta, Table output) { OutputStream stream = buildActionOutput(context, groupName); - ColumnedDataWriter.writeDataSet(stream, output, groupName); + ColumnedDataWriter.writeTable(stream, output, groupName); super.afterGroup(context, groupName, outputMeta, output); } diff --git a/numass-main/src/main/java/inr/numass/data/ESpectrum.java b/numass-main/src/main/java/inr/numass/data/ESpectrum.java deleted file mode 100644 index fda7264e..00000000 --- a/numass-main/src/main/java/inr/numass/data/ESpectrum.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.data; - -import hep.dataforge.io.ColumnedDataWriter; -import hep.dataforge.tables.MapPoint; -import hep.dataforge.tables.SimplePointSource; -import hep.dataforge.tables.TableFormat; -import hep.dataforge.tables.TableFormatBuilder; -import hep.dataforge.values.Value; -import hep.dataforge.values.ValueType; -import inr.numass.storage.NumassPoint; - -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * - * @author Darksnake - */ -public class ESpectrum extends SimplePointSource { - - private final static String binCenter = "chanel"; - int binning = 1; - - public ESpectrum(List points, int binning, boolean normalize) { - super(prepareFormat(points)); - this.binning = binning; - fill(points, normalize); - } - - private static TableFormat prepareFormat(List points) { - TableFormatBuilder builder = new TableFormatBuilder(); - - builder.addString(binCenter); - points.stream().forEach((point) -> { - builder.addColumn(format("%.3f", point.getUread()), 10, ValueType.NUMBER); - }); - - return builder.build(); - } - - private void fill(List points, boolean normalize) { - assert !points.isEmpty(); - - List> spectra = new ArrayList<>(); - - for (NumassPoint numassPoint : points) { - spectra.add(numassPoint.getMap(binning, normalize)); - } - - for (Double x : spectra.get(0).keySet()) { - Map res = new HashMap<>(); - res.put(binCenter, Value.of(x)); - for (int j = 0; j < points.size(); j++) { - res.put(format("%.3f", points.get(j).getUread()), Value.of(spectra.get(j).get(x))); - } - this.addRow(new MapPoint(res)); - - } - } - - public void printToFile(OutputStream stream) { - ColumnedDataWriter.writeDataSet(stream, this, null); -// new ColumnedDataWriter(stream, this.getFormat().asArray()).writeDataSet(this, null); - } - -} diff --git a/numass-main/src/main/java/inr/numass/data/ESpectrumUtils.java b/numass-main/src/main/java/inr/numass/data/ESpectrumUtils.java deleted file mode 100644 index db9cc28a..00000000 --- a/numass-main/src/main/java/inr/numass/data/ESpectrumUtils.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.data; - -import static java.lang.Math.max; - -/** - * инструменты для работы с энергитическим спектром (который в каналах) - * @author Darksnake - */ -public class ESpectrumUtils { - public static int[] substract(int[] sp1, int[] sp2) { - return substract(sp1, sp2, 0, sp1.length); - } - - public static int[] substract(int[] sp1, int[] sp2, int from, int to) { - assert sp1.length == sp2.length; - assert to >= from; - assert to <= sp1.length; - - int[] res = new int[sp1.length]; - for (int i = from; i < to; i++) { - res[i] = max(0, sp1[i]-sp2[i]); - } - return res; - } - - -} diff --git a/numass-main/src/main/java/inr/numass/data/NumassPawReader.java b/numass-main/src/main/java/inr/numass/data/NumassPawReader.java index 4c2b00e3..01c72275 100644 --- a/numass-main/src/main/java/inr/numass/data/NumassPawReader.java +++ b/numass-main/src/main/java/inr/numass/data/NumassPawReader.java @@ -15,8 +15,8 @@ */ package inr.numass.data; -import inr.numass.storage.RawNMFile; import hep.dataforge.data.binary.Binary; + import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; diff --git a/numass-main/src/main/java/inr/numass/data/SpectrumInformation.java b/numass-main/src/main/java/inr/numass/data/SpectrumInformation.java index cd01b1a5..675fa95a 100644 --- a/numass-main/src/main/java/inr/numass/data/SpectrumInformation.java +++ b/numass-main/src/main/java/inr/numass/data/SpectrumInformation.java @@ -15,17 +15,17 @@ */ package inr.numass.data; -import hep.dataforge.stat.parametric.ParametricFunction; -import static hep.dataforge.maths.MatrixOperations.inverse; import hep.dataforge.maths.NamedMatrix; +import hep.dataforge.stat.parametric.ParametricFunction; import hep.dataforge.tables.DataPoint; import hep.dataforge.tables.ListTable; import hep.dataforge.values.NamedValueSet; -import inr.numass.utils.TritiumUtils; import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.linear.Array2DRowRealMatrix; import org.apache.commons.math3.linear.RealMatrix; +import static hep.dataforge.maths.MatrixOperations.inverse; + /** * * @author Darksnake @@ -57,7 +57,7 @@ public class SpectrumInformation { * @return */ public NamedMatrix getInformationMatrix(NamedValueSet set, ListTable data, String... parNames) { - SpectrumDataAdapter reader = TritiumUtils.adapter(); + SpectrumDataAdapter reader = NumassDataUtils.adapter(); String[] names = parNames; if (names.length == 0) { diff --git a/numass-main/src/main/java/inr/numass/debunch/DebunchData.java b/numass-main/src/main/java/inr/numass/debunch/DebunchData.java index b50a745e..05f1931f 100644 --- a/numass-main/src/main/java/inr/numass/debunch/DebunchData.java +++ b/numass-main/src/main/java/inr/numass/debunch/DebunchData.java @@ -15,8 +15,9 @@ */ package inr.numass.debunch; -import inr.numass.storage.NMEvent; -import inr.numass.storage.RawNMPoint; +import inr.numass.data.NMEvent; +import inr.numass.data.RawNMPoint; + import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; diff --git a/numass-main/src/main/java/inr/numass/debunch/DebunchEvent.java b/numass-main/src/main/java/inr/numass/debunch/DebunchEvent.java index b9f4e54b..85636853 100644 --- a/numass-main/src/main/java/inr/numass/debunch/DebunchEvent.java +++ b/numass-main/src/main/java/inr/numass/debunch/DebunchEvent.java @@ -15,7 +15,7 @@ */ package inr.numass.debunch; -import inr.numass.storage.NMEvent; +import inr.numass.data.NMEvent; /** * diff --git a/numass-main/src/main/java/inr/numass/debunch/DebunchReport.java b/numass-main/src/main/java/inr/numass/debunch/DebunchReport.java index f0445ad4..c6a9e418 100644 --- a/numass-main/src/main/java/inr/numass/debunch/DebunchReport.java +++ b/numass-main/src/main/java/inr/numass/debunch/DebunchReport.java @@ -15,8 +15,9 @@ */ package inr.numass.debunch; -import inr.numass.storage.NMEvent; -import inr.numass.storage.RawNMPoint; +import inr.numass.data.NMEvent; +import inr.numass.data.RawNMPoint; + import java.util.List; /** diff --git a/numass-main/src/main/java/inr/numass/debunch/DebunchReportImpl.java b/numass-main/src/main/java/inr/numass/debunch/DebunchReportImpl.java index 57e00c6b..485ff9f1 100644 --- a/numass-main/src/main/java/inr/numass/debunch/DebunchReportImpl.java +++ b/numass-main/src/main/java/inr/numass/debunch/DebunchReportImpl.java @@ -15,8 +15,9 @@ */ package inr.numass.debunch; -import inr.numass.storage.NMEvent; -import inr.numass.storage.RawNMPoint; +import inr.numass.data.NMEvent; +import inr.numass.data.RawNMPoint; + import java.util.ArrayList; import java.util.List; diff --git a/numass-main/src/main/java/inr/numass/debunch/Debuncher.java b/numass-main/src/main/java/inr/numass/debunch/Debuncher.java index 6f198fd0..27ff0578 100644 --- a/numass-main/src/main/java/inr/numass/debunch/Debuncher.java +++ b/numass-main/src/main/java/inr/numass/debunch/Debuncher.java @@ -15,7 +15,7 @@ */ package inr.numass.debunch; -import inr.numass.storage.RawNMPoint; +import inr.numass.data.RawNMPoint; /** * diff --git a/numass-main/src/main/java/inr/numass/debunch/Frame.java b/numass-main/src/main/java/inr/numass/debunch/Frame.java index 008c3dc8..ef0b88a2 100644 --- a/numass-main/src/main/java/inr/numass/debunch/Frame.java +++ b/numass-main/src/main/java/inr/numass/debunch/Frame.java @@ -15,10 +15,11 @@ */ package inr.numass.debunch; -import inr.numass.storage.NMEvent; +import inr.numass.data.NMEvent; +import org.apache.commons.math3.distribution.PoissonDistribution; + import java.util.ArrayList; import java.util.List; -import org.apache.commons.math3.distribution.PoissonDistribution; /** * diff --git a/numass-main/src/main/java/inr/numass/debunch/FrameAnalizer.java b/numass-main/src/main/java/inr/numass/debunch/FrameAnalizer.java index 5232ec86..7c381af3 100644 --- a/numass-main/src/main/java/inr/numass/debunch/FrameAnalizer.java +++ b/numass-main/src/main/java/inr/numass/debunch/FrameAnalizer.java @@ -15,7 +15,7 @@ */ package inr.numass.debunch; -import inr.numass.storage.RawNMPoint; +import inr.numass.data.RawNMPoint; import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.analysis.interpolation.LinearInterpolator; import org.apache.commons.math3.util.FastMath; diff --git a/numass-main/src/main/java/inr/numass/tasks/NumassFitScanSummaryTask.java b/numass-main/src/main/java/inr/numass/tasks/NumassFitScanSummaryTask.java index 3284b18d..dccbe48f 100644 --- a/numass-main/src/main/java/inr/numass/tasks/NumassFitScanSummaryTask.java +++ b/numass-main/src/main/java/inr/numass/tasks/NumassFitScanSummaryTask.java @@ -85,7 +85,7 @@ public class NumassFitScanSummaryTask extends AbstractTask
    { try (OutputStream stream = buildActionOutput(context, nodeName)) { String head = "Sterile neutrino mass scan summary\n" + meta.toString(); - ColumnedDataWriter.writeDataSet(stream, res, head); + ColumnedDataWriter.writeTable(stream, res, head); } catch (IOException e) { getLogger(meta).error("Failed to close output stream", e); } diff --git a/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java b/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java index a1b4f630..4e274baa 100644 --- a/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java +++ b/numass-main/src/main/java/inr/numass/tasks/NumassPrepareTask.java @@ -19,7 +19,7 @@ import hep.dataforge.workspace.TaskModel; import inr.numass.actions.MergeDataAction; import inr.numass.actions.MonitorCorrectAction; import inr.numass.actions.PrepareDataAction; -import inr.numass.storage.NumassData; +import inr.numass.data.NumassData; /** * Prepare data task diff --git a/numass-main/src/main/java/inr/numass/tasks/NumassSubstractEmptySourceTask.java b/numass-main/src/main/java/inr/numass/tasks/NumassSubstractEmptySourceTask.java index 240df43c..64dab317 100644 --- a/numass-main/src/main/java/inr/numass/tasks/NumassSubstractEmptySourceTask.java +++ b/numass-main/src/main/java/inr/numass/tasks/NumassSubstractEmptySourceTask.java @@ -53,7 +53,7 @@ public class NumassSubstractEmptySourceTask extends AbstractTask
    { res.getGoal().onComplete((r, err) -> { if (r != null) { OutputStream out = model.getContext().io().out("merge", input.getName() + ".subtract"); - ColumnedDataWriter.writeDataSet(out, r, + ColumnedDataWriter.writeTable(out, r, input.meta().getBuilder().setNode("empty", emptySource.meta()).toString()); } }); diff --git a/numass-main/src/main/java/inr/numass/utils/BunchGenerator.java b/numass-main/src/main/java/inr/numass/utils/BunchGenerator.java index 463ceb02..535353e1 100644 --- a/numass-main/src/main/java/inr/numass/utils/BunchGenerator.java +++ b/numass-main/src/main/java/inr/numass/utils/BunchGenerator.java @@ -15,13 +15,14 @@ */ package inr.numass.utils; -import inr.numass.storage.NMEvent; -import inr.numass.storage.RawNMPoint; -import java.util.ArrayList; +import inr.numass.data.NMEvent; +import inr.numass.data.RawNMPoint; import org.apache.commons.math3.random.MersenneTwister; import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.random.SynchronizedRandomGenerator; +import java.util.ArrayList; + /** * * @author Darksnake diff --git a/numass-main/src/main/java/inr/numass/utils/NMEventGenerator.java b/numass-main/src/main/java/inr/numass/utils/NMEventGenerator.java index 5c66b941..73d0feef 100644 --- a/numass-main/src/main/java/inr/numass/utils/NMEventGenerator.java +++ b/numass-main/src/main/java/inr/numass/utils/NMEventGenerator.java @@ -16,9 +16,9 @@ package inr.numass.utils; import hep.dataforge.meta.Meta; -import inr.numass.storage.NMEvent; -import inr.numass.storage.NumassPoint; -import inr.numass.storage.RawNMPoint; +import inr.numass.data.NMEvent; +import inr.numass.data.NumassPoint; +import inr.numass.data.RawNMPoint; import org.apache.commons.math3.distribution.EnumeratedRealDistribution; import org.apache.commons.math3.distribution.RealDistribution; import org.apache.commons.math3.random.EmpiricalDistribution; diff --git a/numass-main/src/main/java/inr/numass/utils/NMEventGeneratorWithPulser.java b/numass-main/src/main/java/inr/numass/utils/NMEventGeneratorWithPulser.java index 1cb13f8d..aa47cfe5 100644 --- a/numass-main/src/main/java/inr/numass/utils/NMEventGeneratorWithPulser.java +++ b/numass-main/src/main/java/inr/numass/utils/NMEventGeneratorWithPulser.java @@ -1,7 +1,7 @@ package inr.numass.utils; import hep.dataforge.meta.Meta; -import inr.numass.storage.NMEvent; +import inr.numass.data.NMEvent; import org.apache.commons.math3.distribution.NormalDistribution; import org.apache.commons.math3.distribution.RealDistribution; import org.apache.commons.math3.random.RandomGenerator; diff --git a/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java b/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java index 36669ae6..920860e1 100644 --- a/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java +++ b/numass-main/src/main/java/inr/numass/utils/PileUpSimulator.java @@ -5,10 +5,10 @@ */ package inr.numass.utils; -import inr.numass.storage.NMEvent; -import inr.numass.storage.NMPoint; -import inr.numass.storage.NumassPoint; -import inr.numass.storage.RawNMPoint; +import inr.numass.data.NMEvent; +import inr.numass.data.NumassPoint; +import inr.numass.data.PointBuilders; +import inr.numass.data.RawNMPoint; import org.apache.commons.math3.random.RandomGenerator; import java.util.ArrayList; @@ -55,15 +55,15 @@ public class PileUpSimulator { } public NumassPoint generated() { - return new NMPoint(new RawNMPoint(uSet, generated, pointLength)); + return PointBuilders.readRawPoint(new RawNMPoint(uSet, generated, pointLength)); } public NumassPoint registered() { - return new NMPoint(new RawNMPoint(uSet, registered, pointLength)); + return PointBuilders.readRawPoint(new RawNMPoint(uSet, registered, pointLength)); } public NumassPoint pileup() { - return new NMPoint(new RawNMPoint(uSet, pileup, pointLength)); + return PointBuilders.readRawPoint(new RawNMPoint(uSet, pileup, pointLength)); } /** diff --git a/numass-main/src/main/java/inr/numass/utils/TritiumUtils.java b/numass-main/src/main/java/inr/numass/utils/TritiumUtils.java index fe364172..484b4481 100644 --- a/numass-main/src/main/java/inr/numass/utils/TritiumUtils.java +++ b/numass-main/src/main/java/inr/numass/utils/TritiumUtils.java @@ -15,11 +15,7 @@ */ package inr.numass.utils; -import hep.dataforge.tables.DataPoint; -import hep.dataforge.tables.ListTable; -import hep.dataforge.tables.Table; -import inr.numass.data.SpectrumDataAdapter; -import inr.numass.storage.NumassPoint; +import inr.numass.data.NumassPoint; import org.apache.commons.math3.analysis.UnivariateFunction; import java.util.HashMap; @@ -32,48 +28,6 @@ import static java.lang.Math.*; */ public class TritiumUtils { - public static Table correctForDeadTime(ListTable data, double dtime) { - return correctForDeadTime(data, adapter(), dtime); - } - - /** - * Коррекция на мертвое время в секундах - * - * @param data - * @param dtime - * @return - */ - public static Table correctForDeadTime(ListTable data, SpectrumDataAdapter adapter, double dtime) { -// SpectrumDataAdapter adapter = adapter(); - ListTable.Builder res = new ListTable.Builder(data.getFormat()); - for (DataPoint dp : data) { - double corrFactor = 1 / (1 - dtime * adapter.getCount(dp) / adapter.getTime(dp)); - res.row(adapter.buildSpectrumDataPoint(adapter.getX(dp).doubleValue(), (long) (adapter.getCount(dp) * corrFactor), adapter.getTime(dp))); - } - return res.build(); - } - - /** - * Поправка масштаба высокого. - * - * @param data - * @param beta - * @return - */ - public static Table setHVScale(ListTable data, double beta) { - SpectrumDataAdapter reader = adapter(); - ListTable.Builder res = new ListTable.Builder(data.getFormat()); - for (DataPoint dp : data) { - double corrFactor = 1 + beta; - res.row(reader.buildSpectrumDataPoint(reader.getX(dp).doubleValue() * corrFactor, reader.getCount(dp), reader.getTime(dp))); - } - return res.build(); - } - - public static SpectrumDataAdapter adapter() { - return new SpectrumDataAdapter("Uset", "CR", "CRerr", "Time"); - } - /** * Integral beta spectrum background with given amplitude (total count rate * from) @@ -107,24 +61,6 @@ public class TritiumUtils { return res * 1E-23; } - public static double countRateWithDeadTime(NumassPoint p, int from, int to, double deadTime) { - double wind = p.getCountInWindow(from, to) / p.getLength(); - double res; - if (deadTime > 0) { - double total = p.getTotalCount(); -// double time = p.getLength(); -// res = wind / (1 - total * deadTime / time); - double timeRatio = deadTime / p.getLength(); - res = wind / total * (1d - Math.sqrt(1d - 4d * total * timeRatio)) / 2d / timeRatio; - } else { - res = wind; - } - return res; - } - - public static double countRateWithDeadTimeErr(NumassPoint p, int from, int to, double deadTime) { - return Math.sqrt(countRateWithDeadTime(p, from, to, deadTime) / p.getLength()); - } /** * Evaluate groovy expression using numass point as parameter @@ -136,7 +72,7 @@ public class TritiumUtils { public static double pointExpression(String expression, NumassPoint point) { Map exprParams = new HashMap<>(); exprParams.put("T", point.getLength()); - exprParams.put("U", point.getUread()); + exprParams.put("U", point.getVoltage()); exprParams.put("cr", ((double) point.getTotalCount()) / point.getLength()); exprParams.put("point", point); return ExpressionUtils.function(expression, exprParams); diff --git a/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java b/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java index 850a2343..e9251335 100644 --- a/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java +++ b/numass-main/src/main/java/inr/numass/utils/UnderflowCorrection.java @@ -9,7 +9,7 @@ import hep.dataforge.tables.DataPoint; import hep.dataforge.tables.ListTable; import hep.dataforge.tables.MapPoint; import hep.dataforge.tables.Table; -import inr.numass.storage.NumassPoint; +import inr.numass.data.NumassPoint; import org.apache.commons.math3.analysis.ParametricUnivariateFunction; import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.fitting.SimpleCurveFitter; diff --git a/numass-storage/numass-server/build.gradle b/numass-server/build.gradle similarity index 89% rename from numass-storage/numass-server/build.gradle rename to numass-server/build.gradle index 7fc3c30a..c203ec7c 100644 --- a/numass-storage/numass-server/build.gradle +++ b/numass-server/build.gradle @@ -17,7 +17,7 @@ apply plugin: 'com.github.johnrengelman.shadow' mainClassName = "inr.numass.server.ServerRunner" dependencies { - compile project(':numass-storage') + compile project(':numass-core') compile "hep.dataforge:storage-servlet" // project(':dataforge-storage:storage-servlet') compile 'commons-daemon:commons-daemon:1.+' } diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/HandlerUtils.java b/numass-server/src/main/java/inr/numass/server/HandlerUtils.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/HandlerUtils.java rename to numass-server/src/main/java/inr/numass/server/HandlerUtils.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassNote.java b/numass-server/src/main/java/inr/numass/server/NumassNote.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/NumassNote.java rename to numass-server/src/main/java/inr/numass/server/NumassNote.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java b/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/NumassRootHandler.java rename to numass-server/src/main/java/inr/numass/server/NumassRootHandler.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassRun.java b/numass-server/src/main/java/inr/numass/server/NumassRun.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/NumassRun.java rename to numass-server/src/main/java/inr/numass/server/NumassRun.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServer.java b/numass-server/src/main/java/inr/numass/server/NumassServer.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/NumassServer.java rename to numass-server/src/main/java/inr/numass/server/NumassServer.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java b/numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java rename to numass-server/src/main/java/inr/numass/server/NumassServerDaemon.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerUtils.java b/numass-server/src/main/java/inr/numass/server/NumassServerUtils.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/NumassServerUtils.java rename to numass-server/src/main/java/inr/numass/server/NumassServerUtils.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java b/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java similarity index 96% rename from numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java rename to numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java index de15c808..b7b45f1f 100644 --- a/numass-storage/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java +++ b/numass-server/src/main/java/inr/numass/server/NumassStorageHandler.java @@ -12,7 +12,7 @@ import hep.dataforge.storage.api.PointLoader; import hep.dataforge.storage.api.Storage; import hep.dataforge.storage.servlet.ServletUtils; import hep.dataforge.storage.servlet.StorageRatpackHandler; -import inr.numass.storage.NumassData; +import inr.numass.data.NumassData; import org.slf4j.LoggerFactory; import ratpack.handling.Context; diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/ServerRunner.java b/numass-server/src/main/java/inr/numass/server/ServerRunner.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/ServerRunner.java rename to numass-server/src/main/java/inr/numass/server/ServerRunner.java diff --git a/numass-storage/numass-server/src/main/java/inr/numass/server/UnknownNumassActionException.java b/numass-server/src/main/java/inr/numass/server/UnknownNumassActionException.java similarity index 100% rename from numass-storage/numass-server/src/main/java/inr/numass/server/UnknownNumassActionException.java rename to numass-server/src/main/java/inr/numass/server/UnknownNumassActionException.java diff --git a/numass-storage/numass-server/src/main/resources/templates/NoteLoader.ftl b/numass-server/src/main/resources/templates/NoteLoader.ftl similarity index 100% rename from numass-storage/numass-server/src/main/resources/templates/NoteLoader.ftl rename to numass-server/src/main/resources/templates/NoteLoader.ftl diff --git a/numass-storage/numass-server/src/main/resources/templates/NumassLoader.ftl b/numass-server/src/main/resources/templates/NumassLoader.ftl similarity index 100% rename from numass-storage/numass-server/src/main/resources/templates/NumassLoader.ftl rename to numass-server/src/main/resources/templates/NumassLoader.ftl diff --git a/numass-storage/numass-server/src/main/resources/templates/NumassRoot.ftl b/numass-server/src/main/resources/templates/NumassRoot.ftl similarity index 100% rename from numass-storage/numass-server/src/main/resources/templates/NumassRoot.ftl rename to numass-server/src/main/resources/templates/NumassRoot.ftl diff --git a/numass-storage/src/main/java/inr/numass/storage/NumassDataUtils.java b/numass-storage/src/main/java/inr/numass/storage/NumassDataUtils.java deleted file mode 100644 index 27b23286..00000000 --- a/numass-storage/src/main/java/inr/numass/storage/NumassDataUtils.java +++ /dev/null @@ -1,69 +0,0 @@ -package inr.numass.storage; - -import java.time.Instant; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * Created by darksnake on 30-Jan-17. - */ -public class NumassDataUtils { - - public static Collection joinSpectra(Stream spectra) { - Map map = new LinkedHashMap<>(); - spectra.forEach(datum -> { - datum.forEach(point -> { - double uset = point.getVoltage(); - if (map.containsKey(uset)) { - map.put(uset, join(point, map.get(uset))); - } else { - map.put(uset, point); - } - }); - }); - return map.values(); - } - - /** - * Spectral sum of two points - * - * @param first - * @param second - * @return - */ - public static NumassPoint join(NumassPoint first, NumassPoint second) { - if (first.getVoltage() != second.getVoltage()) { - throw new RuntimeException("Voltage mismatch"); - } - int[] newArray = new int[first.getSpectrum().length]; - Arrays.setAll(newArray, i -> first.getSpectrum()[i] + second.getSpectrum()[i]); - return new NMPoint( - first.getVoltage(), - Instant.EPOCH, - first.getLength() + second.getLength(), - newArray - ); - } - - public static NumassPoint substractPoint(NumassPoint point, NumassPoint reference) { - int[] array = new int[point.getSpectrum().length]; - Arrays.setAll(array, i -> Math.max(0, point.getSpectrum()[i] - reference.getSpectrum()[i])); - return new NMPoint( - point.getVoltage(), - point.getStartTime(), - point.getLength(), - array - ); - } - - public static Collection substractReferencePoint(Collection points, double uset) { - NumassPoint reference = points.stream().filter(it -> it.getVoltage() == uset).findFirst() - .orElseThrow(() -> new RuntimeException("Reference point not found")); - return points.stream().map(it -> substractPoint(it, reference)).collect(Collectors.toList()); - } - -} diff --git a/numass-storage/src/main/java/inr/numass/storage/ProtoUtils.java b/numass-storage/src/main/java/inr/numass/storage/ProtoUtils.java deleted file mode 100644 index 0d682a02..00000000 --- a/numass-storage/src/main/java/inr/numass/storage/ProtoUtils.java +++ /dev/null @@ -1,22 +0,0 @@ -package inr.numass.storage; - -/** - * Created by darksnake on 13-Apr-17. - */ -public class ProtoUtils { -// public static NumassPoint readProtoPoint(InputStream stream, Function peakFinder) throws IOException { -// Point point = NumassProto.Point.parseFrom(stream); -// Channel ch = point.getChannels(0); -// ch.getBlocksList().stream() -// .flatMapToLong(block -> { -// return LongStream.concat( -// block.getPeaks().getAmplitudesList() -// .stream().mapToLong(it -> it.longValue()), -// block.getEventsList().stream() -// .mapToLong(it->) -// ) -// }); -// -// return new NMPoint(); -} -} diff --git a/numass-storage/test/build.gradle b/numass-test/build.gradle similarity index 85% rename from numass-storage/test/build.gradle rename to numass-test/build.gradle index 442b7ef1..280c9304 100644 --- a/numass-storage/test/build.gradle +++ b/numass-test/build.gradle @@ -1,5 +1,8 @@ +apply plugin: 'groovy' + description = "Test module for numass client and server" + task runServer(type: JavaExec) { description 'Start numass server locally' @@ -23,7 +26,7 @@ task runClient(type: JavaExec) { } dependencies { - compile project(':numass-storage:numass-client') - compile project(':numass-storage:numass-server') + compile project(':numass-client') + compile project(':numass-server') compile "hep.dataforge:dataforge-grind" //project(':dataforge-grind') -} \ No newline at end of file +} diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/FixStampEndings.groovy b/numass-test/src/main/groovy/inr/numass/scripts/FixStampEndings.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/FixStampEndings.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/FixStampEndings.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/StartRun.groovy b/numass-test/src/main/groovy/inr/numass/scripts/StartRun.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/StartRun.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/StartRun.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/TestClient.groovy b/numass-test/src/main/groovy/inr/numass/scripts/TestClient.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/TestClient.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/TestClient.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/TestFileTransfer.groovy b/numass-test/src/main/groovy/inr/numass/scripts/TestFileTransfer.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/TestFileTransfer.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/TestFileTransfer.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/TestNotes.groovy b/numass-test/src/main/groovy/inr/numass/scripts/TestNotes.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/TestNotes.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/TestNotes.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/TestRemoteClient.groovy b/numass-test/src/main/groovy/inr/numass/scripts/TestRemoteClient.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/TestRemoteClient.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/TestRemoteClient.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/TestServer.groovy b/numass-test/src/main/groovy/inr/numass/scripts/TestServer.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/TestServer.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/TestServer.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/TestStateChange.groovy b/numass-test/src/main/groovy/inr/numass/scripts/TestStateChange.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/TestStateChange.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/TestStateChange.groovy diff --git a/numass-storage/test/src/main/groovy/inr/numass/scripts/TestStorageAccess.groovy b/numass-test/src/main/groovy/inr/numass/scripts/TestStorageAccess.groovy similarity index 100% rename from numass-storage/test/src/main/groovy/inr/numass/scripts/TestStorageAccess.groovy rename to numass-test/src/main/groovy/inr/numass/scripts/TestStorageAccess.groovy diff --git a/numass-viewer/build.gradle b/numass-viewer/build.gradle index b425ba63..9b626958 100644 --- a/numass-viewer/build.gradle +++ b/numass-viewer/build.gradle @@ -1,32 +1,27 @@ -apply plugin: 'application' +plugins{ + id "org.jetbrains.kotlin.jvm" version "1.1.1" + id "application" +} if (!hasProperty('mainClass')) { ext.mainClass = 'inr.numass.viewer.Viewer' } mainClassName = mainClass -version = "0.3.7" +version = "0.3.8" description = "The viewer for numass data" -configurations { - compile.exclude module: 'groovy-all' - compile.exclude module: 'groovy' - compile.exclude module: 'fontawesomefx' - compile.exclude module: 'httpclient' - compile.exclude module: 'httpcore' - compile.exclude module: 'shichimifx' - compile.exclude module: 'commons-math3' - compile.exclude module: 'dataforge-fitting' - compile.exclude module: 'dataforge-minuit' - compile.exclude module: 'dataforge-grind' - compile.exclude module: 'grind-terminal' -} +compileKotlin.kotlinOptions.jvmTarget = "1.8" dependencies { - compile project(':numass-main') + compile project(':numass-core') compile "hep.dataforge:plots-jfc" //project(':dataforge-plots:plots-jfc') compile 'com.jcraft:jsch:0.1.54' + + compile "org.jetbrains.kotlin:kotlin-stdlib:1.1.1" + //compile "org.jetbrains.kotlin:kotlin-reflect:1.1.1" + compile "no.tornado:tornadofx:1.7.1" } //shadowJar { diff --git a/numass-viewer/proguard.cfg b/numass-viewer/proguard.cfg deleted file mode 100644 index 7ccc9378..00000000 --- a/numass-viewer/proguard.cfg +++ /dev/null @@ -1,9 +0,0 @@ --injars build\libs\numass-viewer-0.3.1-all.jar --outjars build\libs\numass-viewer-0.3.1-min.jar - --libraryjars 'c:\Program Files\Java\jdk\jre\lib\rt.jar' --libraryjars 'C:\Program Files\Java\jdk\jre\lib\ext\jfxrt.jar' --libraryjars 'C:\Users\darksnake\.posh_gvm\groovy\2.4.6\lib\groovy-2.4.6.jar' - --dontobfuscate --dontwarn \ No newline at end of file diff --git a/numass-viewer/src/main/java/inr/numass/viewer/MainViewerController.java b/numass-viewer/src/main/java/inr/numass/viewer/MainViewerController.java deleted file mode 100644 index d18300cc..00000000 --- a/numass-viewer/src/main/java/inr/numass/viewer/MainViewerController.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.viewer; - -import hep.dataforge.context.Context; -import hep.dataforge.context.Global; -import hep.dataforge.exceptions.StorageException; -import hep.dataforge.fx.fragments.FragmentWindow; -import hep.dataforge.fx.fragments.LogFragment; -import hep.dataforge.fx.work.Work; -import hep.dataforge.fx.work.WorkManager; -import hep.dataforge.fx.work.WorkManagerFragment; -import inr.numass.NumassProperties; -import inr.numass.storage.NumassData; -import inr.numass.storage.NumassStorage; -import javafx.application.Platform; -import javafx.event.ActionEvent; -import javafx.fxml.FXML; -import javafx.fxml.Initializable; -import javafx.geometry.Insets; -import javafx.scene.Node; -import javafx.scene.control.*; -import javafx.scene.control.ButtonBar.ButtonData; -import javafx.scene.layout.AnchorPane; -import javafx.scene.layout.GridPane; -import javafx.stage.DirectoryChooser; -import javafx.util.Pair; -import org.controlsfx.control.StatusBar; - -import java.io.File; -import java.net.URL; -import java.util.Optional; -import java.util.ResourceBundle; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * FXML Controller class - * - * @author Alexander Nozik - */ -public class MainViewerController implements Initializable { - - @FXML - private ToggleButton consoleButton; - @FXML - private Button loadDirectoryButton; - - private MspViewController mspController; - - //main pane views - @FXML - private AnchorPane numassLoaderViewContainer; - @FXML - private TreeTableView numassLoaderDataTree; - @FXML - private StatusBar statusBar; - //tabs - @FXML - private TabPane tabPane; - @FXML - private Tab mainTab; - @FXML - private Tab mspTab; - @FXML - private Tab pressuresTab; - @FXML - private Tab temperaturesTab; - @FXML - private Button loadRemoteButton; - @FXML - private Label storagePathLabel; - @FXML - private ToggleButton processManagerButton; - - private WorkManager workManager; - - public static MainViewerController build(NumassStorage root) { - MainViewerController res = new MainViewerController(); - res.setRootStorage(root); - return res; - } - -// private Popup progressPopup; - - /** - * Initializes the controller class. - * - * @param url - * @param rb - */ - @Override - public void initialize(URL url, ResourceBundle rb) { - LogFragment logFragment = new LogFragment(); - logFragment.addRootLogHandler(); - //logFragment.hookStd(); - new FragmentWindow(logFragment).bindTo(consoleButton); - new FragmentWindow(new WorkManagerFragment(getWorkManager())).bindTo(processManagerButton); - - mspController = new MspViewController(getContext()); - this.mspTab.setContent(mspController.getRoot()); - } - - @FXML - private void onLoadDirectory(ActionEvent event) { - - DirectoryChooser chooser = new DirectoryChooser(); - chooser.setTitle("Select numass storage root"); - String storageRoot = NumassProperties.getNumassProperty("numass.storage.root"); - if (storageRoot == null) { - chooser.setInitialDirectory(new File(".").getAbsoluteFile()); - } else { - chooser.setInitialDirectory(new File(storageRoot)); - } - - final File rootDir = chooser.showDialog(((Node) event.getTarget()).getScene().getWindow()); - - if (rootDir != null) { - NumassProperties.setNumassProperty("numass.storage.root", rootDir.getAbsolutePath()); - loadDirectory(rootDir.toURI().toString()); - } - } - - private void loadDirectory(String path) { - getWorkManager().startWork("viewer.loadDirectory", (Work work) -> { - work.setTitle("Load storage (" + path + ")"); - work.setProgress(-1); - work.setStatus("Building numass storage tree..."); - try { - NumassStorage root = NumassStorage.buildNumassRoot(path, true, false); - setRootStorage(root); - Platform.runLater(() -> storagePathLabel.setText("Storage: " + path)); - } catch (Exception ex) { - work.setProgress(0); - work.setStatus("Failed to load storage " + path); - Logger.getLogger(MainViewerController.class.getName()).log(Level.SEVERE, null, ex); - } - }); - } - - private Context getContext() { - return Global.instance(); - } - - private synchronized WorkManager getWorkManager() { - if(workManager == null) { - workManager = new WorkManager(); - workManager.startGlobal(); - } - return workManager; - } - - public void setRootStorage(NumassStorage root) { - - getWorkManager().cleanup(); - getWorkManager().startWork("viewer.storage.load", (Work callback) -> { - callback.setTitle("Fill data to UI (" + root.getName() + ")"); - callback.setProgress(-1); - Platform.runLater(() -> statusBar.setProgress(-1)); - - callback.setStatus("Loading numass storage tree..."); - - try { - new NumassLoaderTreeBuilder().build(callback, numassLoaderDataTree, root, (NumassData loader) -> { - NumassLoaderViewComponent component = new NumassLoaderViewComponent(getContext()); - component.loadData(loader); - numassLoaderViewContainer.getChildren().clear(); - numassLoaderViewContainer.getChildren().add(component); - AnchorPane.setTopAnchor(component, 0.0); - AnchorPane.setRightAnchor(component, 0.0); - AnchorPane.setLeftAnchor(component, 0.0); - AnchorPane.setBottomAnchor(component, 0.0); - numassLoaderViewContainer.requestLayout(); - }); - } catch (StorageException ex) { - Logger.getLogger(MainViewerController.class.getName()).log(Level.SEVERE, null, ex); - } - -// callback.setProgress(1, 1); - Platform.runLater(() -> statusBar.setProgress(0)); - callback.setStatus("Numass storage tree loaded."); - callback.setProgressToMax(); - }); - - - mspController.fillMspData(root); - - pressuresTab.getContent().setVisible(false); - temperaturesTab.getContent().setVisible(false); - - } - - @FXML - private void onLoadRemote(ActionEvent event) { - // Create the custom dialog. - Dialog> dialog = new Dialog<>(); - dialog.setTitle("Remote storage selection"); - dialog.setHeaderText("Select remote storage login options and run"); - - ButtonType loginButtonType = new ButtonType("Load", ButtonData.OK_DONE); - dialog.getDialogPane().getButtonTypes().addAll(loginButtonType, ButtonType.CANCEL); - - // Create the username and password labels and fields. - GridPane grid = new GridPane(); - grid.setHgap(10); - grid.setVgap(10); - grid.setPadding(new Insets(20, 150, 10, 10)); - - TextField storageText = new TextField(); - storageText.setPrefWidth(350); - storageText.setText("sftp://trdat:Anomaly@192.168.111.1"); - TextField runText = new TextField(); - runText.setPromptText("Run name"); - - grid.add(new Label("Storage path:"), 0, 0); - grid.add(storageText, 1, 0); - grid.add(new Label("Run name:"), 0, 1); - grid.add(runText, 1, 1); - - dialog.getDialogPane().setContent(grid); - - // Request focus on the username field by default. - storageText.requestFocus(); - - // Convert the result to a username-password-pair when the login button is clicked. - dialog.setResultConverter(dialogButton -> { - if (dialogButton == loginButtonType) { - return new Pair<>(storageText.getText(), runText.getText()); - } - return null; - }); - - Optional> result = dialog.showAndWait(); - - if (result.isPresent()) { - String path = result.get().getKey() + "/data/" + result.get().getValue(); - loadDirectory(path); - } - } -} diff --git a/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderTreeBuilder.java b/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderTreeBuilder.java deleted file mode 100644 index 6758ed1d..00000000 --- a/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderTreeBuilder.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.viewer; - -import hep.dataforge.exceptions.StorageException; -import hep.dataforge.fx.work.Work; -import inr.numass.storage.NumassData; -import inr.numass.storage.NumassStorage; -import javafx.application.Platform; -import javafx.beans.property.SimpleStringProperty; -import javafx.scene.control.TreeItem; -import javafx.scene.control.TreeTableColumn; -import javafx.scene.control.TreeTableView; -import javafx.scene.input.MouseEvent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.time.Instant; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Consumer; - -/** - * - * @author darksnake - */ -public class NumassLoaderTreeBuilder { - - @SuppressWarnings("unchecked") - public void build(Work callback, - TreeTableView numassLoaderDataTree, - NumassStorage rootStorage, - Consumer numassViewBuilder) throws StorageException { - - TreeItem root = buildNode(rootStorage, numassViewBuilder, callback); - root.setExpanded(true); - - Platform.runLater(() -> { - numassLoaderDataTree.setRoot(root); - - TreeTableColumn numassLoaderNameColumn = new TreeTableColumn<>("name"); - - numassLoaderNameColumn.setCellValueFactory( - (TreeTableColumn.CellDataFeatures param) -> new SimpleStringProperty(param.getValue().getValue().getName())); - - TreeTableColumn numassLoaderTimeColumn = new TreeTableColumn<>("time"); - numassLoaderTimeColumn.setCellValueFactory( - (TreeTableColumn.CellDataFeatures param) -> new SimpleStringProperty(param.getValue().getValue().getTime())); - - TreeTableColumn nummassLoaderDescriptionColumn = new TreeTableColumn<>("description"); - nummassLoaderDescriptionColumn.setCellValueFactory( - (TreeTableColumn.CellDataFeatures param) -> new SimpleStringProperty(param.getValue().getValue().getDescription())); - - numassLoaderDataTree.getColumns().setAll(numassLoaderNameColumn, numassLoaderTimeColumn, nummassLoaderDescriptionColumn); - - numassLoaderNameColumn.setSortType(TreeTableColumn.SortType.ASCENDING); - numassLoaderDataTree.getSortOrder().addAll(numassLoaderTimeColumn, numassLoaderNameColumn); - numassLoaderDataTree.addEventHandler(MouseEvent.MOUSE_CLICKED, (MouseEvent e) -> { - if (e.getClickCount() == 2) { - TreeItemValue value = numassLoaderDataTree.getFocusModel().getFocusedCell().getTreeItem().getValue(); - if (value.isLoader()) { - numassViewBuilder.accept(value.getLoader()); - } - } - }); - numassLoaderTimeColumn.setVisible(false); - nummassLoaderDescriptionColumn.setVisible(false); - }); - - } - - private TreeItem buildNode(NumassStorage storage, - Consumer numassViewBuilder, Work callback) throws StorageException { - TreeItem node = new TreeItem<>(buildValue(storage)); - node.getChildren().setAll(buildChildren(storage, numassViewBuilder, callback)); - return node; - } - - private Logger getLogger() { - return LoggerFactory.getLogger(getClass()); - } - - private List> buildChildren(NumassStorage storage, - Consumer numassViewBuilder, Work callback) throws StorageException { - List> list = new ArrayList<>(); - - storage.shelves().values().stream().forEach(subStorage -> { - if (subStorage instanceof NumassStorage) { - try { - NumassStorage numassSubStorage = (NumassStorage) subStorage; - TreeItem childNode = buildNode(numassSubStorage, numassViewBuilder, callback); - if (!childNode.isLeaf()) { - list.add(buildNode(numassSubStorage, numassViewBuilder, callback)); - } - } catch (StorageException ex) { - getLogger().error("Error while loading numass storage node", ex); - } - } - }); - - callback.setStatus("Building storage " + storage.getName()); - callback.setProgress(0); - callback.setMaxProgress(storage.loaders().size()); - storage.loaders().values().stream() - .forEach(loader -> { - if (loader instanceof NumassData) { - callback.setStatus("Building numass data loader " + loader.getName()); - NumassData numassLoader = (NumassData) loader; - TreeItem numassLoaderTreeItem = new TreeItem<>(buildValue(numassLoader)); - list.add(numassLoaderTreeItem); - } - callback.increaseProgress(1); - }); - - callback.setStatus("Loading legacy DAT files"); - callback.setProgress(0); - List legacyFiles = storage.legacyFiles(); - callback.setMaxProgress(legacyFiles.size()); - //adding legacy data files - for (NumassData legacyDat : legacyFiles) { - callback.setStatus("Loading numass DAT file " + legacyDat.getName()); - TreeItem numassLoaderTreeItem = new TreeItem<>(buildValue(legacyDat)); - callback.increaseProgress(1); - list.add(numassLoaderTreeItem); - } - - return list; - } - - private TreeItemValue buildValue(final NumassStorage storage) { - return new TreeItemValue() { - - @Override - public String getDescription() { - return storage.getDescription(); - } - - @Override - public NumassData getLoader() { - return null; - } - - @Override - public String getName() { - return storage.getName(); - } - - @Override - public NumassStorage getStorage() { - return storage; - } - - @Override - public String getTime() { - if (getStorage().meta().hasValue("file.timeModified")) { - return getStorage().meta().getValue("file.timeModified").stringValue(); - } else { - return null; - } - } - - @Override - public boolean isLoader() { - return false; - } - }; - } - - private TreeItemValue buildValue(final NumassData loader) { - return new TreeItemValue() { - - @Override - public String getDescription() { - return loader.getDescription(); - } - - @Override - public NumassData getLoader() { - return loader; - } - - @Override - public String getName() { -// if (loader.meta().getBoolean("reverse", false)) { -// return loader.getName() + " \u2191"; -// } else { -// return loader.getName(); -// } - return loader.getName(); - } - - @Override - public NumassStorage getStorage() { - return null; - } - - @Override - public String getTime() { - Instant startTime = loader.startTime(); - if (startTime == null || startTime.equals(Instant.EPOCH)) { - return ""; - } else { - return loader.startTime().toString(); - } - } - - @Override - public boolean isLoader() { - return true; - } - }; - } - - public interface TreeItemValue { - - String getName(); - - String getTime(); - - String getDescription(); - - NumassData getLoader(); - - NumassStorage getStorage(); - - boolean isLoader(); - } -} diff --git a/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java b/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java deleted file mode 100644 index 04f18f47..00000000 --- a/numass-viewer/src/main/java/inr/numass/viewer/NumassLoaderViewComponent.java +++ /dev/null @@ -1,433 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.viewer; - -import hep.dataforge.context.Context; -import hep.dataforge.fx.work.Work; -import hep.dataforge.fx.work.WorkManager; -import hep.dataforge.io.ColumnedDataWriter; -import hep.dataforge.meta.Meta; -import hep.dataforge.meta.MetaBuilder; -import hep.dataforge.plots.XYPlotFrame; -import hep.dataforge.plots.data.PlotDataUtils; -import hep.dataforge.plots.data.PlottableData; -import hep.dataforge.plots.data.PlottableGroup; -import hep.dataforge.plots.data.TimePlottable; -import hep.dataforge.plots.fx.FXPlotFrame; -import hep.dataforge.plots.fx.PlotContainer; -import hep.dataforge.plots.jfreechart.JFreeChartFrame; -import hep.dataforge.storage.commons.JSONMetaWriter; -import hep.dataforge.tables.*; -import inr.numass.storage.NumassData; -import inr.numass.storage.NumassPoint; -import inr.numass.utils.TritiumUtils; -import javafx.application.Platform; -import javafx.beans.value.ChangeListener; -import javafx.beans.value.ObservableValue; -import javafx.collections.FXCollections; -import javafx.event.ActionEvent; -import javafx.fxml.FXML; -import javafx.fxml.FXMLLoader; -import javafx.fxml.Initializable; -import javafx.geometry.Insets; -import javafx.geometry.Orientation; -import javafx.scene.control.*; -import javafx.scene.layout.AnchorPane; -import javafx.stage.FileChooser; -import javafx.util.converter.NumberStringConverter; -import org.controlsfx.control.RangeSlider; -import org.controlsfx.validation.ValidationSupport; -import org.controlsfx.validation.Validator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.List; -import java.util.ResourceBundle; -import java.util.function.Predicate; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -/** - * FXML Controller class - * - * @author darksnake - */ -public class NumassLoaderViewComponent extends AnchorPane implements Initializable { - - private final Context context; - - Logger logger = LoggerFactory.getLogger(NumassLoaderViewComponent.class); - private NumassData data; - private PlotContainer detectorPlot; - private PlotContainer spectrumPlot; - private PlotContainer hvPlot; - private PlottableData spectrumData; - private List points; - private ChoiceBox detectorBinningSelector; - private CheckBox detectorNormalizeSwitch; - private Button detectorDataExportButton; - - @FXML - private AnchorPane detectorPlotPane; -// @FXML -// private CheckListView detectorPointListView; - @FXML - private Tab detectorTab; -// @FXML -// private Tab hvTab; -// @FXML -// private Tab spectrumTab; - @FXML - private TextArea infoTextBox; - @FXML - private AnchorPane spectrumPlotPane; -// @FXML -// private VBox spectrumOptionsPane; - @FXML - private TextField lowChannelField; - @FXML - private TextField upChannelField; - @FXML - private RangeSlider channelSlider; -// @FXML -// private Button spectrumExportButton; - @FXML - private TextField dTimeField; - @FXML - private AnchorPane hvPane; - - public NumassLoaderViewComponent(Context context) { - this.context = context; - FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/NumassLoaderView.fxml")); - - loader.setRoot(this); - loader.setController(this); - - try { - loader.load(); - } catch (IOException ex) { - throw new RuntimeException(ex); - } - } - - /** - * Initializes the controller class. - * - * @param url - * @param rb - */ - @Override - public void initialize(URL url, ResourceBundle rb) { - //setup detector pane plot and sidebar - Label l = new Label("Bin size:"); - l.setPadding(new Insets(5)); - detectorBinningSelector = new ChoiceBox<>(FXCollections.observableArrayList(1, 2, 5, 10, 20, 50)); - detectorBinningSelector.setMaxWidth(Double.MAX_VALUE); - detectorBinningSelector.getSelectionModel().select(4); - - detectorNormalizeSwitch = new CheckBox("Normailize"); - detectorNormalizeSwitch.setSelected(true); - detectorNormalizeSwitch.setPadding(new Insets(5)); - - detectorPlot = PlotContainer.anchorTo(detectorPlotPane); - detectorPlot.addToSideBar(0, l, detectorBinningSelector, detectorNormalizeSwitch, new Separator(Orientation.HORIZONTAL)); - - detectorDataExportButton = new Button("Export"); - detectorDataExportButton.setMaxWidth(Double.MAX_VALUE); - detectorDataExportButton.setOnAction(this::onExportButtonClick); - detectorPlot.addToSideBar(detectorDataExportButton); - - detectorPlot.setSideBarPosition(0.7); - //setup spectrum pane - spectrumPlot = PlotContainer.anchorTo(spectrumPlotPane); - - Meta spectrumPlotMeta = new MetaBuilder("plot") - .setValue("xAxis.axisTitle", "U") - .setValue("xAxis.axisUnits", "V") - .setValue("yAxis.axisTitle", "count rate") - .setValue("yAxis.axisUnits", "Hz") - .setValue("legend.show", false); - spectrumPlot.setPlot(new JFreeChartFrame(spectrumPlotMeta)); - - lowChannelField.textProperty().bindBidirectional(channelSlider.lowValueProperty(), new NumberStringConverter()); - upChannelField.textProperty().bindBidirectional(channelSlider.highValueProperty(), new NumberStringConverter()); - - channelSlider.setHighValue(1900d); - channelSlider.setLowValue(300d); - - ChangeListener rangeChangeListener = (ObservableValue observable, Number oldValue, Number newValue) -> { - setupSpectrumPane(points); - }; - - dTimeField.textProperty().addListener((ObservableValue observable, String oldValue, String newValue) -> { - setupSpectrumPane(points); - }); - - channelSlider.lowValueProperty().addListener(rangeChangeListener); - channelSlider.highValueProperty().addListener(rangeChangeListener); - - ValidationSupport validationSupport = new ValidationSupport(); - Predicate isNumber = (String t) -> { - try { - Double.parseDouble(t); - return true; - } catch (NumberFormatException | NullPointerException ex) { - return false; - } - }; - - validationSupport.registerValidator(dTimeField, Validator.createPredicateValidator(isNumber, "Must be number")); - - //setup HV plot - hvPlot = PlotContainer.anchorTo(hvPane); - Meta hvPlotMeta = new MetaBuilder("plot") - .setValue("xAxis.axisTitle", "time") - .setValue("xAxis.type", "time") - .setValue("yAxis.axisTitle", "HV"); - hvPlot.setPlot(new JFreeChartFrame(hvPlotMeta)); - } - - public NumassData getData() { - return data; - } - - private WorkManager getWorkManager(){ - return context.getFeature(WorkManager.class); - } - - public void loadData(NumassData data) { - this.data = data; - if (data != null) { - getWorkManager().>startWork("viewer.numass.load", (Work callback) -> { - callback.setTitle("Load numass data (" + data.getName() + ")"); - points = data.getNMPoints(); - - Platform.runLater(() -> { - //setup detector data - setupDetectorPane(points); - //setup spectrum plot - setupSpectrumPane(points); - }); - }); - //setup hv plot - Supplier
    hvData = data.getHVData(); - if (hvData != null) { - setupHVPane(hvData); - } - setupInfo(data); - - } else { - logger.error("The data model is null"); - } - detectorTab.getTabPane().getSelectionModel().select(detectorTab); - } - - private void setupHVPane(Supplier
    hvData) { - getWorkManager().startWork("viewer.numass.hv", (Work callback) -> { - Table t = hvData.get(); - Platform.runLater(() -> { - if (t != null) { - hvPlot.getPlot().plottables().clear(); - PlottableGroup set = new PlottableGroup<>(); - for (DataPoint dp : t) { - String block = dp.getString("block", "default"); - if (!set.has(block)) { - set.add(new TimePlottable(block, block)); - } - set.get(block).put(dp.getValue("timestamp").timeValue(), dp.getValue("value")); - } - hvPlot.getPlot().addAll(set); - } - }); - }); - } - - /** - * setup detector pane - * - * @param points - */ - private void setupDetectorPane(List points) { - boolean normalize = detectorNormalizeSwitch.isSelected(); - int binning = detectorBinningSelector.getValue(); - updateDetectorPane(points, binning, normalize); - detectorBinningSelector.getSelectionModel().selectedItemProperty() - .addListener((ObservableValue observable, Integer oldValue, Integer newValue) -> { - boolean norm = detectorNormalizeSwitch.isSelected(); - updateDetectorPane(NumassLoaderViewComponent.this.points, newValue, norm); - }); - detectorNormalizeSwitch.selectedProperty().addListener((ObservableValue observable, Boolean oldValue, Boolean newValue) -> { - int bin = detectorBinningSelector.getValue(); - updateDetectorPane(NumassLoaderViewComponent.this.points, bin, newValue); - }); - detectorDataExportButton.setDisable(false); - } - - private void setupInfo(NumassData loader) { - Meta info = loader.meta(); - infoTextBox.setText(new JSONMetaWriter().writeString(info). - replace("\\r", "\r\t").replace("\\n", "\n\t")); - } - - private void setupSpectrumPane(List points) { - if (spectrumData == null) { - spectrumData = new PlottableData("spectrum"); - spectrumPlot.getPlot().add(spectrumData); - } - - int lowChannel = (int) channelSlider.getLowValue(); - int highChannel = (int) channelSlider.getHighValue(); - if (points == null || points.isEmpty()) { - spectrumData.clear(); - } else { - spectrumData.fillData(points.stream() - .map((NumassPoint point) -> getSpectrumPoint(point, lowChannel, highChannel, getDTime())) - .collect(Collectors.toList())); - } - } - - private double getDTime() { - try { - return Double.parseDouble(dTimeField.getText()) * 1e-6; - } catch (NumberFormatException ex) { - return 0; - } - } - - private DataPoint getSpectrumPoint(NumassPoint point, int lowChannel, int upChannel, double dTime) { - double u = point.getUread(); - return new MapPoint(new String[]{XYAdapter.X_VALUE_KEY, XYAdapter.Y_VALUE_KEY, XYAdapter.Y_ERROR_KEY}, u, - TritiumUtils.countRateWithDeadTime(point,lowChannel, upChannel, dTime), - TritiumUtils.countRateWithDeadTimeErr(point,lowChannel, upChannel, dTime)); - } - - /** - * update detector pane with new data - */ - private void updateDetectorPane(List points, int binning, boolean normalize) { - FXPlotFrame detectorPlotFrame; - if (detectorPlot.getPlot() == null) { - Meta frameMeta = new MetaBuilder("frame") - .setValue("title", "Detector response plot") - .setNode(new MetaBuilder("xAxis") - .setValue("axisTitle", "ADC") - .setValue("axisUnits", "channels") - .build()) - .setNode(new MetaBuilder("yAxis") - .setValue("axisTitle", "count rate") - .setValue("axisUnits", "Hz") - .build()) - .setNode(new MetaBuilder("legend") - .setValue("show", false)) - .build(); - detectorPlotFrame = new JFreeChartFrame(frameMeta); - } else { - detectorPlotFrame = detectorPlot.getPlot(); - detectorPlotFrame.clear(); - detectorPlot.removePlot(); - } - - getWorkManager().startWork("viewer.numass.load.detector", (Work callback) -> { - Meta plottableConfig = new MetaBuilder("plot") - .setValue("connectionType", "step") - .setValue("thickness", 2) - .setValue("showLine", true) - .setValue("showSymbol", false) - .setValue("showErrors", false) - .setValue("JFreeChart.cache", true) - .build(); - - callback.setMaxProgress(points.size()); - callback.setProgress(0); - for (NumassPoint point : points) { - String seriesName = String.format("%d: %.2f", points.indexOf(point), point.getVoltage()); - PlottableData datum = PlottableData.plot(seriesName, new XYAdapter("chanel", "count"), point.getData(binning, normalize)); - datum.configure(plottableConfig); - detectorPlotFrame.add(datum); - callback.increaseProgress(1d); - //TODO add update instead of replace action - } - detectorPlot.setPlot(detectorPlotFrame); - callback.setProgressToMax(); - }); - - } - - @FXML - private void onSpectrumExportClick(ActionEvent event) { - if (points != null && !points.isEmpty()) { - FileChooser fileChooser = new FileChooser(); - fileChooser.setTitle("Choose text export destination"); - fileChooser.setInitialFileName(data.getName() + "_spectrum.onComplete"); - File destination = fileChooser.showSaveDialog(spectrumPlotPane.getScene().getWindow()); - if (destination != null) { - String[] names = new String[]{"Uset", "Uread", "Length", "Total", "Window", "CR", "CRerr", "Timestamp"}; - int loChannel = (int) channelSlider.getLowValue(); - int upChannel = (int) channelSlider.getHighValue(); - double dTime = getDTime(); - ListTable.Builder spectrumDataSet = new ListTable.Builder(names); - - for (NumassPoint point : points) { - spectrumDataSet.row(new MapPoint(names, new Object[]{ - point.getVoltage(), - point.getUread(), - point.getLength(), - point.getTotalCount(), - point.getCountInWindow(loChannel, upChannel), - TritiumUtils.countRateWithDeadTime(point,loChannel, upChannel, dTime), - TritiumUtils.countRateWithDeadTimeErr(point,loChannel, upChannel, dTime), - point.getStartTime() - } - )); - } - - try { - String comment = String.format("Numass data viewer spectrum data export for %s%n" - + "Window: (%d, %d)%n" - + "Dead time per event: %g%n", - data.getName(), loChannel, upChannel, dTime); - - ColumnedDataWriter - .writeDataSet(destination, spectrumDataSet.build(), comment, false); - } catch (IOException ex) { - LoggerFactory.getLogger(getClass()).error("Destination file not found", ex); - } - } - } - } - - private void onExportButtonClick(ActionEvent event) { - FileChooser fileChooser = new FileChooser(); - fileChooser.setTitle("Choose text export destination"); - fileChooser.setInitialFileName(data.getName() + "_detector.out"); - File destination = fileChooser.showSaveDialog(detectorPlotPane.getScene().getWindow()); - if (destination != null) { - Table detectorData = PlotDataUtils.collectXYDataFromPlot((XYPlotFrame) detectorPlot.getPlot(), true); - try { - ColumnedDataWriter - .writeDataSet(destination, detectorData, "Numass data viewer detector data export for " + data.getName(), - false); - } catch (IOException ex) { - LoggerFactory.getLogger(getClass()).error("Destination file not found", ex); - } - } - - } - -} diff --git a/numass-viewer/src/main/java/inr/numass/viewer/TestDirectoryViewer.java b/numass-viewer/src/main/java/inr/numass/viewer/TestDirectoryViewer.java index 994393a2..9c4b1dda 100644 --- a/numass-viewer/src/main/java/inr/numass/viewer/TestDirectoryViewer.java +++ b/numass-viewer/src/main/java/inr/numass/viewer/TestDirectoryViewer.java @@ -15,7 +15,6 @@ */ package inr.numass.viewer; -import hep.dataforge.context.Global; import hep.dataforge.storage.commons.StorageManager; import inr.numass.storage.NumassDataLoader; import javafx.application.Application; @@ -38,7 +37,7 @@ public class TestDirectoryViewer extends Application { NumassDataLoader reader = NumassDataLoader.fromLocalDir(null, new File("C:\\Users\\darksnake\\Dropbox\\PlayGround\\data-test\\20150703143643_1\\")); // NumassLoader reader = NumassLoader.fromZip(null, new File("C:\\Users\\darksnake\\Dropbox\\PlayGround\\data-test\\20150703143643_1.zip")); - NumassLoaderViewComponent comp = new NumassLoaderViewComponent(Global.instance()); + NumassLoaderView comp = new NumassLoaderView(); comp.loadData(reader); // FXMLLoader fxml = new FXMLLoader(getClass().getResource("/fxml/DirectoryViewer.fxml")); // @@ -48,7 +47,7 @@ public class TestDirectoryViewer extends Application { // // controller.setModel(reader); - Scene scene = new Scene(comp, 800, 600); + Scene scene = new Scene(comp.getRoot(), 800, 600); primaryStage.setTitle("Detector Visualisation test"); primaryStage.setScene(scene); diff --git a/numass-viewer/src/main/java/inr/numass/viewer/Viewer.java b/numass-viewer/src/main/java/inr/numass/viewer/Viewer.java deleted file mode 100644 index 80b089c7..00000000 --- a/numass-viewer/src/main/java/inr/numass/viewer/Viewer.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2015 Alexander Nozik. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package inr.numass.viewer; - -import ch.qos.logback.classic.Level; -import ch.qos.logback.classic.Logger; -import hep.dataforge.exceptions.StorageException; -import hep.dataforge.storage.commons.StorageManager; -import javafx.application.Application; -import javafx.fxml.FXMLLoader; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.stage.Stage; -import org.slf4j.LoggerFactory; - -import java.io.IOException; - -/** - * @author Alexander Nozik - */ -public class Viewer extends Application { - - @Override - public void start(Stage primaryStage) throws StorageException, IOException { - ((Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)).setLevel(Level.INFO); - new StorageManager().startGlobal(); - - FXMLLoader fxml = new FXMLLoader(getClass().getResource("/fxml/MainView.fxml")); - - Parent parent = fxml.load(); - - Scene scene = new Scene(parent, 1024, 768); - - primaryStage.setTitle("Numass repository viewer"); - primaryStage.setScene(scene); - primaryStage.show(); - } - - @Override - public void stop() throws Exception { - super.stop(); -// System.exit(0); - } - -// public static void runTask(Task task) { -// Thread th = new Thread(task); -// th.setDaemon(true); -// th.start(); -// } - - /** - * @param args the command line arguments - */ - public static void main(String[] args) { - launch(args); - } - -} diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/MainView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/MainView.kt new file mode 100644 index 00000000..62fc377f --- /dev/null +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/MainView.kt @@ -0,0 +1,228 @@ +package inr.numass.viewer + +import hep.dataforge.context.Context +import hep.dataforge.context.Global +import hep.dataforge.exceptions.StorageException +import hep.dataforge.fx.fragments.FragmentWindow +import hep.dataforge.fx.fragments.LogFragment +import hep.dataforge.fx.work.Work +import hep.dataforge.fx.work.WorkManager +import hep.dataforge.fx.work.WorkManagerFragment +import hep.dataforge.meta.Annotated +import hep.dataforge.names.Named +import hep.dataforge.storage.api.Storage +import inr.numass.NumassProperties +import inr.numass.data.NumassData +import inr.numass.storage.NumassStorage +import javafx.application.Platform +import javafx.beans.property.SimpleObjectProperty +import javafx.geometry.Insets +import javafx.scene.control.* +import javafx.scene.input.MouseEvent +import javafx.scene.layout.AnchorPane +import javafx.scene.layout.BorderPane +import javafx.scene.layout.GridPane +import javafx.stage.DirectoryChooser +import javafx.util.Pair +import org.controlsfx.control.StatusBar +import tornadofx.* +import java.io.File +import java.util.logging.Level + +/** + * Created by darksnake on 14-Apr-17. + */ +class MainView : View() { + override val root: AnchorPane by fxml("/fxml/MainView.fxml"); + + private val numassLoaderView: NumassLoaderView by inject() + + private val consoleButton: ToggleButton by fxid() + private val processManagerButton: ToggleButton by fxid() + private val loadDirectoryButton: Button by fxid() + private val loadRemoteButton: Button by fxid() + private val storagePathLabel: Label by fxid() + + private val loaderPane: BorderPane by fxid() + private val treePane: BorderPane by fxid() + private val statusBar: StatusBar by fxid() + + private val storageProperty = SimpleObjectProperty(); + + init { + loadDirectoryButton.action { + val chooser = DirectoryChooser() + chooser.title = "Select numass storage root" + val storageRoot = NumassProperties.getNumassProperty("numass.storage.root") + if (storageRoot == null) { + chooser.initialDirectory = File(".").absoluteFile + } else { + chooser.initialDirectory = File(storageRoot) + } + + val rootDir = chooser.showDialog(primaryStage.scene.window) + + if (rootDir != null) { + NumassProperties.setNumassProperty("numass.storage.root", rootDir.absolutePath) + loadDirectory(rootDir.toURI().toString()) + } + } + loadRemoteButton.action { onLoadRemote() } + + treePane.center { + treetableview { + column("name", Item::getName) + column("time", Item::getTime) + + addEventHandler(MouseEvent.MOUSE_CLICKED) { e: MouseEvent -> + if (e.clickCount == 2) { + val value = focusModel.focusedCell.treeItem.value + if (value.content is NumassData) { + numassLoaderView.loadData(value.content) + loaderPane.center = numassLoaderView.root + } + } + } + + storageProperty.addListener { ob, old, value -> + if (value != null) { + Platform.runLater { + root = TreeItem(Item(value)); + + populate { parent -> + val value = parent.value.content; + if (value is Storage) { + //TODO add legacy loaders here? + value.shelves().map(::Item) + value.loaders().map(::Item) + } else { + null + } + } + } + } else { + // TODO clear + } + } + + } + } + + val logFragment = LogFragment() + logFragment.addRootLogHandler() + //logFragment.hookStd(); + FragmentWindow(logFragment).bindTo(consoleButton) + FragmentWindow(WorkManagerFragment(getWorkManager())).bindTo(processManagerButton) + } + + private fun loadDirectory(path: String) { + getWorkManager().startWork("viewer.loadDirectory") { work: Work -> + work.title = "Load storage ($path)" + work.progress = -1.0 + work.status = "Building numass storage tree..." + try { + val root = NumassStorage.buildNumassRoot(path, true, false) + setRootStorage(root) + Platform.runLater { storagePathLabel.text = "Storage: " + path } + } catch (ex: Exception) { + work.progress = 0.0 + work.status = "Failed to load storage " + path + log.log(Level.SEVERE, null, ex) + } + } + } + + private val context: Context + get() = Global.instance() + + @Synchronized private fun getWorkManager(): WorkManager { + return Global.instance().getFeature(WorkManager::class.java); + } + + fun setRootStorage(root: NumassStorage) { + + getWorkManager().cleanup() + getWorkManager().startWork("viewer.storage.load") { callback: Work -> + callback.title = "Fill data to UI (" + root.name + ")" + callback.progress = -1.0 + Platform.runLater { statusBar.progress = -1.0 } + + callback.status = "Loading numass storage tree..." + + try { + storageProperty.set(root) + } catch (ex: StorageException) { + log.log(Level.SEVERE, null, ex) + } + + // callback.setProgress(1, 1); + Platform.runLater { statusBar.progress = 0.0 } + callback.status = "Numass storage tree loaded." + callback.setProgressToMax() + } + } + + private fun onLoadRemote() { + // Create the custom dialog. + val dialog = Dialog>() + dialog.title = "Remote storage selection" + dialog.headerText = "Select remote storage login options and run" + + val loginButtonType = ButtonType("Load", ButtonBar.ButtonData.OK_DONE) + dialog.dialogPane.buttonTypes.addAll(loginButtonType, ButtonType.CANCEL) + + // Create the username and password labels and fields. + val grid = GridPane() + grid.hgap = 10.0 + grid.vgap = 10.0 + grid.padding = Insets(20.0, 150.0, 10.0, 10.0) + + val storageText = TextField() + storageText.prefWidth = 350.0 + storageText.text = "sftp://trdat:Anomaly@192.168.111.1" + val runText = TextField() + runText.promptText = "Run name" + + grid.add(Label("Storage path:"), 0, 0) + grid.add(storageText, 1, 0) + grid.add(Label("Run name:"), 0, 1) + grid.add(runText, 1, 1) + + dialog.dialogPane.content = grid + + // Request focus on the username field by default. + storageText.requestFocus() + + // Convert the result to a username-password-pair when the login button is clicked. + dialog.setResultConverter { dialogButton -> + if (dialogButton == loginButtonType) { + Pair(storageText.text, runText.text) + } else { + null; + } + } + + val result = dialog.showAndWait() + + if (result.isPresent) { + val path = result.get().key + "/data/" + result.get().value + loadDirectory(path) + } + } + + class Item(val content: Named) { + fun getName(): String { + return content.name; + } + + fun getTime(): String { + if (content is NumassData) { + return content.startTime().toString(); + } else if (content is Annotated) { + return content.meta().getString("file.timeModified", "") + } else { + return ""; + } + } + + } +} diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt new file mode 100644 index 00000000..c80d4b07 --- /dev/null +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/NumassLoaderView.kt @@ -0,0 +1,383 @@ +package inr.numass.viewer + +import hep.dataforge.context.Context +import hep.dataforge.context.Global +import hep.dataforge.fx.work.Work +import hep.dataforge.fx.work.WorkManager +import hep.dataforge.io.ColumnedDataWriter +import hep.dataforge.meta.MetaBuilder +import hep.dataforge.plots.XYPlotFrame +import hep.dataforge.plots.data.PlotDataUtils +import hep.dataforge.plots.data.PlottableData +import hep.dataforge.plots.data.PlottableGroup +import hep.dataforge.plots.data.TimePlottable +import hep.dataforge.plots.fx.FXPlotFrame +import hep.dataforge.plots.fx.PlotContainer +import hep.dataforge.plots.jfreechart.JFreeChartFrame +import hep.dataforge.storage.commons.JSONMetaWriter +import hep.dataforge.tables.* +import inr.numass.data.NumassData +import inr.numass.data.NumassDataUtils +import inr.numass.data.NumassPoint +import javafx.application.Platform +import javafx.beans.value.ObservableValue +import javafx.collections.FXCollections +import javafx.event.ActionEvent +import javafx.event.EventHandler +import javafx.fxml.FXMLLoader +import javafx.geometry.Insets +import javafx.geometry.Orientation +import javafx.scene.control.* +import javafx.scene.layout.AnchorPane +import javafx.stage.FileChooser +import javafx.util.converter.NumberStringConverter +import org.controlsfx.control.RangeSlider +import org.controlsfx.validation.ValidationSupport +import org.controlsfx.validation.Validator +import org.slf4j.LoggerFactory +import tornadofx.* +import java.io.IOException +import java.util.function.Supplier +import java.util.logging.Level +import java.util.stream.Collectors + +/** + * Numass loader view + * + * Created by darksnake on 14-Apr-17. + */ +class NumassLoaderView : View() { + override val root: AnchorPane by fxml("/fxml/NumassLoaderView.fxml") + lateinit var main: MainView + + var data: NumassData? = null + + private val detectorPlotPane: AnchorPane by fxid(); + private val tabPane: TabPane by fxid(); + private val infoTextBox: TextArea by fxid(); + private val spectrumPlotPane: AnchorPane by fxid(); + private val lowChannelField: TextField by fxid(); + private val upChannelField: TextField by fxid(); + private val channelSlider: RangeSlider by fxid(); + private val dTimeField: TextField by fxid(); + private val hvPane: AnchorPane by fxid(); + private val spectrumExportButton: Button by fxid(); + + private val detectorPlot: PlotContainer = PlotContainer.anchorTo(detectorPlotPane) + private val spectrumPlot: PlotContainer = PlotContainer.anchorTo(spectrumPlotPane) + private val hvPlot: PlotContainer = PlotContainer.anchorTo(hvPane) + // private var spectrumData: PlottableData? = null + private var points = FXCollections.observableArrayList() + private val detectorBinningSelector: ChoiceBox = ChoiceBox(FXCollections.observableArrayList(1, 2, 5, 10, 20, 50)) + private val detectorNormalizeSwitch: CheckBox = CheckBox("Normailize") + private val detectorDataExportButton: Button = Button("Export") + + init { + val loader = FXMLLoader(javaClass.getResource("/fxml/NumassLoaderView.fxml")) + + loader.setRoot(this) + loader.setController(this) + + try { + loader.load() + } catch (ex: IOException) { + throw RuntimeException(ex) + } + + } + + /** + * Initializes the controller class. + */ + init { + //setup detector pane plot and sidebar + val l = Label("Bin size:") + l.padding = Insets(5.0) + detectorBinningSelector.maxWidth = java.lang.Double.MAX_VALUE + detectorBinningSelector.selectionModel.clearAndSelect(4) + + detectorNormalizeSwitch.isSelected = true + detectorNormalizeSwitch.padding = Insets(5.0) + + detectorPlot.addToSideBar(0, l, detectorBinningSelector, detectorNormalizeSwitch, Separator(Orientation.HORIZONTAL)) + + detectorDataExportButton.maxWidth = java.lang.Double.MAX_VALUE + detectorDataExportButton.onAction = EventHandler { this.onExportButtonClick(it) } + detectorPlot.addToSideBar(detectorDataExportButton) + + detectorPlot.setSideBarPosition(0.7) + //setup spectrum pane + + spectrumExportButton.onAction = EventHandler { this::onSpectrumExportClick } + val spectrumPlotMeta = MetaBuilder("plot") + .setValue("xAxis.axisTitle", "U") + .setValue("xAxis.axisUnits", "V") + .setValue("yAxis.axisTitle", "count rate") + .setValue("yAxis.axisUnits", "Hz") + .setValue("legend.show", false) + spectrumPlot.plot = JFreeChartFrame(spectrumPlotMeta) + + lowChannelField.textProperty().bindBidirectional(channelSlider.lowValueProperty(), NumberStringConverter()) + upChannelField.textProperty().bindBidirectional(channelSlider.highValueProperty(), NumberStringConverter()) + + channelSlider.highValue = 1900.0 + channelSlider.lowValue = 300.0 + + val rangeChangeListener = { _: ObservableValue, _: Number, _: Number -> setupSpectrumPane(points) } + + dTimeField.textProperty().addListener { _: ObservableValue, _: String, _: String -> setupSpectrumPane(points) } + + channelSlider.lowValueProperty().addListener(rangeChangeListener) + channelSlider.highValueProperty().addListener(rangeChangeListener) + + val validationSupport = ValidationSupport() + val isNumber = { t: String -> + try { + java.lang.Double.parseDouble(t) + true + } catch (ex: Exception) { + false + } + } + + validationSupport.registerValidator(dTimeField, Validator.createPredicateValidator(isNumber, "Must be number")) + + //setup HV plot + val hvPlotMeta = MetaBuilder("plot") + .setValue("xAxis.axisTitle", "time") + .setValue("xAxis.type", "time") + .setValue("yAxis.axisTitle", "HV") + hvPlot.plot = JFreeChartFrame(hvPlotMeta) + + } + + fun getContext(): Context { + return Global.getDefaultContext(); + } + + fun getWorkManager(): WorkManager { + return getContext().getFeature(WorkManager::class.java); + } + + fun loadData(data: NumassData?) { + this.data = data + if (data != null) { + getWorkManager().startWork("viewer.numass.load") { work -> + work.title = "Load numass data (" + data.name + ")" + points.setAll(data.nmPoints) + + Platform.runLater { + //setup detector data + setupDetectorPane(points) + //setup spectrum plot + setupSpectrumPane(points) + } + } + + //setup hv plot + val hvData = data.hvData + if (hvData != null) { + setupHVPane(hvData) + } + setupInfo(data) + + } else { + log.severe("The data model is null") + } + tabPane.selectionModel.select(1) + } + + private fun setupHVPane(hvData: Supplier
    ) { + getWorkManager().startWork("viewer.numass.hv") { callback: Work -> + val t = hvData.get() + Platform.runLater { + hvPlot.plot.plottables().clear() + val set = PlottableGroup() + for (dp in t) { + val block = dp.getString("block", "default") + if (!set.has(block)) { + set.add(TimePlottable(block, block)) + } + set.get(block).put(dp.getValue("timestamp").timeValue(), dp.getValue("value")) + } + hvPlot.plot.addAll(set) + } + } + } + + /** + * setup detector pane + + * @param points + */ + private fun setupDetectorPane(points: List) { + val normalize = detectorNormalizeSwitch.isSelected + val binning = detectorBinningSelector.value + updateDetectorPane(points, binning, normalize) + detectorBinningSelector.selectionModel.selectedItemProperty() + .addListener { observable: ObservableValue, oldValue: Int, newValue: Int -> + val norm = detectorNormalizeSwitch.isSelected + updateDetectorPane(points, newValue, norm) + } + detectorNormalizeSwitch.selectedProperty().addListener { observable: ObservableValue, oldValue: Boolean, newValue: Boolean -> + val bin = detectorBinningSelector.value + updateDetectorPane(points, bin, newValue) + } + detectorDataExportButton.isDisable = false + } + + private fun setupInfo(loader: NumassData) { + val info = loader.meta() + infoTextBox.text = JSONMetaWriter().writeString(info).replace("\\r", "\r\t").replace("\\n", "\n\t") + } + + private fun setupSpectrumPane(points: List) { + val spectrumData = PlottableData("spectrum") + spectrumPlot.plot.add(spectrumData) + + val lowChannel = channelSlider.lowValue.toInt() + val highChannel = channelSlider.highValue.toInt() + + if (points.isEmpty()) { + spectrumData.clear() + } else { + spectrumData.fillData(points.stream() + .map { point: NumassPoint -> getSpectrumPoint(point, lowChannel, highChannel, dTime) } + .collect(Collectors.toList())) + } + } + + private val dTime: Double + get() { + try { + return java.lang.Double.parseDouble(dTimeField.text) * 1e-6 + } catch (ex: NumberFormatException) { + return 0.0 + } + + } + + private fun getSpectrumPoint(point: NumassPoint, lowChannel: Int, upChannel: Int, dTime: Double): DataPoint { + val u = point.voltage + return MapPoint(arrayOf(XYAdapter.X_VALUE_KEY, XYAdapter.Y_VALUE_KEY, XYAdapter.Y_ERROR_KEY), u, + NumassDataUtils.countRateWithDeadTime(point, lowChannel, upChannel, dTime), + NumassDataUtils.countRateWithDeadTimeErr(point, lowChannel, upChannel, dTime)) + } + + /** + * update detector pane with new data + */ + private fun updateDetectorPane(points: List, binning: Int, normalize: Boolean) { + val detectorPlotFrame: FXPlotFrame + if (detectorPlot.plot.config.isEmpty) { + val frameMeta = MetaBuilder("frame") + .setValue("title", "Detector response plot") + .setNode(MetaBuilder("xAxis") + .setValue("axisTitle", "ADC") + .setValue("axisUnits", "channels") + .build()) + .setNode(MetaBuilder("yAxis") + .setValue("axisTitle", "count rate") + .setValue("axisUnits", "Hz") + .build()) + .setNode(MetaBuilder("legend") + .setValue("show", false)) + .build() + detectorPlotFrame = JFreeChartFrame(frameMeta) + } else { + detectorPlotFrame = detectorPlot.plot + detectorPlotFrame.clear() + detectorPlot.removePlot() + } + + getWorkManager().startWork("viewer.numass.load.detector") { callback: Work -> + val plottableConfig = MetaBuilder("plot") + .setValue("connectionType", "step") + .setValue("thickness", 2) + .setValue("showLine", true) + .setValue("showSymbol", false) + .setValue("showErrors", false) + .setValue("JFreeChart.cache", true) + .build() + + callback.maxProgress = points.size.toDouble() + callback.progress = 0.0 + for (point in points) { + val seriesName = String.format("%d: %.2f", points.indexOf(point), point.voltage) + val datum = PlottableData.plot(seriesName, XYAdapter("chanel", "count"), point.getData(binning, normalize)) + datum.configure(plottableConfig) + detectorPlotFrame.add(datum) + callback.increaseProgress(1.0) + //TODO add update instead of replace action + } + detectorPlot.plot = detectorPlotFrame + callback.setProgressToMax() + } + + } + + private fun onSpectrumExportClick(event: ActionEvent) { + if (points.isNotEmpty()) { + val fileChooser = FileChooser() + fileChooser.title = "Choose text export destination" + fileChooser.initialFileName = data!!.name + "_spectrum.onComplete" + val destination = fileChooser.showSaveDialog(spectrumPlotPane.scene.window) + if (destination != null) { + val names = arrayOf("Uset", "Uread", "Length", "Total", "Window", "CR", "CRerr", "Timestamp") + val loChannel = channelSlider.lowValue.toInt() + val upChannel = channelSlider.highValue.toInt() + val dTime = dTime + val spectrumDataSet = ListTable.Builder(*names) + + for (point in points) { + spectrumDataSet.row( + point.voltage, + point.voltage, + point.length, + point.totalCount, + point.getCountInWindow(loChannel, upChannel), + NumassDataUtils.countRateWithDeadTime(point, loChannel, upChannel, dTime), + NumassDataUtils.countRateWithDeadTimeErr(point, loChannel, upChannel, dTime), + point.startTime + ) + } + + try { + val comment = String.format("Numass data viewer spectrum data export for %s%n" + + "Window: (%d, %d)%n" + + "Dead time per event: %g%n", + data!!.name, loChannel, upChannel, dTime) + + ColumnedDataWriter + .writeTable(destination, spectrumDataSet.build(), comment, false) + } catch (ex: IOException) { + log.log(Level.SEVERE, "Destination file not found", ex) + } + + } + } + } + + private fun onExportButtonClick(event: ActionEvent) { + val fileChooser = FileChooser() + fileChooser.title = "Choose text export destination" + fileChooser.initialFileName = data!!.name + "_detector.out" + val destination = fileChooser.showSaveDialog(detectorPlotPane.scene.window) + if (destination != null) { + val detectorData = PlotDataUtils.collectXYDataFromPlot(detectorPlot.plot as XYPlotFrame, true) + try { + ColumnedDataWriter.writeTable( + destination, + detectorData, + "Numass data viewer detector data export for " + data!!.name, + false + ) + } catch (ex: IOException) { + LoggerFactory.getLogger(javaClass).error("Destination file not found", ex) + } + + } + + } + +} diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/TreeBuilder.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/TreeBuilder.kt new file mode 100644 index 00000000..a29889df --- /dev/null +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/TreeBuilder.kt @@ -0,0 +1,120 @@ +/* + * Copyright 2015 Alexander Nozik. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package inr.numass.viewer + +/** + + * @author darksnake + */ +class TreeBuilder { +// @Throws(StorageException::class) +// fun build(callback: Work, +// numassLoaderDataTree: TreeTableView, +// rootStorage: NumassStorage, +// numassViewBuilder: (NumassData) -> Unit) { +// +// val root = buildNode(rootStorage, numassViewBuilder, callback) +// root.isExpanded = true +// +// Platform.runLater { +// numassLoaderDataTree.root = root +// +// val numassLoaderNameColumn = TreeTableColumn("name") +// +// numassLoaderNameColumn.setCellValueFactory { param: TreeTableColumn.CellDataFeatures -> SimpleStringProperty(param.value.value.name) } +// +// val numassLoaderTimeColumn = TreeTableColumn("time") +// numassLoaderTimeColumn.setCellValueFactory { param: TreeTableColumn.CellDataFeatures -> SimpleStringProperty(param.value.value.time) } +// +// val nummassLoaderDescriptionColumn = TreeTableColumn("description") +// nummassLoaderDescriptionColumn.setCellValueFactory { param: TreeTableColumn.CellDataFeatures -> SimpleStringProperty(param.value.value.description) } +// +// numassLoaderDataTree.columns.setAll(numassLoaderNameColumn, numassLoaderTimeColumn, nummassLoaderDescriptionColumn) +// +// numassLoaderNameColumn.sortType = TreeTableColumn.SortType.ASCENDING +// numassLoaderDataTree.sortOrder.addAll(numassLoaderTimeColumn, numassLoaderNameColumn) +// numassLoaderDataTree.addEventHandler(MouseEvent.MOUSE_CLICKED) { e: MouseEvent -> +// if (e.clickCount == 2) { +// val value = numassLoaderDataTree.focusModel.focusedCell.treeItem.value +// if (value.isLoader) { +// numassViewBuilder(value.loader) +// } +// } +// } +// numassLoaderTimeColumn.isVisible = false +// nummassLoaderDescriptionColumn.setVisible(false) +// } +// +// } +// +// @Throws(StorageException::class) +// private fun buildNode(storage: NumassStorage, numassViewBuilder: (NumassData) -> Unit, callback: Work): TreeItem { +// val node = TreeItem(NumassDataItem(storage)) +// node.children.setAll(buildChildren(storage, numassViewBuilder, callback)) +// return node +// } +// +// private val logger: Logger +// get() = LoggerFactory.getLogger(javaClass) +// +// @Throws(StorageException::class) +// private fun buildChildren(storage: NumassStorage, numassViewBuilder: (NumassData) -> Unit, callback: Work): List> { +// val list = ArrayList>() +// +// storage.shelves().stream().forEach { subStorage -> +// if (subStorage is NumassStorage) { +// try { +// val numassSubStorage = subStorage +// val childNode = buildNode(numassSubStorage, numassViewBuilder, callback) +// if (!childNode.isLeaf) { +// list.add(buildNode(numassSubStorage, numassViewBuilder, callback)) +// } +// } catch (ex: StorageException) { +// logger.error("Error while loading numass storage node", ex) +// } +// +// } +// } +// +// callback.status = "Building storage " + storage.name +// callback.progress = 0.0 +// callback.maxProgress = storage.loaders().size.toDouble() +// storage.loaders().stream() +// .forEach { loader -> +// if (loader is NumassData) { +// callback.status = "Building numass data loader " + loader.getName() +// val numassLoaderTreeItem = TreeItem(NumassDataItem(loader)) +// list.add(numassLoaderTreeItem) +// } +// callback.increaseProgress(1.0) +// } +// +// callback.status = "Loading legacy DAT files" +// callback.progress = 0.0 +// val legacyFiles = storage.legacyFiles() +// callback.maxProgress = legacyFiles.size.toDouble() +// //adding legacy data files +// for (legacyDat in legacyFiles) { +// callback.status = "Loading numass DAT file " + legacyDat.name +// val numassLoaderTreeItem = TreeItem(NumassDataItem(legacyDat)) +// callback.increaseProgress(1.0) +// list.add(numassLoaderTreeItem) +// } +// +// return list +// } +// +} diff --git a/numass-viewer/src/main/kotlin/inr/numass/viewer/Viewer.kt b/numass-viewer/src/main/kotlin/inr/numass/viewer/Viewer.kt new file mode 100644 index 00000000..1d230872 --- /dev/null +++ b/numass-viewer/src/main/kotlin/inr/numass/viewer/Viewer.kt @@ -0,0 +1,22 @@ +package inr.numass.viewer + +import ch.qos.logback.classic.Level +import ch.qos.logback.classic.Logger +import hep.dataforge.fx.work.WorkManager +import hep.dataforge.storage.commons.StorageManager +import javafx.stage.Stage +import org.slf4j.LoggerFactory +import tornadofx.* + +/** + * Created by darksnake on 14-Apr-17. + */ +class Viewer : App(MainView::class) { + + override fun start(stage: Stage) { + (LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME) as Logger).level = Level.INFO + StorageManager().startGlobal() + WorkManager().startGlobal() + super.start(stage) + } +} \ No newline at end of file diff --git a/numass-viewer/src/main/resources/fxml/MainView.fxml b/numass-viewer/src/main/resources/fxml/MainView.fxml index dbfe5af7..1878aa18 100644 --- a/numass-viewer/src/main/resources/fxml/MainView.fxml +++ b/numass-viewer/src/main/resources/fxml/MainView.fxml @@ -17,29 +17,18 @@ limitations under the License. --> - - - - - - - - - - - - + + - - + -