HIPO  4.3.0
High Performance Output data format for experimental physics
writer.h File Reference

HIPO file writer for creating HIPO output files. More...

#include <iostream>
#include <vector>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <memory>
#include <climits>
#include "recordbuilder.h"
#include "reader.h"

Go to the source code of this file.

Classes

struct  hipo::hipoFileHeader_t
 HIPO file header structure used by the writer. More...
 
class  hipo::writer
 Writer for creating HIPO files. More...
 

Namespaces

 hipo
 

Detailed Description

HIPO file writer for creating HIPO output files.


FILE HEADER STRUCTURE ( 56 bytes, 14 integers (32 bit) )

   +----------------------------------+
 1 |              ID                  | // HIPO: 0x43455248, Evio: 0x4556494F
   +----------------------------------+
 2 +          File Number             | // split file #
   +----------------------------------+
 3 +         Header Length            | // 14 (words)
   +----------------------------------+
 4 +      Record (Index) Count        |
   +----------------------------------+
 5 +      Index Array Length          | // bytes
   +-----------------------+----------+
 6 +       Bit Info        | Version  | // version (8 bits)
   +-----------------------+----------+
 7 +      User Header Length          | // bytes
   +----------------------------------+
 8 +          Magic Number            | // 0xc0da0100
   +----------------------------------+
 9 +          User Register           |
   +--                              --+
10 +                                  |
   +----------------------------------+
11 +         Trailer Position         | // File offset to trailer head (64 bits).
   +--                              --+ // 0 = no offset available or no trailer exists.
12 +                                  |
   +----------------------------------+
13 +          User Integer 1          |
   +----------------------------------+
14 +          User Integer 2          |
   +----------------------------------+

-------------------
  Bit Info Word
-------------------
    0-7  = version
    8    = true if dictionary is included (relevant for first record only)
    9    = true if this file has "first" event (in every split file)
   10    = File trailer with index array exists
   11-19 = reserved
   20-21 = pad 1
   22-23 = pad 2
   24-25 = pad 3 (always 0)
   26-27 = reserved
   28-31 = general header type: 1 = Evio file
                                2 = Evio extended file
                                5 = HIPO file
                                6 = HIPO extended file

Version
6.0
Since
6.0 9/6/17

Provides hipo::writer class for accumulating events into records and writing them to HIPO files with compression and metadata headers.

Definition in file writer.h.