File SIOBlock.h
-
namespace podio
Functions
-
template<typename devT, typename PODData>
void handlePODDataSIO(devT &device, PODData *data, size_t size)
-
class SIOBlock : public sio::block
- #include <podio/SIOBlock.h>
Base class for sio::block handlers used with PODIO.
Subclassed by podio::SIOBlockUserData< BasicType, typename >
Public Functions
-
inline SIOBlock(const std::string &nam, sio::version_type vers)
-
SIOBlock() = delete
-
SIOBlock(const SIOBlock&) = delete
-
inline podio::CollectionBase *getCollection()
-
inline podio::CollectionReadBuffers getBuffers() const
-
inline std::string name()
-
inline void setSubsetCollection(bool subsetColl)
-
inline void setCollection(podio::CollectionBase *col)
-
virtual SIOBlock *create(const std::string &name) const = 0
-
inline SIOBlock(const std::string &nam, sio::version_type vers)
-
class SIOBlockFactory
- #include <podio/SIOBlock.h>
factory for creating sio::blocks for a given type of EDM-collection
Public Functions
-
inline void registerBlockForCollection(const std::string &type, SIOBlock *b)
-
std::shared_ptr<SIOBlock> createBlock(const podio::CollectionBase *col, const std::string &name) const
-
std::shared_ptr<SIOBlock> createBlock(const std::string &typeStr, const std::string &name, const bool isRefColl = false) const
Public Static Functions
-
static inline SIOBlockFactory &instance()
Private Functions
-
SIOBlockFactory() = default
-
inline void registerBlockForCollection(const std::string &type, SIOBlock *b)
-
class SIOBlockLibraryLoader
- #include <podio/SIOBlock.h>
Public Static Functions
-
static inline SIOBlockLibraryLoader &instance()
Private Types
Private Functions
-
SIOBlockLibraryLoader()
-
LoadStatus loadLib(const std::string &libname)
Load a library with the given name via dlopen.
Private Members
-
std::map<std::string, void*> _loadedLibs = {}
Private Static Functions
-
static std::vector<std::tuple<std::string, std::string>> getLibNames()
Get all files that are found on LD_LIBRARY_PATH and that have “SioBlocks” in their name together with the directory they are in.
-
static inline SIOBlockLibraryLoader &instance()
-
class SIOCollectionIDTableBlock : public sio::block
- #include <podio/SIOBlock.h>
A dedicated block for handling the I/O of the CollectionIDTable.
Public Functions
-
inline SIOCollectionIDTableBlock()
-
inline SIOCollectionIDTableBlock(std::vector<std::string> &&names, std::vector<uint32_t> &&ids, std::vector<std::string> &&types, std::vector<short> &&isSubsetColl)
-
SIOCollectionIDTableBlock(const SIOCollectionIDTableBlock&) = delete
-
SIOCollectionIDTableBlock &operator=(const SIOCollectionIDTableBlock&) = delete
-
void read(sio::read_device &device, sio::version_type version) override
-
void write(sio::write_device &device) override
-
inline podio::CollectionIDTable getTable()
-
inline const std::vector<std::string> &getTypeNames() const
-
inline const std::vector<short> &getSubsetCollectionBits() const
-
inline SIOCollectionIDTableBlock()
-
class SIOEventMetaDataBlock : public sio::block
- #include <podio/SIOBlock.h>
A block for handling the EventMeta data.
Public Functions
-
inline SIOEventMetaDataBlock()
-
SIOEventMetaDataBlock(const SIOEventMetaDataBlock&) = delete
-
SIOEventMetaDataBlock &operator=(const SIOEventMetaDataBlock&) = delete
-
void read(sio::read_device &device, sio::version_type version) override
-
void write(sio::write_device &device) override
Public Members
-
podio::GenericParameters *metadata = {nullptr}
-
inline SIOEventMetaDataBlock()
-
class SIOFileTOCRecord
- #include <podio/SIOBlock.h>
Public Types
-
using PositionType = sio_helpers::position_type
Public Functions
-
void addRecord(const std::string &name, PositionType startPos)
-
size_t getNRecords(const std::string &name) const
-
PositionType getPosition(const std::string &name, unsigned iEntry = 0) const
Get the position of the iEntry-th record with the given name.
If no entry with the given name is recorded, return 0. Note there is no internal check on whether the given name actually has iEntry records. Use getNRecords to check for that if necessary.
-
std::vector<std::string_view> getRecordNames() const
Get all the record names that are stored in this TOC record.
Private Types
-
using RecordListType = std::pair<std::string, std::vector<PositionType>>
-
using MapType = std::vector<RecordListType>
Friends
- friend struct SIOFileTOCRecordBlock
-
using PositionType = sio_helpers::position_type
-
struct SIOFileTOCRecordBlock : public sio::block
- #include <podio/SIOBlock.h>
Public Functions
-
inline SIOFileTOCRecordBlock()
-
inline SIOFileTOCRecordBlock(SIOFileTOCRecord *r)
-
SIOFileTOCRecordBlock(const SIOFileTOCRecordBlock&) = delete
-
SIOFileTOCRecordBlock &operator=(const SIOFileTOCRecordBlock&) = delete
-
void read(sio::read_device &device, sio::version_type version) override
Public Members
-
SIOFileTOCRecord *record = {nullptr}
-
inline SIOFileTOCRecordBlock()
-
template<typename KeyT, typename ValueT>
struct SIOMapBlock : public sio::block - #include <podio/SIOBlock.h>
A block to serialize anything that behaves similar in iterating as a map<KeyT, ValueT>, e.g.
vector<tuple<KeyT, ValueT>>, which is what is used internally to represent the data to be written.
Public Functions
-
inline SIOMapBlock()
-
SIOMapBlock(const SIOMapBlock&) = delete
-
SIOMapBlock &operator=(const SIOMapBlock&) = delete
-
inline void read(sio::read_device &device, sio::version_type) override
-
inline SIOMapBlock()
-
class SIONumberedMetaDataBlock : public sio::block
- #include <podio/SIOBlock.h>
A block for handling the run and collection meta data.
Public Functions
-
inline SIONumberedMetaDataBlock(const std::string &name)
-
SIONumberedMetaDataBlock(const SIONumberedMetaDataBlock&) = delete
-
SIONumberedMetaDataBlock &operator=(const SIONumberedMetaDataBlock&) = delete
-
void read(sio::read_device &device, sio::version_type version) override
-
void write(sio::write_device &device) override
Public Members
-
std::map<int, GenericParameters> *data = {nullptr}
-
inline SIONumberedMetaDataBlock(const std::string &name)
-
struct SIOVersionBlock : public sio::block
- #include <podio/SIOBlock.h>
Public Functions
-
inline SIOVersionBlock()
-
inline void read(sio::read_device &device, sio::version_type) override
-
inline SIOVersionBlock()
-
namespace sio_helpers
Typedefs
-
using position_type = uint32_t
Variables
-
static constexpr uint32_t SIOTocMarker = 0xc001fea7
marker for showing that a TOC has been stored in the file
-
static constexpr int SIOTocInfoSize = sizeof(uint64_t)
the number of bits necessary to store the SIOTocMarker and the actual position of the start of the SIOFileTOCRecord
-
static constexpr const char *SIOTocRecordName = "podio_SIO_TOC_Record"
The name of the TOCRecord.
-
static constexpr const char *SIOEDMDefinitionName = "podio_SIO_EDMDefinitions"
The name of the record containing the EDM definitions in json format.
-
using position_type = uint32_t
-
template<typename devT, typename PODData>