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

#include <SIOBlock.h>

+ Inheritance diagram for podio::SIOFileTOCRecordBlock:

Public Member Functions

 SIOFileTOCRecordBlock ()
 
 SIOFileTOCRecordBlock (SIOFileTOCRecord *r)
 
 SIOFileTOCRecordBlock (const SIOFileTOCRecordBlock &)=delete
 
SIOFileTOCRecordBlockoperator= (const SIOFileTOCRecordBlock &)=delete
 
void read (sio::read_device &device, sio::version_type version) override
 
void write (sio::write_device &device) override
 

Public Attributes

SIOFileTOCRecordrecord {nullptr}
 

Detailed Description

Definition at line 312 of file SIOBlock.h.

Constructor & Destructor Documentation

◆ SIOFileTOCRecordBlock() [1/3]

podio::SIOFileTOCRecordBlock::SIOFileTOCRecordBlock ( )
inline

Definition at line 313 of file SIOBlock.h.

313 : sio::block(sio_helpers::SIOTocRecordName, sio::version::encode_version(0, 1)) {
314 }

◆ SIOFileTOCRecordBlock() [2/3]

podio::SIOFileTOCRecordBlock::SIOFileTOCRecordBlock ( SIOFileTOCRecord r)
inline

Definition at line 316 of file SIOBlock.h.

316 :
317 sio::block(sio_helpers::SIOTocRecordName, sio::version::encode_version(0, 1)), record(r) {
318 }
SIOFileTOCRecord * record
Definition: SIOBlock.h:326

◆ SIOFileTOCRecordBlock() [3/3]

podio::SIOFileTOCRecordBlock::SIOFileTOCRecordBlock ( const SIOFileTOCRecordBlock )
delete

Member Function Documentation

◆ operator=()

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

◆ read()

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

Definition at line 226 of file SIOBlock.cc.

226 {
227 int size;
228 device.data(size);
229 while (size--) {
230 std::string name;
231 device.data(name);
232 std::vector<SIOFileTOCRecord::PositionType> positions;
233 device.data(positions);
234
235 record->m_recordMap.emplace_back(std::move(name), std::move(positions));
236 }
237}

◆ write()

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

Definition at line 239 of file SIOBlock.cc.

239 {
240 device.data((int)record->m_recordMap.size());
241 for (const auto& [name, positions] : record->m_recordMap) {
242 device.data(name);
243 device.data(positions);
244 }
245}

Member Data Documentation

◆ record

SIOFileTOCRecord* podio::SIOFileTOCRecordBlock::record {nullptr}

Definition at line 326 of file SIOBlock.h.

Referenced by read(), and write().


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