Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-12 08:59:35

0001 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
0002 
0003 #ifndef PodioDatamodelDATAMODEL_DEFINITION_H
0004 #define PodioDatamodelDATAMODEL_DEFINITION_H
0005 
0006 #include "podio/DatamodelRegistry.h"
0007 #include "podio/SchemaEvolution.h"
0008 
0009 namespace PodioDatamodel::meta {
0010 /**
0011  * The complete definition of the datamodel at generation time in JSON format.
0012  */
0013 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": {}, "links": {}})DATAMODELDEF";
0014 
0015 
0016 /**
0017  * The names of all relations and vector members for all datatypes
0018  */
0019 inline podio::RelationNameMapping PodioDatamodel__getRelationNames() {
0020   using namespace std::string_view_literals;
0021   return {
0022     {"EventInfo"sv,
0023       {  },
0024       {  },
0025     },
0026     {"TimesliceInfo"sv,
0027       {  },
0028       {  },
0029     },
0030     {"ExampleHit"sv,
0031       {  },
0032       {  },
0033     },
0034     {"ExampleCluster"sv,
0035       { "Hits"sv, "Clusters"sv },
0036       {  },
0037     },
0038   };
0039 }
0040 
0041 /**
0042  * The schema version at generation time
0043  */
0044 static constexpr podio::SchemaVersionT schemaVersion = 1;
0045 
0046 /**
0047  * The helper class that takes care of registering the datamodel definition to
0048  * the DatamodelRegistry and to provide the index in that registry.
0049  *
0050  * Implemented as a singleton mainly to ensure only a single registration of
0051  * each datamodel, during the constructor
0052  */
0053 class DatamodelRegistryIndex {
0054 public:
0055   static size_t value() {
0056     static const auto relationNames = PodioDatamodel__getRelationNames();
0057     static auto index =
0058       DatamodelRegistryIndex(podio::DatamodelRegistry::mutInstance().registerDatamodel(
0059                                "PodioDatamodel",
0060                                PodioDatamodel__JSONDefinition,
0061                                relationNames
0062                              ));
0063     return index.m_value;
0064   }
0065 private:
0066   DatamodelRegistryIndex(size_t v) : m_value(v) {}
0067   size_t m_value{podio::DatamodelRegistry::NoDefinitionAvailable};
0068 };
0069 
0070 
0071 namespace static_registration {
0072   // The usual trick via an IIFE and a const variable that we assign to, to
0073   // ensure that we populate this before everything starts
0074   inline  bool ensureRegistration() {
0075     const static auto reg = []() {
0076       return PodioDatamodel::meta::DatamodelRegistryIndex::value() != podio::DatamodelRegistry::NoDefinitionAvailable;
0077     }();
0078     return reg;
0079   }
0080 
0081   const auto registrationEnsured = ensureRegistration();
0082 }
0083 
0084 } // namespace PodioDatamodel::meta
0085 
0086 #endif