|
||||
File indexing completed on 2025-01-18 10:01:27
0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT 0002 0003 #include "podio/DatamodelRegistry.h" 0004 #include "podio/SchemaEvolution.h" 0005 0006 namespace PodioDatamodel::meta { 0007 /** 0008 * The complete definition of the datamodel at generation time in JSON format. 0009 */ 0010 static constexpr auto PodioDatamodel__JSONDefinition = R"DATAMODELDEF({"options": {"getSyntax": false, "exposePODMembers": true, "includeSubfolder": "PodioDatamodel/"}, "schema_version": 1, "components": {}, "datatypes": {"EventInfo": {"Description": "Event info", "Author": "N. Brei", "Members": ["int EventNumber // event number", "int TimesliceNumber // timeslice number", "int RunNumber // run number"], "VectorMembers": [], "OneToOneRelations": [], "OneToManyRelations": [], "ExtraCode": {}, "MutableExtraCode": {}}, "TimesliceInfo": {"Description": "Timeslice info", "Author": "N. Brei", "Members": ["int TimesliceNumber // timeslice number", "int RunNumber // run number"], "VectorMembers": [], "OneToOneRelations": [], "OneToManyRelations": [], "ExtraCode": {}, "MutableExtraCode": {}}, "ExampleHit": {"Description": "Example Hit", "Author": "B. Hegner", "Members": ["std::uint64_t cellID // cellID", "double x // x-coordinate", "double y // y-coordinate", "double z // z-coordinate", "double energy // measured energy deposit", "std::uint64_t time // ticks since start of timeframe"], "VectorMembers": [], "OneToOneRelations": [], "OneToManyRelations": [], "ExtraCode": {}, "MutableExtraCode": {}}, "ExampleCluster": {"Description": "Cluster", "Author": "B. Hegner", "Members": ["double energy // cluster energy"], "OneToManyRelations": ["ExampleHit Hits // hits contained in the cluster", "ExampleCluster Clusters // sub clusters used to create this cluster"], "VectorMembers": [], "OneToOneRelations": [], "ExtraCode": {}, "MutableExtraCode": {}}}, "interfaces": {}})DATAMODELDEF"; 0011 0012 0013 /** 0014 * The names of all relations and vector members for all datatypes 0015 */ 0016 inline podio::RelationNameMapping PodioDatamodel__getRelationNames() { 0017 using namespace std::string_view_literals; 0018 return { 0019 {"EventInfo"sv, 0020 { }, 0021 { }, 0022 }, 0023 {"TimesliceInfo"sv, 0024 { }, 0025 { }, 0026 }, 0027 {"ExampleHit"sv, 0028 { }, 0029 { }, 0030 }, 0031 {"ExampleCluster"sv, 0032 { "Hits"sv, "Clusters"sv }, 0033 { }, 0034 }, 0035 }; 0036 } 0037 0038 /** 0039 * The schema version at generation time 0040 */ 0041 static constexpr podio::SchemaVersionT schemaVersion = 1; 0042 0043 /** 0044 * The helper class that takes care of registering the datamodel definition to 0045 * the DatamodelRegistry and to provide the index in that registry. 0046 * 0047 * Implemented as a singleton mainly to ensure only a single registration of 0048 * each datamodel, during the constructor 0049 */ 0050 class DatamodelRegistryIndex { 0051 public: 0052 static size_t value() { 0053 static const auto relationNames = PodioDatamodel__getRelationNames(); 0054 static auto index = 0055 DatamodelRegistryIndex(podio::DatamodelRegistry::mutInstance().registerDatamodel( 0056 "PodioDatamodel", 0057 PodioDatamodel__JSONDefinition, 0058 relationNames 0059 )); 0060 return index.m_value; 0061 } 0062 private: 0063 DatamodelRegistryIndex(size_t v) : m_value(v) {} 0064 size_t m_value{podio::DatamodelRegistry::NoDefinitionAvailable}; 0065 }; 0066 0067 0068 namespace static_registration { 0069 // The usual trick via an IIFE and a const variable that we assign to, to 0070 // ensure that we populate this before everything starts 0071 inline bool ensureRegistration() { 0072 const static auto reg = []() { 0073 return PodioDatamodel::meta::DatamodelRegistryIndex::value() != podio::DatamodelRegistry::NoDefinitionAvailable; 0074 }(); 0075 return reg; 0076 } 0077 0078 const auto registrationEnsured = ensureRegistration(); 0079 } 0080 0081 } // namespace PodioDatamodel::meta
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |