HIPO4 C++ Library 4.4.1
Columnar I/O library for CLAS12 physics data
Loading...
Searching...
No Matches
hipo Namespace Reference

HIPO namespace is used for the classes that read/write files and records. More...

Classes

class  bank
 
class  benchmark
 
class  chain
 Chain multiple HIPO files for unified processing. More...
 
class  chain_event
 Event wrapper that provides bank access via dictionary. More...
 
class  ChainIterator
 Iterator for traversing events across all files in a chain. More...
 
struct  ChainStatistics
 Thread-safe statistics for chain processing. More...
 
class  composite
 
class  data
 
class  dataframe
 
class  datastream
 
class  datastreamLocalFile
 
class  datastreamXrootd
 
class  dictionary
 Collection of schema definitions, typically read from a HIPO file header. More...
 
class  event
 
class  file_error
 
struct  fileHeader_t
 
struct  FileInfo
 Metadata container for a file in the chain. More...
 
class  fusion
 
class  hipoeventfile
 
struct  hipoFileHeader_t
 
class  inputSource
 
class  iter_event
 
class  jsonutil
 
class  node
 
class  Parser
 
class  reader
 
class  readerIndex
 READER index class is used to construct entire events sequence from all records, and provides ability to canAdvance through events where record number is automatically calculated and triggers reading of the next record when events in the current record are exhausted. More...
 
class  readerstream
 
class  record
 
class  record_error
 
class  recordbuilder
 
struct  recordHeader_t
 
struct  recordInfo_t
 
class  schema
 Schema definition for a HIPO bank. More...
 
class  schema_error
 
struct  schemaEntry_t
 
class  structure
 
class  tuple
 
class  utils
 
class  writer
 READER index class is used to construct entire events sequence from all records, and provides ability to canAdvance through events where record number is automatically calculated and triggers reading of the next record when events in the current record are exhausted. More...
 

Typedefs

using banklist = std::vector< bank >
 
using fileinfo = FileInfo
 
using chainstatistics = ChainStatistics
 
typedef struct hipo::schemaEntry_t schemaEntry_t
 
using json = nlohmann::json
 
typedef double(* OneArgFunction) (double arg)
 
typedef const double(* TwoArgFunction) (const double arg1, const double arg2)
 
typedef const double(* ThreeArgFunction) (const double arg1, const double arg2, const double arg3)
 
typedef struct hipo::recordHeader_t recordHeader_t
 

Enumerations

enum class  header_type : uint8_t {
  evio_record = 0 , evio_file = 1 , evio_ext_file = 2 , hipo_record = 4 ,
  hipo_file = 5 , hipo_ext_file = 6 , hipo_trailer = 7
}
 
enum class  compression_type : uint8_t { none = 0 , lz4 = 1 , lz4_best = 2 , gzip = 3 }
 
enum  Type {
  kByte = 1 , kShort = 2 , kInt = 3 , kFloat = 4 ,
  kDouble = 5 , kLong = 8
}
 

Functions

banklist::size_type getBanklistIndex (banklist &banks, std::string const &bankName) noexcept(false)
 
const int getrandom (const int x)
 
const int roll (const int howmany, const int die)
 
const bool percent (const int prob)
 
static int initRandom ()
 
double DoInt (double arg)
 
double DoRandom (double arg)
 
double DoPercent (double arg)
 
const double DoMin (const double arg1, const double arg2)
 
const double DoMax (const double arg1, const double arg2)
 
const double DoFmod (const double arg1, const double arg2)
 
const double DoPow (const double arg1, const double arg2)
 
const double DoRoll (const double arg1, const double arg2)
 
const double DoIf (const double arg1, const double arg2, const double arg3)
 
static int LoadOneArgumentFunctions ()
 
static int LoadTwoArgumentFunctions ()
 
static int LoadThreeArgumentFunctions ()
 

Variables

constexpr uint32_t HIPO_FILE_UNIQUE_WORD = 0x4F504948
 
constexpr uint32_t HEADER_MAGIC = 0xc0da0100
 
constexpr uint32_t HEADER_MAGIC_BE = 0x0001dac0
 
constexpr int FILE_HEADER_WORDS = 14
 
constexpr int RECORD_HEADER_WORDS = 14
 
constexpr int FILE_HEADER_SIZE = FILE_HEADER_WORDS * 4
 
constexpr int RECORD_HEADER_SIZE = RECORD_HEADER_WORDS * 4
 
constexpr int EVENT_HEADER_SIZE = 16
 
constexpr int BANK_STRUCTURE_SIZE = 8
 
constexpr int FH_UNIQUE_WORD_OFFSET = 0
 
constexpr int FH_FILE_NUMBER_OFFSET = 4
 
constexpr int FH_HEADER_LENGTH_OFFSET = 8
 
constexpr int FH_RECORD_COUNT_OFFSET = 12
 
constexpr int FH_INDEX_ARRAY_LEN_OFFSET = 16
 
constexpr int FH_BIT_INFO_OFFSET = 20
 
constexpr int FH_USER_HEADER_LEN_OFFSET = 24
 
constexpr int FH_MAGIC_NUMBER_OFFSET = 28
 
constexpr int FH_USER_REGISTER_OFFSET = 32
 
constexpr int FH_TRAILER_POS_OFFSET = 40
 
constexpr int FH_USER_INT1_OFFSET = 48
 
constexpr int FH_USER_INT2_OFFSET = 52
 
constexpr int RH_RECORD_LENGTH_OFFSET = 0
 
constexpr int RH_RECORD_NUMBER_OFFSET = 4
 
constexpr int RH_HEADER_LENGTH_OFFSET = 8
 
constexpr int RH_EVENT_COUNT_OFFSET = 12
 
constexpr int RH_INDEX_ARRAY_LEN_OFFSET = 16
 
constexpr int RH_BIT_INFO_OFFSET = 20
 
constexpr int RH_USER_HEADER_LEN_OFFSET = 24
 
constexpr int RH_MAGIC_NUMBER_OFFSET = 28
 
constexpr int RH_DATA_LENGTH_OFFSET = 32
 
constexpr int RH_COMP_WORD_OFFSET = 36
 
constexpr int RH_USER_WORD1_OFFSET = 40
 
constexpr int RH_USER_WORD2_OFFSET = 48
 
constexpr int EH_MAGIC_OFFSET = 0
 
constexpr int EH_SIZE_OFFSET = 4
 
constexpr int EH_TAG_OFFSET = 8
 
constexpr int EH_RESERVED_OFFSET = 12
 
constexpr int DICT_GROUP = 120
 
constexpr int DICT_ITEM = 2
 
constexpr int DICT_JSON_ITEM = 1
 
constexpr int CONFIG_GROUP = 32555
 
constexpr int CONFIG_KEY_ITEM = 1
 
constexpr int CONFIG_STRING_ITEM = 2
 
constexpr int FILE_INDEX_GROUP = 32111
 
constexpr int FILE_INDEX_ITEM = 1
 
constexpr uint32_t BITINFO_VERSION_MASK = 0x000000FF
 
constexpr int BITINFO_VERSION_BITS = 8
 
constexpr int BITINFO_HAS_DICTIONARY_BIT = 8
 
constexpr int BITINFO_HAS_FIRST_EVENT_BIT = 9
 
constexpr int BITINFO_TRAILER_WITH_INDEX_BIT = 10
 
constexpr int BITINFO_PAD1_SHIFT = 20
 
constexpr int BITINFO_PAD2_SHIFT = 22
 
constexpr int BITINFO_PAD3_SHIFT = 24
 
constexpr uint32_t BITINFO_PAD_MASK = 0x3
 
constexpr int BITINFO_HEADER_TYPE_SHIFT = 28
 
constexpr uint32_t COMP_TYPE_MASK = 0xF0000000
 
constexpr int COMP_TYPE_SHIFT = 28
 
constexpr uint32_t COMP_TYPE_BYTE = 0x0000000F
 
constexpr uint32_t COMP_LENGTH_MASK = 0x0FFFFFFF
 
constexpr uint32_t STRUCT_SIZE_MASK = 0x00FFFFFF
 
constexpr uint32_t STRUCT_FORMAT_MASK = 0xFF000000
 
constexpr int STRUCT_FORMAT_SHIFT = 24
 
constexpr uint32_t STRUCT_FORMAT_BYTE = 0x000000FF
 
constexpr int HIPO_VERSION = 6
 
static int someNumber = initRandom ()
 
static std::map< std::string, OneArgFunctionOneArgumentFunctions
 
static std::map< std::string, TwoArgFunctionTwoArgumentFunctions
 
static std::map< std::string, ThreeArgFunctionThreeArgumentFunctions
 
static int doLoadOneArgumentFunctions = LoadOneArgumentFunctions ()
 
static int doLoadTwoArgumentFunctions = LoadTwoArgumentFunctions ()
 
static int doLoadThreeArgumentFunctions = LoadThreeArgumentFunctions ()
 

Detailed Description

HIPO namespace is used for the classes that read/write files and records.


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

Typedef Documentation

◆ banklist

using hipo::banklist = typedef std::vector<bank>

◆ fileinfo

using hipo::fileinfo = typedef FileInfo

◆ chainstatistics

◆ schemaEntry_t

◆ json

using hipo::json = typedef nlohmann::json

◆ OneArgFunction

typedef double(* hipo::OneArgFunction) (double arg)

◆ TwoArgFunction

typedef const double(* hipo::TwoArgFunction) (const double arg1, const double arg2)

◆ ThreeArgFunction

typedef const double(* hipo::ThreeArgFunction) (const double arg1, const double arg2, const double arg3)

◆ recordHeader_t

Enumeration Type Documentation

◆ header_type

enum class hipo::header_type : uint8_t
strong
Enumerator
evio_record 
evio_file 
evio_ext_file 
hipo_record 
hipo_file 
hipo_ext_file 
hipo_trailer 

◆ compression_type

enum class hipo::compression_type : uint8_t
strong
Enumerator
none 
lz4 
lz4_best 
gzip 

◆ Type

enum hipo::Type
Enumerator
kByte 
kShort 
kInt 
kFloat 
kDouble 
kLong 

Function Documentation

◆ getBanklistIndex()

banklist::size_type hipo::getBanklistIndex ( banklist banks,
std::string const &  bankName 
)

◆ getrandom()

const int hipo::getrandom ( const int  x)

◆ roll()

const int hipo::roll ( const int  howmany,
const int  die 
)

◆ percent()

const bool hipo::percent ( const int  prob)

◆ initRandom()

static int hipo::initRandom ( )
static

◆ DoInt()

double hipo::DoInt ( double  arg)

◆ DoRandom()

double hipo::DoRandom ( double  arg)

◆ DoPercent()

double hipo::DoPercent ( double  arg)

◆ DoMin()

const double hipo::DoMin ( const double  arg1,
const double  arg2 
)

◆ DoMax()

const double hipo::DoMax ( const double  arg1,
const double  arg2 
)

◆ DoFmod()

const double hipo::DoFmod ( const double  arg1,
const double  arg2 
)

◆ DoPow()

const double hipo::DoPow ( const double  arg1,
const double  arg2 
)

◆ DoRoll()

const double hipo::DoRoll ( const double  arg1,
const double  arg2 
)

◆ DoIf()

const double hipo::DoIf ( const double  arg1,
const double  arg2,
const double  arg3 
)

◆ LoadOneArgumentFunctions()

static int hipo::LoadOneArgumentFunctions ( )
static

◆ LoadTwoArgumentFunctions()

static int hipo::LoadTwoArgumentFunctions ( )
static

◆ LoadThreeArgumentFunctions()

static int hipo::LoadThreeArgumentFunctions ( )
static

Variable Documentation

◆ HIPO_FILE_UNIQUE_WORD

constexpr uint32_t hipo::HIPO_FILE_UNIQUE_WORD = 0x4F504948
inlineconstexpr

◆ HEADER_MAGIC

constexpr uint32_t hipo::HEADER_MAGIC = 0xc0da0100
inlineconstexpr

◆ HEADER_MAGIC_BE

constexpr uint32_t hipo::HEADER_MAGIC_BE = 0x0001dac0
inlineconstexpr

◆ FILE_HEADER_WORDS

constexpr int hipo::FILE_HEADER_WORDS = 14
inlineconstexpr

◆ RECORD_HEADER_WORDS

constexpr int hipo::RECORD_HEADER_WORDS = 14
inlineconstexpr

◆ FILE_HEADER_SIZE

constexpr int hipo::FILE_HEADER_SIZE = FILE_HEADER_WORDS * 4
inlineconstexpr

◆ RECORD_HEADER_SIZE

constexpr int hipo::RECORD_HEADER_SIZE = RECORD_HEADER_WORDS * 4
inlineconstexpr

◆ EVENT_HEADER_SIZE

constexpr int hipo::EVENT_HEADER_SIZE = 16
inlineconstexpr

◆ BANK_STRUCTURE_SIZE

constexpr int hipo::BANK_STRUCTURE_SIZE = 8
inlineconstexpr

◆ FH_UNIQUE_WORD_OFFSET

constexpr int hipo::FH_UNIQUE_WORD_OFFSET = 0
inlineconstexpr

◆ FH_FILE_NUMBER_OFFSET

constexpr int hipo::FH_FILE_NUMBER_OFFSET = 4
inlineconstexpr

◆ FH_HEADER_LENGTH_OFFSET

constexpr int hipo::FH_HEADER_LENGTH_OFFSET = 8
inlineconstexpr

◆ FH_RECORD_COUNT_OFFSET

constexpr int hipo::FH_RECORD_COUNT_OFFSET = 12
inlineconstexpr

◆ FH_INDEX_ARRAY_LEN_OFFSET

constexpr int hipo::FH_INDEX_ARRAY_LEN_OFFSET = 16
inlineconstexpr

◆ FH_BIT_INFO_OFFSET

constexpr int hipo::FH_BIT_INFO_OFFSET = 20
inlineconstexpr

◆ FH_USER_HEADER_LEN_OFFSET

constexpr int hipo::FH_USER_HEADER_LEN_OFFSET = 24
inlineconstexpr

◆ FH_MAGIC_NUMBER_OFFSET

constexpr int hipo::FH_MAGIC_NUMBER_OFFSET = 28
inlineconstexpr

◆ FH_USER_REGISTER_OFFSET

constexpr int hipo::FH_USER_REGISTER_OFFSET = 32
inlineconstexpr

◆ FH_TRAILER_POS_OFFSET

constexpr int hipo::FH_TRAILER_POS_OFFSET = 40
inlineconstexpr

◆ FH_USER_INT1_OFFSET

constexpr int hipo::FH_USER_INT1_OFFSET = 48
inlineconstexpr

◆ FH_USER_INT2_OFFSET

constexpr int hipo::FH_USER_INT2_OFFSET = 52
inlineconstexpr

◆ RH_RECORD_LENGTH_OFFSET

constexpr int hipo::RH_RECORD_LENGTH_OFFSET = 0
inlineconstexpr

◆ RH_RECORD_NUMBER_OFFSET

constexpr int hipo::RH_RECORD_NUMBER_OFFSET = 4
inlineconstexpr

◆ RH_HEADER_LENGTH_OFFSET

constexpr int hipo::RH_HEADER_LENGTH_OFFSET = 8
inlineconstexpr

◆ RH_EVENT_COUNT_OFFSET

constexpr int hipo::RH_EVENT_COUNT_OFFSET = 12
inlineconstexpr

◆ RH_INDEX_ARRAY_LEN_OFFSET

constexpr int hipo::RH_INDEX_ARRAY_LEN_OFFSET = 16
inlineconstexpr

◆ RH_BIT_INFO_OFFSET

constexpr int hipo::RH_BIT_INFO_OFFSET = 20
inlineconstexpr

◆ RH_USER_HEADER_LEN_OFFSET

constexpr int hipo::RH_USER_HEADER_LEN_OFFSET = 24
inlineconstexpr

◆ RH_MAGIC_NUMBER_OFFSET

constexpr int hipo::RH_MAGIC_NUMBER_OFFSET = 28
inlineconstexpr

◆ RH_DATA_LENGTH_OFFSET

constexpr int hipo::RH_DATA_LENGTH_OFFSET = 32
inlineconstexpr

◆ RH_COMP_WORD_OFFSET

constexpr int hipo::RH_COMP_WORD_OFFSET = 36
inlineconstexpr

◆ RH_USER_WORD1_OFFSET

constexpr int hipo::RH_USER_WORD1_OFFSET = 40
inlineconstexpr

◆ RH_USER_WORD2_OFFSET

constexpr int hipo::RH_USER_WORD2_OFFSET = 48
inlineconstexpr

◆ EH_MAGIC_OFFSET

constexpr int hipo::EH_MAGIC_OFFSET = 0
inlineconstexpr

◆ EH_SIZE_OFFSET

constexpr int hipo::EH_SIZE_OFFSET = 4
inlineconstexpr

◆ EH_TAG_OFFSET

constexpr int hipo::EH_TAG_OFFSET = 8
inlineconstexpr

◆ EH_RESERVED_OFFSET

constexpr int hipo::EH_RESERVED_OFFSET = 12
inlineconstexpr

◆ DICT_GROUP

constexpr int hipo::DICT_GROUP = 120
inlineconstexpr

◆ DICT_ITEM

constexpr int hipo::DICT_ITEM = 2
inlineconstexpr

◆ DICT_JSON_ITEM

constexpr int hipo::DICT_JSON_ITEM = 1
inlineconstexpr

◆ CONFIG_GROUP

constexpr int hipo::CONFIG_GROUP = 32555
inlineconstexpr

◆ CONFIG_KEY_ITEM

constexpr int hipo::CONFIG_KEY_ITEM = 1
inlineconstexpr

◆ CONFIG_STRING_ITEM

constexpr int hipo::CONFIG_STRING_ITEM = 2
inlineconstexpr

◆ FILE_INDEX_GROUP

constexpr int hipo::FILE_INDEX_GROUP = 32111
inlineconstexpr

◆ FILE_INDEX_ITEM

constexpr int hipo::FILE_INDEX_ITEM = 1
inlineconstexpr

◆ BITINFO_VERSION_MASK

constexpr uint32_t hipo::BITINFO_VERSION_MASK = 0x000000FF
inlineconstexpr

◆ BITINFO_VERSION_BITS

constexpr int hipo::BITINFO_VERSION_BITS = 8
inlineconstexpr

◆ BITINFO_HAS_DICTIONARY_BIT

constexpr int hipo::BITINFO_HAS_DICTIONARY_BIT = 8
inlineconstexpr

◆ BITINFO_HAS_FIRST_EVENT_BIT

constexpr int hipo::BITINFO_HAS_FIRST_EVENT_BIT = 9
inlineconstexpr

◆ BITINFO_TRAILER_WITH_INDEX_BIT

constexpr int hipo::BITINFO_TRAILER_WITH_INDEX_BIT = 10
inlineconstexpr

◆ BITINFO_PAD1_SHIFT

constexpr int hipo::BITINFO_PAD1_SHIFT = 20
inlineconstexpr

◆ BITINFO_PAD2_SHIFT

constexpr int hipo::BITINFO_PAD2_SHIFT = 22
inlineconstexpr

◆ BITINFO_PAD3_SHIFT

constexpr int hipo::BITINFO_PAD3_SHIFT = 24
inlineconstexpr

◆ BITINFO_PAD_MASK

constexpr uint32_t hipo::BITINFO_PAD_MASK = 0x3
inlineconstexpr

◆ BITINFO_HEADER_TYPE_SHIFT

constexpr int hipo::BITINFO_HEADER_TYPE_SHIFT = 28
inlineconstexpr

◆ COMP_TYPE_MASK

constexpr uint32_t hipo::COMP_TYPE_MASK = 0xF0000000
inlineconstexpr

◆ COMP_TYPE_SHIFT

constexpr int hipo::COMP_TYPE_SHIFT = 28
inlineconstexpr

◆ COMP_TYPE_BYTE

constexpr uint32_t hipo::COMP_TYPE_BYTE = 0x0000000F
inlineconstexpr

◆ COMP_LENGTH_MASK

constexpr uint32_t hipo::COMP_LENGTH_MASK = 0x0FFFFFFF
inlineconstexpr

◆ STRUCT_SIZE_MASK

constexpr uint32_t hipo::STRUCT_SIZE_MASK = 0x00FFFFFF
inlineconstexpr

◆ STRUCT_FORMAT_MASK

constexpr uint32_t hipo::STRUCT_FORMAT_MASK = 0xFF000000
inlineconstexpr

◆ STRUCT_FORMAT_SHIFT

constexpr int hipo::STRUCT_FORMAT_SHIFT = 24
inlineconstexpr

◆ STRUCT_FORMAT_BYTE

constexpr uint32_t hipo::STRUCT_FORMAT_BYTE = 0x000000FF
inlineconstexpr

◆ HIPO_VERSION

constexpr int hipo::HIPO_VERSION = 6
inlineconstexpr

◆ someNumber

int hipo::someNumber = initRandom ()
static

◆ OneArgumentFunctions

std::map<std::string, OneArgFunction> hipo::OneArgumentFunctions
static

◆ TwoArgumentFunctions

std::map<std::string, TwoArgFunction> hipo::TwoArgumentFunctions
static

◆ ThreeArgumentFunctions

std::map<std::string, ThreeArgFunction> hipo::ThreeArgumentFunctions
static

◆ doLoadOneArgumentFunctions

int hipo::doLoadOneArgumentFunctions = LoadOneArgumentFunctions ()
static

◆ doLoadTwoArgumentFunctions

int hipo::doLoadTwoArgumentFunctions = LoadTwoArgumentFunctions ()
static

◆ doLoadThreeArgumentFunctions

int hipo::doLoadThreeArgumentFunctions = LoadThreeArgumentFunctions ()
static