Class podio::Frame

class Frame

Frame class that serves as a container of collection and meta data.

Public Functions

inline Frame()

Empty Frame constructor.

template<typename FrameDataT>
Frame(std::unique_ptr<FrameDataT>)

Frame constructor from (almost) arbitrary raw data.

template<typename FrameDataT, typename = EnableIfRValue<FrameDataT>>
Frame(FrameDataT&&)

Frame constructor from (almost) arbitrary raw data.

This r-value overload is mainly present for enabling the python bindings, where cppyy seems to strip the std::unique_ptr somewhere in the process

Frame(const Frame&) = delete
Frame &operator=(const Frame&) = delete
Frame(Frame&&) = default
Frame &operator=(Frame&&) = default
~Frame() = default

Frame destructor.

template<typename CollT, typename = EnableIfCollection<CollT>>
const CollT &get(const std::string &name) const

Get a collection from the Frame.

inline const podio::CollectionBase *get(const std::string &name) const

Get a collection from the Frame.

This is the pointer-to-base version for type-erased access (e.g. python interface)

template<typename CollT, typename = EnableIfCollectionRValue<CollT>>
const CollT &put(CollT &&coll, const std::string &name)

(Destructively) move a collection into the Frame and get a const reference back for further use

inline void put(std::unique_ptr<podio::CollectionBase> coll, const std::string &name)

Move a collection into the Frame handing over ownership to the Frame.

template<typename T, typename = podio::EnableIfValidGenericDataType<T>>
inline void putParameter(const std::string &key, T value)

Add a value to the parameters of the Frame (if the type is supported).

Copy the value into the internal store

inline void putParameter(const std::string &key, std::string value)

Add a string value to the parameters of the Frame by copying it.

Dedicated overload for enabling the on-the-fly conversion on the string literals.

inline void putParameter(const std::string &key, std::vector<std::string> values)

Add a vector of strings to the parameters of the Frame (via copy).

Dedicated overload for enabling on-the-fly conversions of initializer_list of string literals.

template<typename T, typename = std::enable_if_t<detail::isInTuple<T, SupportedGenericDataTypes>>>
inline void putParameter(const std::string &key, std::initializer_list<T> &&values)

Add a vector of values into the parameters of the Frame.

Overload for catching on-the-fly conversions of initializer_lists of values.

template<typename T, typename = podio::EnableIfValidGenericDataType<T>>
inline podio::GenericDataReturnType<T> getParameter(const std::string &key) const

Retrieve parameters via key from the internal store.

Return type will either by a const reference or a value depending on the desired type.

inline const podio::GenericParameters &getParameters() const

Get all parameters that are stored in this Frame.

template<typename T, typename = podio::EnableIfValidGenericDataType<T>>
inline std::vector<std::string> getParameterKeys() const

Get the keys of all stored parameters for a given type.

inline std::vector<std::string> getAvailableCollections() const

Get all currently available collections (including potentially unpacked ones from raw data)

inline const podio::GenericParameters &getGenericParametersForWrite() const

Get the GenericParameters for writing.

inline const podio::CollectionBase *getCollectionForWrite(const std::string &name) const

Get a collection for writing (in a prepared and “ready-to-write” state)

inline podio::CollectionIDTable getCollectionIDTableForWrite() const