HIPO  4.3.0
High Performance Output data format for experimental physics
chain.h File Reference

Chain multiple HIPO files for sequential or parallel processing. More...

#include <atomic>
#include <filesystem>
#include <memory>
#include <mutex>
#include <optional>
#include <regex>
#include <string>
#include <string_view>
#include <vector>
#include <fmt/format.h>
#include "reader.h"
#include "record.h"
#include "dictionary.h"
#include "bank.h"
#include "event.h"
#include "progresstracker.hpp"
#include "threadpool.hpp"

Go to the source code of this file.

Classes

struct  hipo::FileInfo
 Metadata container for a file in the chain. More...
 
struct  hipo::ChainStatistics
 Thread-safe statistics for chain processing. More...
 
class  hipo::chain_event
 Event wrapper that provides bank access via dictionary. More...
 
class  hipo::ChainIterator
 Iterator for traversing events across all files in a chain. More...
 
struct  hipo::ChainIterator::EventData
 
class  hipo::chain
 

Namespaces

 hipo
 

Typedefs

using hipo::fileinfo = FileInfo
 
using hipo::chainstatistics = ChainStatistics
 

Detailed Description

Chain multiple HIPO files for sequential or parallel processing.

Provides a modern C++ interface for processing multiple HIPO files with:

  • Range-based iteration across all files
  • Parallel processing with configurable thread pools
  • Lazy metadata loading for minimal memory overhead
  • Progress tracking and statistics
// Simple sequential iteration
ch.add("file1.hipo");
ch.add("file2.hipo");
for (auto& [event, file_idx, event_idx] : ch) {
auto& particles = event.getBank("REC::Particle");
}
// Parallel processing
ch.process([](auto& event, int file_idx, long event_idx) {
// Process event...
});
int add(std::string_view filename)
Add a single file to the chain.
Definition: chain.h:296

Definition in file chain.h.