PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
Loading...
Searching...
No Matches
podio::SIONumberedMetaDataBlock Class Reference

#include <SIOBlock.h>

+ Inheritance diagram for podio::SIONumberedMetaDataBlock:

Public Member Functions

 SIONumberedMetaDataBlock (const std::string &name)
 
 SIONumberedMetaDataBlock (const SIONumberedMetaDataBlock &)=delete
 
SIONumberedMetaDataBlockoperator= (const SIONumberedMetaDataBlock &)=delete
 
void read (sio::read_device &device, sio::version_type version) override
 
void write (sio::write_device &device) override
 

Public Attributes

std::map< int, GenericParameters > * data {nullptr}
 

Detailed Description

A block for handling the run and collection meta data

Definition at line 203 of file SIOBlock.h.

Constructor & Destructor Documentation

◆ SIONumberedMetaDataBlock() [1/2]

podio::SIONumberedMetaDataBlock::SIONumberedMetaDataBlock ( const std::string &  name)
inline

Definition at line 205 of file SIOBlock.h.

205 : sio::block(name, sio::version::encode_version(0, 2)) {
206 }

◆ SIONumberedMetaDataBlock() [2/2]

podio::SIONumberedMetaDataBlock::SIONumberedMetaDataBlock ( const SIONumberedMetaDataBlock )
delete

Member Function Documentation

◆ operator=()

SIONumberedMetaDataBlock & podio::SIONumberedMetaDataBlock::operator= ( const SIONumberedMetaDataBlock )
delete

◆ read()

void podio::SIONumberedMetaDataBlock::read ( sio::read_device &  device,
sio::version_type  version 
)
override

Definition at line 76 of file SIOBlock.cc.

76 {
77 int size;
78 device.data(size);
79 while (size--) {
80 int id;
81 device.data(id);
82 GenericParameters params;
83 readGenericParameters(device, params, version);
84
85 data->emplace(id, std::move(params));
86 }
87}
std::map< int, GenericParameters > * data
Definition: SIOBlock.h:214
void readGenericParameters(sio::read_device &device, GenericParameters &params, sio::version_type version)
Definition: SIOBlock.cc:59

◆ write()

void podio::SIONumberedMetaDataBlock::write ( sio::write_device &  device)
override

Definition at line 89 of file SIOBlock.cc.

89 {
90 device.data((int)data->size());
91 for (const auto& [id, params] : *data) {
92 device.data(id);
93 writeGenericParameters(device, params);
94 }
95}
void writeGenericParameters(sio::write_device &device, const GenericParameters &params)
Definition: SIOBlock.cc:52

Member Data Documentation

◆ data

std::map<int, GenericParameters>* podio::SIONumberedMetaDataBlock::data {nullptr}

Definition at line 214 of file SIOBlock.h.

Referenced by read(), and write().


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