Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:06:09

0001 #ifndef PODIO_FRAMECATEGORIES_H
0002 #define PODIO_FRAMECATEGORIES_H
0003 
0004 #include <string>
0005 
0006 namespace podio {
0007 
0008 /// Create a parameterName that encodes the collection name and the parameter
0009 /// Name into one string.
0010 ///
0011 /// This codifies a convention that was decided on to store collection level
0012 /// parameters. These are parameters / metadata that are valid for all
0013 /// collections of a given name in a file, e.g. CellID encoding strings. These
0014 /// parameters are usually stored in a dedicated metadata Frame inside a file,
0015 /// see the predefined category names in the Category namespace.
0016 ///
0017 /// @param collName the name of the collection
0018 /// @param paramName the name of the parameter
0019 ///
0020 /// @returns A single key string that combines the collection and parameter name
0021 inline std::string collMetadataParamName(const std::string& collName, const std::string& paramName) {
0022   return collName + "__" + paramName;
0023 }
0024 
0025 /// This namespace mimics an enum (at least in its usage) and simply defines
0026 /// either commonly used category names, or category names that form a
0027 /// convention.
0028 namespace Category {
0029   /// The event category
0030   constexpr const auto Event = "events";
0031   /// The run category
0032   constexpr const auto Run = "runs";
0033   /// The metadata category that is used to store a single Frame that holds data
0034   /// that is valid for a whole file, for example collection level parameters
0035   constexpr const auto Metadata = "metadata";
0036 } // namespace Category
0037 } // namespace podio
0038 
0039 #endif