PODIO v00-16-03
An Event-Data-Model Toolkit for High Energy Physics Experiments
Loading...
Searching...
No Matches
SIOFrameWriter.h
Go to the documentation of this file.
1#ifndef PODIO_SIOFRAMEWRITER_H
2#define PODIO_SIOFRAMEWRITER_H
3
4#include "podio/SIOBlock.h"
6
7#include <sio/definitions.h>
8
9#include <string>
10#include <utility>
11#include <vector>
12
13namespace podio {
14
15class Frame;
16
18public:
19 SIOFrameWriter(const std::string& filename);
20 ~SIOFrameWriter() = default;
21
24
25 /** Write the given Frame with the given category
26 */
27 void writeFrame(const podio::Frame& frame, const std::string& category);
28
29 /** Write the given Frame with the given category only storing the collections
30 * that are desired via collsToWrite
31 */
32 void writeFrame(const podio::Frame& frame, const std::string& category, const std::vector<std::string>& collsToWrite);
33
34 void finish();
35
36private:
37 sio::ofstream m_stream{}; ///< The output file stream
38 SIOFileTOCRecord m_tocRecord{}; ///< The "table of contents" of the written file
39 DatamodelDefinitionCollector m_datamodelCollector{};
40};
41} // namespace podio
42
43#endif // PODIO_SIOFRAMEWRITER_H
void writeFrame(const podio::Frame &frame, const std::string &category)
SIOFrameWriter & operator=(const SIOFrameWriter &)=delete
SIOFrameWriter(const SIOFrameWriter &)=delete