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

HIPO file wrapper providing range-based iteration over events. More...

#include <hipoeventiterator.h>

Classes

class  iterator
 Input iterator for traversing events in a hipoeventfile. More...
 

Public Types

using const_iterator = iterator
 

Public Member Functions

 hipoeventfile (const std::string &filename)
 
 hipoeventfile (hipoeventfile &&other) noexcept=default
 
hipoeventfileoperator= (hipoeventfile &&other) noexcept=default
 
 hipoeventfile (const hipoeventfile &)=delete
 
hipoeventfileoperator= (const hipoeventfile &)=delete
 
iterator begin ()
 Return an iterator to the first event in the file. More...
 
iterator end ()
 Return an iterator representing the end of the file. More...
 

Friends

class iter_event
 

Detailed Description

HIPO file wrapper providing range-based iteration over events.

Opens a HIPO file and pre-creates bank templates for all schemas in the dictionary. Events can be iterated using standard C++ range-based for loops.

hipo::hipoeventfile file("data.hipo");
for (auto& event : file) {
auto& particles = event.get_bank("REC::Particle");
}
HIPO file wrapper providing range-based iteration over events.

Definition at line 36 of file hipoeventiterator.h.

Member Typedef Documentation

◆ const_iterator

Constructor & Destructor Documentation

◆ hipoeventfile() [1/3]

hipo::hipoeventfile::hipoeventfile ( const std::string &  filename)
inlineexplicit

Definition at line 49 of file hipoeventiterator.h.

◆ hipoeventfile() [2/3]

hipo::hipoeventfile::hipoeventfile ( hipoeventfile &&  other)
defaultnoexcept

◆ hipoeventfile() [3/3]

hipo::hipoeventfile::hipoeventfile ( const hipoeventfile )
delete

Member Function Documentation

◆ begin()

hipoeventfile::iterator hipo::hipoeventfile::begin ( )
inline

Return an iterator to the first event in the file.

Inline implementation of hipoeventfile::begin(). Rewinds the reader and returns an iterator to the first event.

Returns
Iterator positioned at the first event.

Definition at line 175 of file hipoeventiterator.h.

◆ end()

hipoeventfile::iterator hipo::hipoeventfile::end ( )
inline

Return an iterator representing the end of the file.

Inline implementation of hipoeventfile::end(). Returns an end-of-file sentinel iterator.

Returns
Iterator positioned at end-of-file.

Definition at line 182 of file hipoeventiterator.h.

◆ operator=() [1/2]

hipoeventfile& hipo::hipoeventfile::operator= ( const hipoeventfile )
delete

◆ operator=() [2/2]

hipoeventfile& hipo::hipoeventfile::operator= ( hipoeventfile &&  other)
defaultnoexcept

Friends And Related Function Documentation

◆ iter_event

friend class iter_event
friend

Definition at line 37 of file hipoeventiterator.h.


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