File DatamodelRegistryIOHelpers.h
-
namespace podio
-
class DatamodelDefinitionCollector
- #include <podio/utilities/DatamodelRegistryIOHelpers.h>
Helper class to collect the datamodel (JSON) definitions that should be written.
Public Functions
-
void registerDatamodelDefinition(const podio::CollectionBase *coll, const std::string &name)
Register the datamodel definition of the EDM this collection is from to be written.
- Parameters:
coll – A collection of an EDM
name – The name under which this collection is stored on file
-
std::vector<std::tuple<std::string, std::string>> getDatamodelDefinitionsToWrite() const
Get all the names and JSON definitions that need to be written.
Private Members
-
std::set<size_t> m_edmDefRegistryIdcs = {}
The indices in the EDM definition registry that need to be written.
-
void registerDatamodelDefinition(const podio::CollectionBase *coll, const std::string &name)
-
class DatamodelDefinitionHolder
- #include <podio/utilities/DatamodelRegistryIOHelpers.h>
Helper class to hold and provide the datamodel (JSON) definitions for reader classes.
Public Types
-
using MapType = std::vector<std::tuple<std::string, std::string>>
The “map” type that is used internally.
Public Functions
-
inline DatamodelDefinitionHolder(MapType &&definitions)
Constructor from an existing collection of names and datamodel definitions.
-
DatamodelDefinitionHolder() = default
-
~DatamodelDefinitionHolder() = default
-
DatamodelDefinitionHolder(const DatamodelDefinitionHolder&) = delete
-
DatamodelDefinitionHolder &operator=(const DatamodelDefinitionHolder&) = delete
-
DatamodelDefinitionHolder(DatamodelDefinitionHolder&&) = default
-
DatamodelDefinitionHolder &operator=(DatamodelDefinitionHolder&&) = default
-
const std::string_view getDatamodelDefinition(const std::string &name) const
Get the datamodel definition for the given datamodel name.
Returns an empty model definition if no model is stored under the given name.
- Parameters:
name – The name of the datamodel
-
std::vector<std::string> getAvailableDatamodels() const
Get all names of the datamodels that have been read from file.
-
using MapType = std::vector<std::tuple<std::string, std::string>>
-
class DatamodelDefinitionCollector