From 3b939e4143832b78534afe35fe7fcfe5fcd1f793 Mon Sep 17 00:00:00 2001 From: carltimmer Date: Wed, 18 Dec 2024 10:24:01 -0500 Subject: [PATCH] update --- java/org/jlab/coda/jevio/test/README.md | 67 +++++++++++++------------ src/test/README.md | 2 +- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/java/org/jlab/coda/jevio/test/README.md b/java/org/jlab/coda/jevio/test/README.md index 69bb31b9..1e494db9 100644 --- a/java/org/jlab/coda/jevio/test/README.md +++ b/java/org/jlab/coda/jevio/test/README.md @@ -10,37 +10,38 @@ for evio version 4 and may not translate well if assumptions about the format are built in. --------------------------- -| File | Function | -|------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [BigFileWrite.java](BigFileWrite.java) | Write 2GB file in 15kB chunks with either RandomAccessFile, FileOutputStream (channels), or evio data with EventWriter and print out data rates. | -| [BufferTest.java](BufferTest.java) | Contains buffers with evio 4 data with wrong block info for testing purposes. Write events to buf with EventWriter forcing 2 block headers and read with EvioReader. Write events, reseting writer's buf between writes, then read. Method to help test for padding error with single byte data types (fixed). | -| [CompactBuilderTest.java](CompactBuilderTest.java) | Create EvioEvent using EventBuilder, write to buf, the write buf to file using FileChannel. Or create events with CompactEventBuilder in timed loop. Method to read file and search for events with tag/num. Method to clear buf, write EvioNode into buf and write to file with CompactEventBuilder. | -| [CompactReaderAddSubtractTest.java](CompactReaderAddSubtractTest.java) | Create event buf, parse w/ EvioCompactReader, print out tree using EvioNodes, and use reader to add bank (as ByteBuffer) to buf. Or write events to buf and remove one, check EvioNode objects for status change. | -| [CompactReaderBugTest.java](CompactReaderBugTest.java) | Write file with FileChannel from hand-set evio 4 int data, turn into byte data, read with EvioCompactReader, get and print data. Or explore ByteBuffer capabilities. | -| [CompactReaderTest.java](CompactReaderTest.java) | Methods to create events and evio data in various forms. Method to change data endian and compare. Methods to write events to buf or file in various ways with EventWriter and EventCompactWriter. Methods to read using EvioCompactReader including with EvioCompactStructureHandler. Compare searching with EventReader & StructureFinder versus EvioCompactReader. | -| [CompactStructureHandlerTest.java](CompactStructureHandlerTest.java) | This class mirrors EvioCompStructHandlerTest.cpp. Create evio event buffer, put into EvioCompactStructureHandler, remove node, and examine resulting buffer. | -| [CompositeDebugger.java](CompositeDebugger.java) | Find CompositeData banks in file, print out data even if error in format. | -| [CompositeTester.java](CompositeTester.java) | Create buf with CompositeData by hand, check double swapped with original. Or using strings with CompositeData. Or using CompositeData.Data class to create EvioEvent, write to file, read back. Or print out XML form of each event in file. Method to print CompositeData object. | -| [CompressionTest.java](CompressionTest.java) | Comments on different compression formats gathered from various sources. Many methods to compress & decompress data with zlib/gzip in different ways. Write compressed files and decompress while reading. All studies used to help in implementing compression handling. **NOT** useful for users. | -| [CompressionTest2.java](CompressionTest2.java) | Compress data with LZ4, uncompress, compare result to original data. | -| [DictionaryTest.java](DictionaryTest.java) | Write out dictionary with file and read back in. | -| [DictTest.java](DictTest.java) | Define different dictionaries. Methods to play with EvioXMLDictionary and EvioDictionaryEntry methods. Methods use dictionary with EvioEvent, EvioBank, and EvioSegment. | -| [DictTest2.java](DictTest.java) | Mirrors Dict_FirstEv_Test.cpp. Write evio data to file with EventWriter using the CompactEventBuilder and EventBuilder classes while inserting created dictionary and **first event**. Read files using EvioReader and print out. | -| [ExtractHallDdata.java](ExtractHallDdata.java) | Used only for HallD data compression test for ESNET. Take HallD data file, pull out data (not headers) and store in files to test for compressibility. | -| [FileTest.java](FileTest.java) | Methods to test how the AsynchronousFileChannel affect its ByteBuffer arg when reading and writing, find free space on disk, writing event too large for record space, read/write/append data in files, use listeners and filters, write file with extra words in headers. | -| [FileTestVer6.java](FileTestVer6.java) | Create event in buffer of CODA Prestart, Go, End, HallD triggered physics in structure (not data). Many methods to write and read evio v6 data files. | -| [FileWritingSpeedTest.java](FileWritingSpeedTest.java) | Test speed of writing evio file to disk. | -| [FileWriteTest.java](FileWriteTest.java) | This class mirrors FileWriteTest.cpp. Compare writing same events as ByteBuffers to file with EventWriterV4 (evio 4) and EventWriter (evio 6). | -| [FirstEventTest.java](FirstEventTest.java) | Write file or buf with dictionary and first event. Or write first event after EventWriter created. | -| [ReadAggOutput.java](ReadAggOutput.java) | Read and parse CODA data file produced in streaming mode with Aggregator. | -| [ReaderTest.java](ReaderTest.java) | Use a few files produced by SwapTest. Methods to read XML string and convert to EvioEvent, read evio file and create xml rep out of event and convert back to EvioEvent, get EvioNode with CompactEventReader and convert to XML, read with EvioReader and convert EvioEvent to XML. | -| [ReadSequenceTest.java](ReadSequenceTest.java) | Write file, read events back with EvioReader.parseNextEvent() with sequential API call. | -| [ReadWriteTest.java](ReadWriteTest.java) | Methods to read & write files and to create evio buffers and to use tree methods to create EvioBanks. Main method writes events to buffer or compressed events to buf & file. Also use Reader, EventReader,and CompactEvioReader on identical buffers see if data identical. | -| [ReadWriteV4Test.java](ReadWriteV4Test.java) | This class mirrored in C++. Writes evio v4 file with EventWriterV4 with set endian, first event and dictionary, reads back. Routine to write buffer. Reads back with EvioCompactReader and EvioReader with user defined listener and filter. | -| [SequentialReaderTest.java](SequentialReaderTest.java) | Test what happens when reading events from file and calling random access methods first followed by sequential methods. | -| [SplitTest.java](SplitTest.java) | Test automatic file naming routines or cause file splitting when writing data by setting small file max size so user can look at file names. | -| [StructureBufferDebugger.java](StructureBufferDebugger.java) | Read file, pick event #. For internal event structures containing int or long data with given tag & num, use EvioNode.getStructureBuffer(). Compare copy of data given by getStructureBuffer() to original data of EvioNode. Compare data in both array and ByteBuffer forms. | -| [SwapTest.java](SwapTest.java) | Create EvioEvent with all kinds of data, double swap event and time it. Or write file with such an event. Or write event to 1 file and its swapped version to another file. Or finally, take event written to buffer, double swap it and compare data with original. | +| File | Function | +|------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| [BigFileWrite.java](BigFileWrite.java) | Write 2GB file in 15kB chunks with either RandomAccessFile, FileOutputStream (channels), or evio data with EventWriter and print out data rates. | +| [BufferTest.java](BufferTest.java) | Contains buffers with evio 4 data with wrong block info for testing purposes. Write events to buf with EventWriter forcing 2 block headers and read with EvioReader. Write events, reseting writer's buf between writes, then read. Method to help test for padding error with single byte data types (fixed). | +| [CompactBuilderTest.java](CompactBuilderTest.java) | Create EvioEvent using EventBuilder, write to buf, the write buf to file using FileChannel. Or create events with CompactEventBuilder in timed loop. Method to read file and search for events with tag/num. Method to clear buf, write EvioNode into buf and write to file with CompactEventBuilder. | +| [CompactReaderAddSubtractTest.java](CompactReaderAddSubtractTest.java) | Create event buf, parse w/ EvioCompactReader, print out tree using EvioNodes, and use reader to add bank (as ByteBuffer) to buf. Or write events to buf and remove one, check EvioNode objects for status change. | +| [CompactReaderBugTest.java](CompactReaderBugTest.java) | Write file with FileChannel from hand-set evio 4 int data, turn into byte data, read with EvioCompactReader, get and print data. Or explore ByteBuffer capabilities. | +| [CompactReaderTest.java](CompactReaderTest.java) | Methods to create events and evio data in various forms. Method to change data endian and compare. Methods to write events to buf or file in various ways with EventWriter and EventCompactWriter. Methods to read using EvioCompactReader including with EvioCompactStructureHandler. Compare searching with EventReader & StructureFinder versus EvioCompactReader. | +| [CompactStructureHandlerTest.java](CompactStructureHandlerTest.java) | This class mirrors EvioCompStructHandlerTest.cpp. Create evio event buffer, put into EvioCompactStructureHandler, remove node, and examine resulting buffer. | +| [CompositeDebugger.java](CompositeDebugger.java) | Find CompositeData banks in file, print out data even if error in format. | +| [CompositeTester.java](CompositeTester.java) | Create buf with CompositeData by hand, check double swapped with original. Or using strings with CompositeData. Or using CompositeData.Data class to create EvioEvent, write to file, read back. Or print out XML form of each event in file. Method to print CompositeData object. | +| [CompressionTest.java](CompressionTest.java) | Comments on different compression formats gathered from various sources. Many methods to compress & decompress data with zlib/gzip in different ways. Write compressed files and decompress while reading. All studies used to help in implementing compression handling. **NOT** useful for users. | +| [CompressionTest2.java](CompressionTest2.java) | Compress data with LZ4, uncompress, compare result to original data. | +| [DictionaryTest.java](DictionaryTest.java) | Write out dictionary with file and read back in. | +| [DictTest.java](DictTest.java) | Define different dictionaries. Methods to play with EvioXMLDictionary and EvioDictionaryEntry methods. Methods use dictionary with EvioEvent, EvioBank, and EvioSegment. | +| [DictTest2.java](DictTest.java) | Mirrors Dict_FirstEv_Test.cpp. Write evio data to file with EventWriter using the CompactEventBuilder and EventBuilder classes while inserting created dictionary and **first event**. Read files using EvioReader and print out. | +| [ExtractHallDdata.java](ExtractHallDdata.java) | Used only for HallD data compression test for ESNET. Take HallD data file, pull out data (not headers) and store in files to test for compressibility. | +| [FileTest.java](FileTest.java) | Methods to test how the AsynchronousFileChannel affect its ByteBuffer arg when reading and writing, find free space on disk, writing event too large for record space, read/write/append data in files, use listeners and filters, write file with extra words in headers. | +| [FileTestVer6.java](FileTestVer6.java) | Create event in buffer of CODA Prestart, Go, End, HallD triggered physics in structure (not data). Many methods to write and read evio v6 data files. | +| [FileWritingSpeedTest.java](FileWritingSpeedTest.java) | Test speed of writing evio file to disk. | +| [FileWriteTest.java](FileWriteTest.java) | This class mirrors FileWriteTest.cpp. Compare writing same events as ByteBuffers to file with EventWriterV4 (evio 4) and EventWriter (evio 6). | +| [FirstEventTest.java](FirstEventTest.java) | Write file or buf with dictionary and first event. Or write first event after EventWriter created. | +| [HipoTest.cpp](HipoTest.java) | Mirrors Hipo_Test.cpp. Create events with CompactEventBuilder, write into hipo file with Writer or WriterMT and read back with Reader, printout. Also create events with createTreeEvent, write with EventWriter, read with EvioReader, printout. | +| [ReadAggOutput.java](ReadAggOutput.java) | Read and parse CODA data file produced in streaming mode with Aggregator. | +| [ReaderTest.java](ReaderTest.java) | Use a few files produced by SwapTest. Methods to read XML string and convert to EvioEvent, read evio file and create xml rep out of event and convert back to EvioEvent, get EvioNode with CompactEventReader and convert to XML, read with EvioReader and convert EvioEvent to XML. | +| [ReadSequenceTest.java](ReadSequenceTest.java) | Write file, read events back with EvioReader.parseNextEvent() with sequential API call. | +| [ReadWriteTest.java](ReadWriteTest.java) | Methods to read & write files and to create evio buffers and to use tree methods to create EvioBanks. Main method writes events to buffer or compressed events to buf & file. Also use Reader, EventReader,and CompactEvioReader on identical buffers see if data identical. | +| [ReadWriteV4Test.java](ReadWriteV4Test.java) | This class mirrored in C++. Writes evio v4 file with EventWriterV4 with set endian, first event and dictionary, reads back. Routine to write buffer. Reads back with EvioCompactReader and EvioReader with user defined listener and filter. | +| [SequentialReaderTest.java](SequentialReaderTest.java) | Test what happens when reading events from file and calling random access methods first followed by sequential methods. | +| [SplitTest.java](SplitTest.java) | Test automatic file naming routines or cause file splitting when writing data by setting small file max size so user can look at file names. | +| [StructureBufferDebugger.java](StructureBufferDebugger.java) | Read file, pick event #. For internal event structures containing int or long data with given tag & num, use EvioNode.getStructureBuffer(). Compare copy of data given by getStructureBuffer() to original data of EvioNode. Compare data in both array and ByteBuffer forms. | +| [SwapTest.java](SwapTest.java) | Create EvioEvent with all kinds of data, double swap event and time it. Or write file with such an event. Or write event to 1 file and its swapped version to another file. Or finally, take event written to buffer, double swap it and compare data with original. | | [Tester.java](Tester.java) | Lots of little routines/tests: printing ByteBuffers, parsing hex string, print long as hex, adding banks to banks, byte shifting, test EvioEvent.clone(), ByteBuffer handling of endianness, different ways of writing ByteBuffer of doubles/ints into another ByteBuffer, handling of shorts and padding, writing and reading of string data, find best way to convert byte array to int array. | -| [UnpackStringTest.java](UnpackStringTest.java) | Test method to unpack a byte array into string data. Also how a bank of strings is processed by the EvioReader when data len = 0 or len = 1. | -| [Writer_Reader_Test.java](Writer_Reader_Test.java) | UseCompactEventBuilder to create event, write into buffer with EventWriter and read out of buffer with EvioCompactReader. | +| [UnpackStringTest.java](UnpackStringTest.java) | Test method to unpack a byte array into string data. Also how a bank of strings is processed by the EvioReader when data len = 0 or len = 1. | +| [Writer_Reader_Test.java](Writer_Reader_Test.java) | UseCompactEventBuilder to create event, write into buffer with EventWriter and read out of buffer with EvioCompactReader. | diff --git a/src/test/README.md b/src/test/README.md index 1d6191e0..d268a353 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -13,7 +13,7 @@ | yes | [fileTest.cpp](fileTest.cpp) | Very short test to see if #include \ is available on this system. | | yes | [FileWriteTest.cpp](FileWriteTest.cpp) | Compare writing same events as ByteBuffers to file with EventWriterV4 (evio 4) and EventWriter (evio 6). | | yes | [hallDEventFiles.cpp](hallDEventFiles.cpp) | So Esnet can test data compressibility, take a hall D data file and write out each event into a separate file (no record structure). | -| yes | [Hipo_Test.cpp](Hipo_Test.cpp) | Create events with CompactEventBuilder, write into hipo file with Writer and read back with Reader, printout. | +| yes | [Hipo_Test.cpp](Hipo_Test.cpp) | Create events with CompactEventBuilder, write into hipo file with Writer or WriterMT and read back with Reader, printout. Also create events with createTreeEvent, write with EventWriter, read with EvioReader, printout. | | no | [IndexArrayLenTest.cpp](IndexArrayLenTest.cpp) | Write evio 6 data (zero-length index array) with fwrite, read back with Reader and print. Used to test the reading of uncompressed evio buffer and file to see if changes made to handle a zero-length index array actually worked. | | | no | [ReadTest.cpp](ReadTest.cpp) | Read hipo/evio file with Reader, print out # events and each event. | | no | [ReadWriteTest.cpp](ReadWriteTest.cpp) | One routine writes events as EvioNodes into buf with user header or write as compressed data and reads back with Reader, EvioCompactReader and EvioReader. Defined listeners for EvioReader. Other routine writes in given byte order and with entire record. Another routine does multithreaded writes with WriterMT using first event, user header, given endian.
Routines to read data. |