|
CORSIKA add-on package IACT/ATMO:
Version 1.70 (August 2025)
|
The IO_BUFFER structure contains all data needed the manage the stuff.
#include <io_basic.h>
Data Fields | |
| int | aux_count |
| May be used for dedicated buffers. | |
| unsigned char * | buffer |
| Pointer to allocated data space. | |
| long | buflen |
| Usable length of data space. | |
| int | byte_order |
| Set if block is not in internal byte order. | |
| BYTE * | data |
| Position for next get.../put... | |
| int | data_pending |
| Set to 1 when header is read but not the data. | |
| int | extended |
| Set to 1 if you want to use the extension field always. | |
| FILE * | input_file |
| For use of stream I/O for input. | |
| int | input_fileno |
| For use of read() function for input. | |
| int | is_allocated |
| Indicates if buffer is allocated by eventio. More... | |
| int | item_extension [MAX_IO_ITEM_LEVEL] |
| Where the extension field was used. | |
| long | item_length [MAX_IO_ITEM_LEVEL] |
| Length of each level of items. | |
| int | item_level |
| Current level of nesting of items. | |
| long | item_start_offset [MAX_IO_ITEM_LEVEL] |
| Where the item starts in buffer. | |
| long | max_length |
| The maximum length for extending the buffer. | |
| long | min_length |
| The initial and minimum length of the buffer. | |
| int | msg_ext |
| 1 if buffer extension should be reported, 0 if not | |
| FILE * | output_file |
| For use of stream I/O for output. | |
| int | output_fileno |
| For use of write() function for output. | |
| long | r_remaining |
| int | regular |
| 1 if a regular file, 0 not known, -1 not regular | |
| long | sub_item_length [MAX_IO_ITEM_LEVEL] |
| Length of its sub-items. | |
| int | sync_err_count |
| Count of synchronization errors. | |
| int | sync_err_max |
| Maximum accepted number of synchronisation errors. | |
| long | total_input |
| Sum of bytes read by read_io_block calls. | |
| long | total_output |
| Sum of bytes written by write_io_block calls. | |
| int(* | user_function )(unsigned char *, long, int) |
| For use of special type of I/O. | |
| long | w_remaining |
| Byte available for reading/writing. | |
| int _struct_IO_BUFFER::is_allocated |
It is 1 if buffer is allocated by eventio, 0 if buffer provided by user function (in which case the user should call allocate_io_buffer with the appropriate size; then the buffer always allocated in allocate_io_buffer() must be freed by the user function, replaced by its external buffer, and finally is_allocated set to 0).