120 likes | 138 Views
Learn about EVIO basics, improvements, data types, EVIO to XML conversion, test results, and conclusions. Includes programs for easy conversion and handling of data.
E N D
EVIO and XML for Hall D Elliott Wolin Jefferson Lab 1-Nov-2001
Outline I. EVIO II. EVIOXML conversion III. Test Results IV. Conclusions
I. EVIO - Basics • Used by Halls A and C (“CODA” format) • Tree structure of banks or “fragments” • Fragments have 1 or 2 word header, arbitrary tag, single data type • Files contain fixed-length data blocks • Library exists for reading/writing events • Very low overhead binary I/O package
EVIO - Improvements • I created Version 2 of EVIO package for Hall D • Bug fixes in byte swapping routines • Extended to cover all 8-byte data types • Added 4-byte header “tagsegment” type (4096 tags, 16 types), will save 400 bytes/event • Extended data type table
EVIO - Data Types Version 2 0 unknown 1 unsigned 4-byte integer 2 IEEE 4-byte float 3 ascii string 4 signed 2-byte integer 5 unsigned 2-byte integer 6 signed 1-byte integer 7 unsigned 1-byte integer 8 IEEE 8-byte double 9 signed 8-byte integer A unsigned 8-byte integer B signed 4-byte integer C tagsegment D segment E bank F repeating structure 10 bank 20 segment 30-37 packet 40 tagsegment
II. EVIOXML conversion • Map EVIO fragment structure directly to XML • Topmost fragment is always a bank • EVIO structure information in XML tags,attribs • EVIO data in XML contents • Example XML file: http://www.jlab.org/Hall-D/software/evio2xml/one.xml
Programs • Convert EVIOXML using data dictionary • Event viewer, replaces cefdump (xcefdump?) • Handle gzipped input XML files • Copy/extract selected events • Can apply event and fragment matching criteria • evio2xml, xml2evio, eviocopy (solaris, linux)
XML event dump (example) <event format="evio" count="1" content="bank" data_type="0x10" tag="1" num="204"> <bank content="tagsegment" data_type="0x40" tag="2" num="1"> <uint32 data_type="0x1" tag="2748"> 0xffffffff 0xfffffffe 0xfffffffd 0xfffffffc 0xfffffffb 0xfffffffa 0xfffffff9 0xfffffff8 0xfffffff7 0xfffffff6 0xfffffff5 0xfffffff4 0xfffffff3 0xfffffff2 0xfffffff1 0xfffffff0 0xffffffef 0xffffffee 0xffffffed 0xffffffec 0xffffffeb 0xffffffea 0xffffffe9 0xffffffe8 0xffffffe7 0xffffffe6 0xffffffe5 0xffffffe4 0xffffffe3 0xffffffe2 </uint32>
XML event dump (example), con’t <int32 data_type="0xb" tag="1"> -1 -2 -3 -4 -5 -6 -7 -8 </int32> <float32 data_type="0x2" tag="2"> -1.000000 -2.000000 -3.000000 -4.000000 -5.000000 -6.000000 -7.000000 -8.000000 -9.000000 -10.000000 -11.000000 -12.000000 </float32> <string data_type="0x3" tag="6"> <![CDATA[ hello world ]]> </string>
Data Dictionary (example) <evioDict> <evioDictEntry name="hallc-epics" tag="132" data_type="0x1"/> <evioDictEntry name="hallc-params" tag="141" data_type="0x2"/> <evioDictEntry name="hallc-cal“ tag="4" data_type="0x3"/> <evioDictEntry name="hallc-tof“ tag="7" data_type="0x4"/> </evioDict>
IV. Conclusions • EVIO Version 2 is ready for use by Hall D (online, offline, simulation, etc.) • EVIO should be our only binary format • XML should be our only ascii format • Compressed XML can be as compact at binary • Utilities to convert EVIOXML available