HIPO  4.3.0
High Performance Output data format for experimental physics
hipo Namespace Reference

Classes

class  structure
 Low-level data structure representing a HIPO structure. More...
 
class  composite
 
class  bank
 Represents a HIPO bank, a tabular data structure with rows and typed columns. More...
 
struct  FileInfo
 Metadata container for a file in the chain. More...
 
struct  ChainStatistics
 Thread-safe statistics for chain 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...
 
class  chain
 
class  datastream
 Abstract base class for data stream I/O. More...
 
class  datastreamLocalFile
 Data stream implementation for local file I/O using std::ifstream. More...
 
class  datastreamXrootd
 Data stream implementation for XRootD remote file access. More...
 
struct  schemaEntry_t
 Describes a single column (entry) within a schema. More...
 
class  schema
 Schema definition for a HIPO bank. More...
 
class  dictionary
 Collection of schema definitions, typically read from a HIPO file header. More...
 
class  event
 Represents a HIPO event, a container for multiple structures/banks. More...
 
class  inputSource
 Single HIPO file data source with named bank access. More...
 
class  fusion
 Multi-file HIPO data access manager using integer handles. More...
 
class  hipoeventfile
 HIPO file wrapper providing range-based iteration over events. More...
 
class  iter_event
 Lightweight event wrapper providing bank access by name. More...
 
class  file_error
 Exception thrown for HIPO file I/O errors (e.g., file not found, read failure). More...
 
class  schema_error
 Exception thrown for schema-related errors (e.g., missing schema, parse failure). More...
 
class  record_error
 Exception thrown for record-related errors (e.g., decompression failure). More...
 
class  jsonutil
 Simple JSON parsing and value extraction utility. More...
 
class  node
 Low-level node representing a tagged data element in a HIPO structure. More...
 
class  Parser
 Mathematical expression parser and evaluator. More...
 
struct  fileHeader_t
 HIPO file header structure (56 bytes / 14 words). More...
 
struct  recordInfo_t
 Metadata for a single record in a HIPO file. More...
 
class  readerIndex
 
class  reader
 Sequential reader for HIPO files. More...
 
class  readerstream
 Thread-safe reader for parallel event processing. More...
 
struct  recordHeader_t
 Header structure for a HIPO record. More...
 
class  data
 Lightweight wrapper for a raw data pointer with type, size, and offset metadata. More...
 
class  dataframe
 Container for multiple events packed into a single frame. More...
 
class  record
 Represents a single HIPO record containing multiple events. More...
 
class  recordbuilder
 Builds HIPO records by accumulating events and compressing them. More...
 
class  tuple
 N-tuple writer for storing columnar float data in HIPO files. More...
 
class  utils
 Utility functions for string manipulation, serialization, and HIPO file generation. More...
 
class  benchmark
 Simple timer for measuring code performance. More...
 
struct  hipoFileHeader_t
 HIPO file header structure used by the writer. More...
 
class  writer
 Writer for creating HIPO files. More...
 

Typedefs

using banklist = std::vector< bank >
 
using fileinfo = FileInfo
 
using chainstatistics = ChainStatistics
 
typedef struct hipo::schemaEntry_t schemaEntry_t
 Describes a single column (entry) within a schema. More...
 
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
 Header structure for a HIPO record. More...
 

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
}
 Supported column data types for HIPO banks. More...
 

Functions

banklist::size_type getBanklistIndex (banklist &banks, std::string const &bankName) noexcept(false)
 Find the index of a bank by name in a banklist. More...
 
const int getrandom (const int x)
 
const int roll (const int howmany, const int die)
 
const bool percent (const int prob)
 
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)
 

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_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
 

Detailed Description

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

Typedef Documentation

◆ banklist

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

Definition at line 948 of file bank.h.

◆ chainstatistics

Definition at line 133 of file chain.h.

◆ fileinfo

using hipo::fileinfo = typedef FileInfo

Definition at line 97 of file chain.h.

◆ json

using hipo::json = typedef nlohmann::json

Definition at line 48 of file jsonutil.h.

◆ OneArgFunction

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

Definition at line 245 of file parser.cpp.

◆ ThreeArgFunction

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

Definition at line 247 of file parser.cpp.

◆ TwoArgFunction

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

Definition at line 246 of file parser.cpp.

Enumeration Type Documentation

◆ compression_type

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

Definition at line 75 of file constants.h.

◆ header_type

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

Definition at line 64 of file constants.h.

◆ Type

enum hipo::Type

Supported column data types for HIPO banks.

Enumerator
kByte 

8-bit signed integer.

kShort 

16-bit signed integer.

kInt 

32-bit signed integer.

kFloat 

32-bit IEEE 754 floating point.

kDouble 

64-bit IEEE 754 floating point.

kLong 

64-bit signed integer.

Definition at line 51 of file dictionary.h.

Function Documentation

◆ DoFmod()

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

Definition at line 219 of file parser.cpp.

◆ DoIf()

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

Definition at line 237 of file parser.cpp.

◆ DoInt()

double hipo::DoInt ( double  arg)

Definition at line 191 of file parser.cpp.

◆ DoMax()

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

Definition at line 214 of file parser.cpp.

◆ DoMin()

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

Definition at line 209 of file parser.cpp.

◆ DoPercent()

double hipo::DoPercent ( double  arg)

Definition at line 201 of file parser.cpp.

◆ DoPow()

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

Definition at line 227 of file parser.cpp.

◆ DoRandom()

double hipo::DoRandom ( double  arg)

Definition at line 196 of file parser.cpp.

◆ DoRoll()

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

Definition at line 232 of file parser.cpp.

◆ getBanklistIndex()

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

Find the index of a bank by name in a banklist.

If there is more than one bank with the given name, only the index of the first such bank is returned. A runtime exception is thrown if the bank is not found.

Parameters
banksthe banklist to search
bankNamethe bank name
Returns
the index of the matching bank
Exceptions
std::runtime_errorif the bank is not found

Definition at line 559 of file bank.cpp.

◆ getrandom()

const int hipo::getrandom ( const int  x)

Definition at line 55 of file parser.cpp.

◆ percent()

const bool hipo::percent ( const int  prob)

Definition at line 81 of file parser.cpp.

◆ roll()

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

Definition at line 66 of file parser.cpp.

Variable Documentation

◆ BANK_STRUCTURE_SIZE

constexpr int hipo::BANK_STRUCTURE_SIZE = 8
inlineconstexpr

Definition at line 17 of file constants.h.

◆ BITINFO_HAS_DICTIONARY_BIT

constexpr int hipo::BITINFO_HAS_DICTIONARY_BIT = 8
inlineconstexpr

Definition at line 106 of file constants.h.

◆ BITINFO_HAS_FIRST_EVENT_BIT

constexpr int hipo::BITINFO_HAS_FIRST_EVENT_BIT = 9
inlineconstexpr

Definition at line 107 of file constants.h.

◆ BITINFO_HEADER_TYPE_SHIFT

constexpr int hipo::BITINFO_HEADER_TYPE_SHIFT = 28
inlineconstexpr

Definition at line 113 of file constants.h.

◆ BITINFO_PAD1_SHIFT

constexpr int hipo::BITINFO_PAD1_SHIFT = 20
inlineconstexpr

Definition at line 109 of file constants.h.

◆ BITINFO_PAD2_SHIFT

constexpr int hipo::BITINFO_PAD2_SHIFT = 22
inlineconstexpr

Definition at line 110 of file constants.h.

◆ BITINFO_PAD3_SHIFT

constexpr int hipo::BITINFO_PAD3_SHIFT = 24
inlineconstexpr

Definition at line 111 of file constants.h.

◆ BITINFO_PAD_MASK

constexpr uint32_t hipo::BITINFO_PAD_MASK = 0x3
inlineconstexpr

Definition at line 112 of file constants.h.

◆ BITINFO_TRAILER_WITH_INDEX_BIT

constexpr int hipo::BITINFO_TRAILER_WITH_INDEX_BIT = 10
inlineconstexpr

Definition at line 108 of file constants.h.

◆ BITINFO_VERSION_BITS

constexpr int hipo::BITINFO_VERSION_BITS = 8
inlineconstexpr

Definition at line 105 of file constants.h.

◆ BITINFO_VERSION_MASK

constexpr uint32_t hipo::BITINFO_VERSION_MASK = 0x000000FF
inlineconstexpr

Definition at line 104 of file constants.h.

◆ COMP_LENGTH_MASK

constexpr uint32_t hipo::COMP_LENGTH_MASK = 0x0FFFFFFF
inlineconstexpr

Definition at line 120 of file constants.h.

◆ COMP_TYPE_MASK

constexpr uint32_t hipo::COMP_TYPE_MASK = 0xF0000000
inlineconstexpr

Definition at line 118 of file constants.h.

◆ COMP_TYPE_SHIFT

constexpr int hipo::COMP_TYPE_SHIFT = 28
inlineconstexpr

Definition at line 119 of file constants.h.

◆ CONFIG_GROUP

constexpr int hipo::CONFIG_GROUP = 32555
inlineconstexpr

Definition at line 57 of file constants.h.

◆ CONFIG_KEY_ITEM

constexpr int hipo::CONFIG_KEY_ITEM = 1
inlineconstexpr

Definition at line 58 of file constants.h.

◆ CONFIG_STRING_ITEM

constexpr int hipo::CONFIG_STRING_ITEM = 2
inlineconstexpr

Definition at line 59 of file constants.h.

◆ DICT_GROUP

constexpr int hipo::DICT_GROUP = 120
inlineconstexpr

Definition at line 54 of file constants.h.

◆ DICT_ITEM

constexpr int hipo::DICT_ITEM = 2
inlineconstexpr

Definition at line 55 of file constants.h.

◆ DICT_JSON_ITEM

constexpr int hipo::DICT_JSON_ITEM = 1
inlineconstexpr

Definition at line 56 of file constants.h.

◆ EH_MAGIC_OFFSET

constexpr int hipo::EH_MAGIC_OFFSET = 0
inlineconstexpr

Definition at line 48 of file constants.h.

◆ EH_RESERVED_OFFSET

constexpr int hipo::EH_RESERVED_OFFSET = 12
inlineconstexpr

Definition at line 51 of file constants.h.

◆ EH_SIZE_OFFSET

constexpr int hipo::EH_SIZE_OFFSET = 4
inlineconstexpr

Definition at line 49 of file constants.h.

◆ EH_TAG_OFFSET

constexpr int hipo::EH_TAG_OFFSET = 8
inlineconstexpr

Definition at line 50 of file constants.h.

◆ EVENT_HEADER_SIZE

constexpr int hipo::EVENT_HEADER_SIZE = 16
inlineconstexpr

Definition at line 16 of file constants.h.

◆ FH_BIT_INFO_OFFSET

constexpr int hipo::FH_BIT_INFO_OFFSET = 20
inlineconstexpr

Definition at line 25 of file constants.h.

◆ FH_FILE_NUMBER_OFFSET

constexpr int hipo::FH_FILE_NUMBER_OFFSET = 4
inlineconstexpr

Definition at line 21 of file constants.h.

◆ FH_HEADER_LENGTH_OFFSET

constexpr int hipo::FH_HEADER_LENGTH_OFFSET = 8
inlineconstexpr

Definition at line 22 of file constants.h.

◆ FH_INDEX_ARRAY_LEN_OFFSET

constexpr int hipo::FH_INDEX_ARRAY_LEN_OFFSET = 16
inlineconstexpr

Definition at line 24 of file constants.h.

◆ FH_MAGIC_NUMBER_OFFSET

constexpr int hipo::FH_MAGIC_NUMBER_OFFSET = 28
inlineconstexpr

Definition at line 27 of file constants.h.

◆ FH_RECORD_COUNT_OFFSET

constexpr int hipo::FH_RECORD_COUNT_OFFSET = 12
inlineconstexpr

Definition at line 23 of file constants.h.

◆ FH_TRAILER_POS_OFFSET

constexpr int hipo::FH_TRAILER_POS_OFFSET = 40
inlineconstexpr

Definition at line 29 of file constants.h.

◆ FH_UNIQUE_WORD_OFFSET

constexpr int hipo::FH_UNIQUE_WORD_OFFSET = 0
inlineconstexpr

Definition at line 20 of file constants.h.

◆ FH_USER_HEADER_LEN_OFFSET

constexpr int hipo::FH_USER_HEADER_LEN_OFFSET = 24
inlineconstexpr

Definition at line 26 of file constants.h.

◆ FH_USER_INT1_OFFSET

constexpr int hipo::FH_USER_INT1_OFFSET = 48
inlineconstexpr

Definition at line 30 of file constants.h.

◆ FH_USER_INT2_OFFSET

constexpr int hipo::FH_USER_INT2_OFFSET = 52
inlineconstexpr

Definition at line 31 of file constants.h.

◆ FH_USER_REGISTER_OFFSET

constexpr int hipo::FH_USER_REGISTER_OFFSET = 32
inlineconstexpr

Definition at line 28 of file constants.h.

◆ FILE_HEADER_SIZE

constexpr int hipo::FILE_HEADER_SIZE = FILE_HEADER_WORDS * 4
inlineconstexpr

Definition at line 14 of file constants.h.

◆ FILE_HEADER_WORDS

constexpr int hipo::FILE_HEADER_WORDS = 14
inlineconstexpr

Definition at line 12 of file constants.h.

◆ FILE_INDEX_GROUP

constexpr int hipo::FILE_INDEX_GROUP = 32111
inlineconstexpr

Definition at line 60 of file constants.h.

◆ FILE_INDEX_ITEM

constexpr int hipo::FILE_INDEX_ITEM = 1
inlineconstexpr

Definition at line 61 of file constants.h.

◆ HEADER_MAGIC

constexpr uint32_t hipo::HEADER_MAGIC = 0xc0da0100
inlineconstexpr

Definition at line 8 of file constants.h.

◆ HEADER_MAGIC_BE

constexpr uint32_t hipo::HEADER_MAGIC_BE = 0x0001dac0
inlineconstexpr

Definition at line 9 of file constants.h.

◆ HIPO_FILE_UNIQUE_WORD

constexpr uint32_t hipo::HIPO_FILE_UNIQUE_WORD = 0x4F504948
inlineconstexpr

Definition at line 7 of file constants.h.

◆ HIPO_VERSION

constexpr int hipo::HIPO_VERSION = 6
inlineconstexpr

Definition at line 132 of file constants.h.

◆ RECORD_HEADER_SIZE

constexpr int hipo::RECORD_HEADER_SIZE = RECORD_HEADER_WORDS * 4
inlineconstexpr

Definition at line 15 of file constants.h.

◆ RECORD_HEADER_WORDS

constexpr int hipo::RECORD_HEADER_WORDS = 14
inlineconstexpr

Definition at line 13 of file constants.h.

◆ RH_BIT_INFO_OFFSET

constexpr int hipo::RH_BIT_INFO_OFFSET = 20
inlineconstexpr

Definition at line 39 of file constants.h.

◆ RH_COMP_WORD_OFFSET

constexpr int hipo::RH_COMP_WORD_OFFSET = 36
inlineconstexpr

Definition at line 43 of file constants.h.

◆ RH_DATA_LENGTH_OFFSET

constexpr int hipo::RH_DATA_LENGTH_OFFSET = 32
inlineconstexpr

Definition at line 42 of file constants.h.

◆ RH_EVENT_COUNT_OFFSET

constexpr int hipo::RH_EVENT_COUNT_OFFSET = 12
inlineconstexpr

Definition at line 37 of file constants.h.

◆ RH_HEADER_LENGTH_OFFSET

constexpr int hipo::RH_HEADER_LENGTH_OFFSET = 8
inlineconstexpr

Definition at line 36 of file constants.h.

◆ RH_INDEX_ARRAY_LEN_OFFSET

constexpr int hipo::RH_INDEX_ARRAY_LEN_OFFSET = 16
inlineconstexpr

Definition at line 38 of file constants.h.

◆ RH_MAGIC_NUMBER_OFFSET

constexpr int hipo::RH_MAGIC_NUMBER_OFFSET = 28
inlineconstexpr

Definition at line 41 of file constants.h.

◆ RH_RECORD_LENGTH_OFFSET

constexpr int hipo::RH_RECORD_LENGTH_OFFSET = 0
inlineconstexpr

Definition at line 34 of file constants.h.

◆ RH_RECORD_NUMBER_OFFSET

constexpr int hipo::RH_RECORD_NUMBER_OFFSET = 4
inlineconstexpr

Definition at line 35 of file constants.h.

◆ RH_USER_HEADER_LEN_OFFSET

constexpr int hipo::RH_USER_HEADER_LEN_OFFSET = 24
inlineconstexpr

Definition at line 40 of file constants.h.

◆ RH_USER_WORD1_OFFSET

constexpr int hipo::RH_USER_WORD1_OFFSET = 40
inlineconstexpr

Definition at line 44 of file constants.h.

◆ RH_USER_WORD2_OFFSET

constexpr int hipo::RH_USER_WORD2_OFFSET = 48
inlineconstexpr

Definition at line 45 of file constants.h.

◆ STRUCT_FORMAT_BYTE

constexpr uint32_t hipo::STRUCT_FORMAT_BYTE = 0x000000FF
inlineconstexpr

Definition at line 129 of file constants.h.

◆ STRUCT_FORMAT_MASK

constexpr uint32_t hipo::STRUCT_FORMAT_MASK = 0xFF000000
inlineconstexpr

Definition at line 127 of file constants.h.

◆ STRUCT_FORMAT_SHIFT

constexpr int hipo::STRUCT_FORMAT_SHIFT = 24
inlineconstexpr

Definition at line 128 of file constants.h.

◆ STRUCT_SIZE_MASK

constexpr uint32_t hipo::STRUCT_SIZE_MASK = 0x00FFFFFF
inlineconstexpr

Definition at line 126 of file constants.h.