1#ifndef PODIO_ROOTFRAMEWRITER_H
2#define PODIO_ROOTFRAMEWRITER_H
13#include <unordered_map>
22class GenericParameters;
46 void writeFrame(
const podio::Frame& frame,
const std::string& category,
const std::vector<std::string>& collsToWrite);
53 using StoreCollection = std::pair<const std::string&, podio::CollectionBase*>;
57 using CollectionInfoT = std::tuple<int, std::string, bool>;
65 std::vector<root_utils::CollectionBranches> branches{};
66 std::vector<CollectionInfoT> collInfo{};
68 std::vector<std::string> collsToWrite{};
72 void initBranches(CategoryInfo& catInfo,
const std::vector<StoreCollection>& collections,
76 CategoryInfo& getCategoryInfo(
const std::string& category);
78 static void resetBranches(std::vector<root_utils::CollectionBranches>& branches,
79 const std::vector<ROOTFrameWriter::StoreCollection>& collections,
82 std::unique_ptr<TFile> m_file{
nullptr};
83 std::unordered_map<std::string, CategoryInfo> m_categories{};
85 DatamodelDefinitionCollector m_datamodelCollector{};
~ROOTFrameWriter()=default
ROOTFrameWriter(const ROOTFrameWriter &)=delete
ROOTFrameWriter & operator=(const ROOTFrameWriter &)=delete
void writeFrame(const podio::Frame &frame, const std::string &category)