Namespace podio::root_utils

namespace root_utils

Typedefs

using CollectionWriteInfoT = std::tuple<uint32_t, std::string, bool, unsigned int>
using CollectionInfoWithoutSchemaT = std::tuple<int, std::string, bool>
using StoreCollection = std::tuple<const std::string&, podio::CollectionBase*>

A collection name and a base pointer grouped together for writing.

Functions

GenericParameters loadParamsFrom(ROOT::VecOps::RVec<std::string> intKeys, ROOT::VecOps::RVec<std::vector<int>> intValues, ROOT::VecOps::RVec<std::string> floatKeys, ROOT::VecOps::RVec<std::vector<float>> floatValues, ROOT::VecOps::RVec<std::string> doubleKeys, ROOT::VecOps::RVec<std::vector<double>> doubleValues, ROOT::VecOps::RVec<std::string> stringKeys, ROOT::VecOps::RVec<std::vector<std::string>> stringValues)
struct CollectionBranches
#include <podio/utilities/RootHelpers.h>

Small helper struct to collect all branches that are necessary to read or write a collection.

Needed to cache the branch pointers and avoid having to get them from a TTree/TChain for every event.

Public Functions

CollectionBranches() = default
~CollectionBranches() = default
CollectionBranches(const CollectionBranches&) = delete
CollectionBranches &operator=(const CollectionBranches&) = delete
CollectionBranches(CollectionBranches&&) = default
CollectionBranches &operator=(CollectionBranches&&) = default
inline CollectionBranches(TBranch *dataBranch)

Public Members

TBranch *data = {nullptr}
std::vector<TBranch*> refs = {}
std::vector<TBranch*> vecs = {}
std::vector<std::string> refNames = {}

The names of the relation branches.

std::vector<std::string> vecNames = {}

The names of the vector member branches.

struct CollectionWriteInfo
#include <podio/utilities/RootHelpers.h>

Public Members

uint32_t collectionID = {static_cast<uint32_t>(-1)}

collection id

std::string dataType = {}

The fully qualified data type of the collection.

bool isSubset = {false}

Whether this collection is a subset collection or not.

unsigned int schemaVersion = {0}

The schema version of the collection type.

std::string name = {}

The name of the collection.

std::string storageType = {}

The type in which the data is actually stored.

template<typename T>
struct ParamStorage
#include <podio/utilities/RootHelpers.h>

Pair of keys and values for one type of the ones that can be stored in GenericParameters.

Public Functions

ParamStorage() = default
~ParamStorage() = default
ParamStorage(const ParamStorage&) = delete
ParamStorage &operator=(const ParamStorage&) = delete
ParamStorage(ParamStorage&&) = default
ParamStorage &operator=(ParamStorage&&) = default
inline ParamStorage(std::tuple<std::vector<std::string>, std::vector<std::vector<T>>> keysValues)
inline auto keysPtr()

Get a pointer to the stored keys for binding it to a TBranch.

inline auto valuesPtr()

Get a pointer to the stored vectors for binding it to a TBranch.

Public Members

std::vector<std::string> keys = {}

The keys for this type.

std::vector<std::vector<T>> values = {}

The values for this type.