[PWGJE] Clean up EMCALClusters header and add `getClusterDefinitionFr… - #17843
Conversation
…omString` function - Add Default value for `algorithm` of `EMCALClusterDefinition` - Update constructor with member initilizer - Add new function `getClusterDefinitionFromID` to obtain the cluster definition via the storage ID - Change function `getClusterDefinitionFromString` to use an `unordered_map<std::string,int>` instead of multiple if statements with string comparison - Rename `ClusterAlgorithm_t` to `ClusterAlgorithm` to fit naming conventions - Return type of both functions to get the ClusterDefinition is now `const EMCALClusterDefinition&`, was `const EMCALClusterDefinition` before (not a reference but a copy) - Add `inline` to the different `EMCALClusterDefinition` definitions to ensure they are only in memory ONCE and not per file that includes them.
|
O2 linter results: ❌ 5 errors, |
fjonasALICE
left a comment
There was a problem hiding this comment.
assuming build issue is transient, everything looks good to me! Most critical is probably renaming of ClusterAlgorithm_t to ClusterAlgorithm, but i did not find anything else in O2 and O2Physics that breaks due to this renaming
I also checked for |
alibuild
left a comment
There was a problem hiding this comment.
Auto-approving on behalf of @mhemmer-cern.
…omString` function
algorithmofEMCALClusterDefinitiongetClusterDefinitionFromIDto obtain the cluster definition via the storage IDgetClusterDefinitionFromStringto use anunordered_map<std::string,int>instead of multiple if statements with string comparisonClusterAlgorithm_ttoClusterAlgorithmto fit naming conventionsconst EMCALClusterDefinition&, wasconst EMCALClusterDefinitionbefore (not a reference but a copy)inlineto the differentEMCALClusterDefinitiondefinitions to ensure they are only in memory ONCE and not per file that includes them.