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

Single HIPO file data source with named bank access. More...

#include <fusion.h>

Public Member Functions

 inputSource ()
 
 inputSource (const char *filename)
 Open a HIPO file as input source. More...
 
 inputSource (const char *filename, int tag)
 Open a HIPO file with a tag filter. More...
 
 ~inputSource ()
 
void open (const char *filename)
 Open a HIPO file and read its dictionary. More...
 
void open (const char *filename, int tag)
 Open a HIPO file with a tag filter. More...
 
void define (const char *bank)
 Register a bank name for reading from events. More...
 
void describe (const char *bank)
 Print the schema description for a bank. More...
 
bool next ()
 Advance to the next event and read all defined banks. More...
 
std::string schema (const char *bank)
 
hipo::bankget (const char *bank)
 
int getSize (const char *bank)
 
int getInt (const char *bank, const char *entry, int row)
 
int64_t getLong (const char *bank, const char *entry, int row)
 
float getFloat (const char *bank, const char *entry, int row)
 
double getDouble (const char *bank, const char *entry, int row)
 
void getByteArray (const char *bank, int entry, int8_t *ptr, int length)
 Copy a byte column into an array. More...
 
void getShortArray (const char *bank, int entry, int16_t *ptr, int length)
 Copy a short column into an array. More...
 
void getIntArray (const char *bank, int entry, int32_t *ptr, int length)
 Copy an integer column into an array. More...
 
void getFloatArray (const char *bank, int entry, float *ptr, int length)
 Copy a float column into an array. More...
 
int64_t getEntries ()
 

Detailed Description

Single HIPO file data source with named bank access.

Opens a HIPO file and provides methods to define, describe, and read banks by name. Used internally by the fusion class for multi-file management.

Definition at line 39 of file fusion.h.

Constructor & Destructor Documentation

◆ inputSource() [1/3]

hipo::inputSource::inputSource ( )
inline

Definition at line 50 of file fusion.h.

◆ inputSource() [2/3]

hipo::inputSource::inputSource ( const char *  filename)
inline

Open a HIPO file as input source.

Definition at line 52 of file fusion.h.

◆ inputSource() [3/3]

hipo::inputSource::inputSource ( const char *  filename,
int  tag 
)
inline

Open a HIPO file with a tag filter.

Definition at line 54 of file fusion.h.

◆ ~inputSource()

hipo::inputSource::~inputSource ( )
inline

Definition at line 55 of file fusion.h.

Member Function Documentation

◆ define()

void hipo::inputSource::define ( const char *  bank)

Register a bank name for reading from events.

Parameters
bankBank name (e.g., "REC::Particle")

Definition at line 32 of file fusion.cpp.

◆ describe()

void hipo::inputSource::describe ( const char *  bank)

Print the schema description for a bank.

Parameters
bankBank name

Definition at line 36 of file fusion.cpp.

◆ get()

hipo::bank& hipo::inputSource::get ( const char *  bank)
inline
Returns
Reference to the bank object for the given name.

Definition at line 77 of file fusion.h.

◆ getByteArray()

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

Copy a byte column into an array.

Parameters
bankBank name
entryColumn index
ptrOutput array
lengthNumber of elements to copy

Definition at line 75 of file fusion.cpp.

◆ getDouble()

double hipo::inputSource::getDouble ( const char *  bank,
const char *  entry,
int  row 
)
Returns
Double value from the given bank, entry, and row.

Definition at line 71 of file fusion.cpp.

◆ getEntries()

int64_t hipo::inputSource::getEntries ( )
inline
Returns
Total number of events in the file.

Definition at line 104 of file fusion.h.

◆ getFloat()

float hipo::inputSource::getFloat ( const char *  bank,
const char *  entry,
int  row 
)
Returns
Float value from the given bank, entry, and row.

Definition at line 67 of file fusion.cpp.

◆ getFloatArray()

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

Copy a float column into an array.

Definition at line 88 of file fusion.cpp.

◆ getInt()

int hipo::inputSource::getInt ( const char *  bank,
const char *  entry,
int  row 
)
Returns
Integer value from the given bank, entry, and row.

Definition at line 59 of file fusion.cpp.

◆ getIntArray()

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

Copy an integer column into an array.

Definition at line 83 of file fusion.cpp.

◆ getLong()

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

Definition at line 63 of file fusion.cpp.

◆ getShortArray()

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

Copy a short column into an array.

Definition at line 79 of file fusion.cpp.

◆ getSize()

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

Definition at line 54 of file fusion.cpp.

◆ next()

bool hipo::inputSource::next ( )

Advance to the next event and read all defined banks.

Returns
True if an event was read

Definition at line 40 of file fusion.cpp.

◆ open() [1/2]

void hipo::inputSource::open ( const char *  filename)

Open a HIPO file and read its dictionary.

Parameters
filenamePath to the HIPO file

Definition at line 17 of file fusion.cpp.

◆ open() [2/2]

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

Open a HIPO file with a tag filter.

Parameters
filenamePath to the HIPO file
tagEvent tag to filter

Definition at line 22 of file fusion.cpp.

◆ schema()

std::string hipo::inputSource::schema ( const char *  bank)
Returns
Schema string for the given bank.

Definition at line 28 of file fusion.cpp.


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