PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
Loading...
Searching...
No Matches
podio::SIOMapBlock< KeyT, ValueT > Struct Template Reference

#include <SIOBlock.h>

+ Inheritance diagram for podio::SIOMapBlock< KeyT, ValueT >:

Public Member Functions

 SIOMapBlock ()
 
 SIOMapBlock (std::vector< std::tuple< KeyT, ValueT > > &&data)
 
 SIOMapBlock (const SIOMapBlock &)=delete
 
SIOMapBlockoperator= (const SIOMapBlock &)=delete
 
void read (sio::read_device &device, sio::version_type) override
 
void write (sio::write_device &device) override
 

Public Attributes

std::vector< std::tuple< KeyT, ValueT > > mapData {}
 

Detailed Description

template<typename KeyT, typename ValueT>
struct podio::SIOMapBlock< KeyT, ValueT >

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.

Definition at line 180 of file SIOBlock.h.

Constructor & Destructor Documentation

◆ SIOMapBlock() [1/3]

template<typename KeyT , typename ValueT >
podio::SIOMapBlock< KeyT, ValueT >::SIOMapBlock ( )
inline

Definition at line 181 of file SIOBlock.h.

181 : sio::block("SIOMapBlock", sio::version::encode_version(0, 1)) {
182 }

◆ SIOMapBlock() [2/3]

template<typename KeyT , typename ValueT >
podio::SIOMapBlock< KeyT, ValueT >::SIOMapBlock ( std::vector< std::tuple< KeyT, ValueT > > &&  data)
inline

Definition at line 183 of file SIOBlock.h.

183 :
184 sio::block("SIOMapBlock", sio::version::encode_version(0, 1)), mapData(std::move(data)) {
185 }
std::vector< std::tuple< KeyT, ValueT > > mapData
Definition: SIOBlock.h:197

◆ SIOMapBlock() [3/3]

template<typename KeyT , typename ValueT >
podio::SIOMapBlock< KeyT, ValueT >::SIOMapBlock ( const SIOMapBlock< KeyT, ValueT > &  )
delete

Member Function Documentation

◆ operator=()

template<typename KeyT , typename ValueT >
SIOMapBlock & podio::SIOMapBlock< KeyT, ValueT >::operator= ( const SIOMapBlock< KeyT, ValueT > &  )
delete

◆ read()

template<typename KeyT , typename ValueT >
void podio::SIOMapBlock< KeyT, ValueT >::read ( sio::read_device &  device,
sio::version_type   
)
inlineoverride

Definition at line 190 of file SIOBlock.h.

190 {
191 readMapLike(device, mapData);
192 }
void readMapLike(sio::read_device &device, MapLikeT &map)
Read anything that iterates like an std::map.
Definition: SIOBlock.h:43

◆ write()

template<typename KeyT , typename ValueT >
void podio::SIOMapBlock< KeyT, ValueT >::write ( sio::write_device &  device)
inlineoverride

Definition at line 193 of file SIOBlock.h.

193 {
194 writeMapLike(device, mapData);
195 }
void writeMapLike(sio::write_device &device, const MapLikeT &map)
Write anything that iterates like an std::map.
Definition: SIOBlock.h:33

Member Data Documentation

◆ mapData

template<typename KeyT , typename ValueT >
std::vector<std::tuple<KeyT, ValueT> > podio::SIOMapBlock< KeyT, ValueT >::mapData {}

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