1#ifndef PODIO_SIOREADER_H
2#define PODIO_SIOREADER_H
17#include <sio/buffer.h>
18#include <sio/definitions.h>
19#include <sio/exception.h>
24class CollectionIDTable;
41 void openFile(
const std::string& filename)
override;
75 std::map<int, GenericParameters>* readCollectionMetaData()
override;
78 std::map<int, GenericParameters>* readRunMetaData()
override;
81 bool readFileTOCRecord();
84 void reconstructFileTOCRecord();
87 void readCollectionIDTable();
88 void readMetaDataRecord(
const std::shared_ptr<SIONumberedMetaDataBlock>& mdBlock);
91 typedef std::pair<CollectionBase*, std::string> Input;
92 std::vector<Input> m_inputs{};
93 std::shared_ptr<CollectionIDTable> m_table{
nullptr};
95 int m_lastEventRead{-1};
96 std::vector<std::string> m_typeNames{};
97 std::vector<short> m_subsetCollectionBits{};
99 std::shared_ptr<SIOEventMetaDataBlock> m_eventMetaData{};
100 std::shared_ptr<SIONumberedMetaDataBlock> m_runMetaData{};
101 std::shared_ptr<SIONumberedMetaDataBlock> m_collectionMetaData{};
103 sio::ifstream m_stream{};
104 sio::record_info m_rec_info{};
105 sio::buffer m_info_buffer{sio::max_record_info_len};
106 sio::buffer m_rec_buffer{sio::mbyte};
107 sio::buffer m_unc_buffer{sio::mbyte};
108 sio::block_list m_blocks{};
110 SIOFileTOCRecord m_tocRecord{};
size_t getNRecords(const std::string &name) const
unsigned getEntries() const override
get the number of events available from this reader
SIOReader & operator=(const SIOReader &)=delete
podio::version::Version currentFileVersion() const override
Get the podio version with which the current file has been written.
void closeFile() override
void readEvent() override
Read all collections requested.
void openFile(const std::string &filename) override
void endOfEvent() override
Prepare the reader to read the next event.
SIOReader(const SIOReader &)=delete
bool isValid() const override
Check if file is valid.
std::shared_ptr< CollectionIDTable > getCollectionIDTable() override
Read CollectionIDTable from SIO file.
void goToEvent(unsigned iEvent) override