#############################3 # Java #############################3 The current Java evio package, org.jlab.coda.jevio, was originally written by Dr. Dave Heddle of CNU and was graciously given to the JLAB DAQ group for maintenance and continued development. A large amount of additional work has been done since that time. As previously mentioned, evio now uses a new format developed from the merging of evio version 4 and the HIPO library. The code will compile using Java version 8 or later. The jar files necessary to compile an evio jar file are in the java/jars directory. They are compiled with Java 8. In addition, there are 2 subdirectories: 1) java8, which contains all such jars compiled with Java 8, and 2) java15 which contains all jars compiled with Java 15. If a jar file is not available in Java 15 use the Java 8 version. A pre-compiled jevio-6.0.jar file is found in each of these subdirectories. Using these allows the user to skip over all the following compilation instructions. ----- Prerequisites ----- Evio depends upon the LMAX-Exchange/disruptor software package available from github whose fork is at: https://github.com/JeffersonLab/disruptor In terms of functionality, it is an ingenious, ultrafast ring buffer which was initially developed for use the in the commodities exchange markets. It’s extremely useful when splitting work among multiple threads and then recombining it. Although there are many branches in this git repository, only 2 branches have had the necessary changes to be compatible with CODA. These are the master and v3.4 branches. The v3.4 branch should be compiled with Java 8 (it does not compile with Java 15) while the master requires at least Java 11. The disruptor software is provided in the java/jars/disruptor-3.4.3.jar file, compiled with Java 8. However, to generate this file yourself, get the disruptor software package by simply doing the following: 1) git clone https://github.com/JeffersonLab/disruptor.git 2) cd disruptor 3) git checkout v3.4 4) ./gradlew The resulting disruptor jar file, disruptor-3.4.3.jar, will be found in the disruptor package’s build/libs subdirectory. One can also use the master branch which needs to be compiled with Java version 11 or greater and produces disruptor-4.0.0.jar. Currently this has been created with java15 and is in the java/jars/java15 directory. Here is how to generate it: 1) git clone https://github.com/JeffersonLab/disruptor.git 2) cd disruptor 3) ./gradlew The resulting jar will be in build/libs as before. A jar file used in lz4 data compression, lz4-java-1.8.0.jar is accessible in the java/jars directory (compiled with Java 8). Although this is available in various versions and locations on the web, one can generate this from its source which is the lz4/lz4-java repository on github: 1) git clone https://github.com/lz4/lz4-java.git 2) cd lz4-java 3) ant ivy-bootstrap 4) ant submodule init 5) ant submodule update 6) ant Generated jar files will be in dist subdirectory. Another jar file, AHACompressionAPI.jar, also in the the java/jars directory, is for use in Compressor.java when using the AHA374 FPGA data compression board for gzip compression in hardware. This is an effort that never took off since LZ4 compresssion was so much more efficient. Thus, it may be safely ignored or removed. ----- Building ----- All code is contained in the github repository, https://github.com/JeffersonLab/evio.git The evio-6.0 branch contains the most recent version of evio. Documentation is contained in the repository under the "doc" directory but may also be accessed at: https://coda.jlab.org/drupal/content/event-io-evio/ The java evio uses ant to compile. To get a listing of all the options available to the ant command, run ant help in the evio top level directory to get this output: help: [echo] Usage: ant [ant options] [target2 | target3 | ...] [echo] targets: [echo] help - print out usage [echo] env - print out build file variables' values [echo] compile - compile java files [echo] clean - remove class files [echo] cleanall - remove all generated files [echo] jar - compile and create jar file [echo] install - create jar file and install into 'prefix' [echo] if given on command line by -Dprefix=dir', [echo] else install into CODA if defined [echo] uninstall - remove jar file previously installed into 'prefix' [echo] if given on command line by -Dprefix=dir', [echo] else installed into CODA if defined [echo] all - clean, compile and create jar file [echo] javadoc - create javadoc documentation [echo] developdoc - create javadoc documentation for developer [echo] undoc - remove all javadoc documentation [echo] prepare - create necessary directories Although this is fairly self-explanatory, executing ant is the same as ant compile. That will compile all the java. All compiled code is placed in the generated ./build directory. If the user wants a jar file, execute ant jar to place the resulting file in the ./build/lib directory. The java command in the user’s path will be the one used to do the compilation.