HIPO  4.3.0
High Performance Output data format for experimental physics
hipo::fusion Class Reference

Multi-file HIPO data access manager using integer handles. More...

#include <fusion.h>

Public Member Functions

 fusion ()
 
 ~fusion ()
 
int open (const char *filename)
 Open a HIPO file and return its handle. More...
 
int open (const char *filename, int tag)
 Open a HIPO file with a tag filter and return its handle. More...
 
bool next (int handle)
 Advance to the next event in the given file. More...
 
void define (int fid, const char *bank)
 Register a bank for reading in the given file. More...
 
void describe (int fid, const char *bank)
 Print schema description for a bank in the given file. More...
 
std::string schema (int fid, const char *bank)
 
int getSize (int fid, const char *bank)
 
void getByteArray (int handle, const char *bank, int entry, int8_t *ptr, int length)
 Copy a byte column into an array from the file identified by handle. More...
 
void getShortArray (int handle, const char *bank, int entry, int16_t *ptr, int length)
 Copy a short column into an array from the file identified by handle. More...
 
void getIntArray (int handle, const char *bank, int entry, int32_t *ptr, int length)
 Copy an integer column into an array from the file identified by handle. More...
 
void getFloatArray (int handle, const char *bank, int entry, float *ptr, int length)
 Copy a float column into an array from the file identified by handle. More...
 
int getInt (int handle, const char *bank, const char *entry, int row)
 
int64_t getLong (int handle, const char *bank, const char *entry, int row)
 
float getFloat (int handle, const char *bank, const char *entry, int row)
 
double getDouble (int handle, const char *bank, const char *entry, int row)
 
int getType (int handle, const char *bank, const char *entry)
 
int64_t getEntries (int handle)
 
hipo::bankgetBank (int handle, const char *bank)
 

Detailed Description

Multi-file HIPO data access manager using integer handles.

Provides a C-friendly interface for opening multiple HIPO files, each identified by an integer handle. Banks can be defined and read across files using the handle.

Definition at line 114 of file fusion.h.

Constructor & Destructor Documentation

◆ fusion()

hipo::fusion::fusion ( )
inline

Definition at line 122 of file fusion.h.

◆ ~fusion()

hipo::fusion::~fusion ( )
inline

Definition at line 123 of file fusion.h.

Member Function Documentation

◆ define()

void hipo::fusion::define ( int  fid,
const char *  bank 
)

Register a bank for reading in the given file.

Definition at line 106 of file fusion.cpp.

◆ describe()

void hipo::fusion::describe ( int  fid,
const char *  bank 
)

Print schema description for a bank in the given file.

Definition at line 113 of file fusion.cpp.

◆ getBank()

hipo::bank& hipo::fusion::getBank ( int  handle,
const char *  bank 
)
inline
Returns
Reference to the bank object for the given name in the specified file.

Definition at line 177 of file fusion.h.

◆ getByteArray()

void hipo::fusion::getByteArray ( int  handle,
const char *  bank,
int  entry,
int8_t *  ptr,
int  length 
)
inline

Copy a byte column into an array from the file identified by handle.

Definition at line 147 of file fusion.h.

◆ getDouble()

double hipo::fusion::getDouble ( int  handle,
const char *  bank,
const char *  entry,
int  row 
)
Returns
Double value from the given bank, entry, and row in the specified file.

Definition at line 139 of file fusion.cpp.

◆ getEntries()

int64_t hipo::fusion::getEntries ( int  handle)
inline
Returns
Total number of events in the file identified by handle.

Definition at line 175 of file fusion.h.

◆ getFloat()

float hipo::fusion::getFloat ( int  handle,
const char *  bank,
const char *  entry,
int  row 
)
Returns
Float value from the given bank, entry, and row in the specified file.

Definition at line 133 of file fusion.cpp.

◆ getFloatArray()

void hipo::fusion::getFloatArray ( int  handle,
const char *  bank,
int  entry,
float *  ptr,
int  length 
)
inline

Copy a float column into an array from the file identified by handle.

Definition at line 159 of file fusion.h.

◆ getInt()

int hipo::fusion::getInt ( int  handle,
const char *  bank,
const char *  entry,
int  row 
)
Returns
Integer value from the given bank, entry, and row in the specified file.

Definition at line 125 of file fusion.cpp.

◆ getIntArray()

void hipo::fusion::getIntArray ( int  handle,
const char *  bank,
int  entry,
int32_t *  ptr,
int  length 
)
inline

Copy an integer column into an array from the file identified by handle.

Definition at line 155 of file fusion.h.

◆ getLong()

int64_t hipo::fusion::getLong ( int  handle,
const char *  bank,
const char *  entry,
int  row 
)
Returns
64-bit integer value from the given bank, entry, and row in the specified file.

Definition at line 129 of file fusion.cpp.

◆ getShortArray()

void hipo::fusion::getShortArray ( int  handle,
const char *  bank,
int  entry,
int16_t *  ptr,
int  length 
)
inline

Copy a short column into an array from the file identified by handle.

Definition at line 151 of file fusion.h.

◆ getSize()

int hipo::fusion::getSize ( int  fid,
const char *  bank 
)
Returns
Number of rows in the given bank for the current event.

Definition at line 117 of file fusion.cpp.

◆ getType()

int hipo::fusion::getType ( int  handle,
const char *  bank,
const char *  entry 
)
Returns
Type identifier for the given entry in the specified bank.

Definition at line 143 of file fusion.cpp.

◆ next()

bool hipo::fusion::next ( int  handle)

Advance to the next event in the given file.

Parameters
handleFile handle returned by open()

Definition at line 121 of file fusion.cpp.

◆ open() [1/2]

int hipo::fusion::open ( const char *  filename)

Open a HIPO file and return its handle.

Parameters
filenamePath to the HIPO file
Returns
Integer handle for subsequent operations

Definition at line 94 of file fusion.cpp.

◆ open() [2/2]

int hipo::fusion::open ( const char *  filename,
int  tag 
)

Open a HIPO file with a tag filter and return its handle.

Definition at line 100 of file fusion.cpp.

◆ schema()

std::string hipo::fusion::schema ( int  fid,
const char *  bank 
)
Returns
Schema string for a bank in the given file.

Definition at line 110 of file fusion.cpp.


The documentation for this class was generated from the following files: