forked from AIDASoft/podio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codify some of the implicitly assumed conventions (AIDASoft#439)
- Loading branch information
Showing
5 changed files
with
56 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef PODIO_FRAMECATEGORIES_H | ||
#define PODIO_FRAMECATEGORIES_H | ||
|
||
#include <string> | ||
|
||
namespace podio { | ||
|
||
/** | ||
* Create a parameterName that encodes the collection name and the parameter | ||
* Name into one string. | ||
* | ||
* This codifies a convention that was decided on to store collection level | ||
* parameters. These are parameters / metadata that are valid for all | ||
* collections of a given name in a file, e.g. CellID encoding strings. These | ||
* parameters are usually stored in a dedicated metadata Frame inside a file, | ||
* see the predefined category names in the Cateogry namespace. | ||
* | ||
* @param collName the name of the collection | ||
* @param paramName the name of the parameter | ||
* | ||
* @returns A single key string that combines the collection and parameter name | ||
*/ | ||
inline std::string collMetadataParamName(const std::string& collName, const std::string& paramName) { | ||
return collName + "__" + paramName; | ||
} | ||
|
||
/** | ||
* This namespace mimics an enum (at least in its usage) and simply defines | ||
* either commonly used category names, or category names that form a | ||
* convention. | ||
*/ | ||
namespace Category { | ||
/// The event category | ||
constexpr const auto Event = "events"; | ||
/// The run category | ||
constexpr const auto Run = "runs"; | ||
/// The metadata cateogry that is used to store a single Frame that holds data | ||
/// that is valid for a whole file, e.g. collection level parameters | ||
constexpr const auto Metadata = "metadata"; | ||
} // namespace Category | ||
} // namespace podio | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters