7 const std::string& name) {
10 std::cerr <<
"No EDM definition available for collection " << name << std::endl;
13 m_edmDefRegistryIdcs.insert(edmIndex);
19 std::vector<std::tuple<std::string, std::string>> edmDefinitions;
20 edmDefinitions.reserve(m_edmDefRegistryIdcs.size());
21 for (
const auto& index : m_edmDefRegistryIdcs) {
23 edmDefinitions.emplace_back(edmRegistry.getDatamodelName(index), edmRegistry.getDatamodelDefinition(index));
26 return edmDefinitions;
31 [&name](
const auto& entry) { return std::get<0>(entry) == name; });
34 return std::get<1>(*it);
41 std::vector<std::string> defs{};
44 [](
const auto& elem) { return std::get<0>(elem); });
virtual size_t getDatamodelRegistryIndex() const =0
Get the index in the DatatypeRegistry of the EDM this collection belongs to.
std::vector< std::tuple< std::string, std::string > > getDatamodelDefinitionsToWrite() const
Get all the names and JSON definitions that need to be written.
void registerDatamodelDefinition(const podio::CollectionBase *coll, const std::string &name)
std::vector< std::string > getAvailableDatamodels() const
const std::string_view getDatamodelDefinition(const std::string &name) const
static const DatamodelRegistry & instance()
Get the registry.
static constexpr size_t NoDefinitionAvailable
Dedicated index value for error checking, used to default init the generated RegistryIndex.
static constexpr size_t NoDefinitionNecessary