1#ifndef ANALYSISTREE_INFRA_BRANCHHASHHELPER_HPP_
2#define ANALYSISTREE_INFRA_BRANCHHASHHELPER_HPP_
6inline void hash_combine(std::size_t& ) {}
8template<
typename T,
typename... Rest>
9inline void hash_combine(std::size_t& seed,
const T& v, Rest... rest) {
11 seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
12 hash_combine(seed, rest...);
16 using Type = AnalysisTree::Types;
19 hash_combine(hash,
static_cast<AnalysisTree::ShortInt_t
>(config.GetType()));
21 auto hash_fields = [&hash](
const std::map<std::string, AnalysisTree::ConfigElement>& fields_map, Type field_type) {
22 for (
auto& field : fields_map) {
23 hash_combine(hash, field.first, field.second.id_,
static_cast<AnalysisTree::ShortInt_t
>(field_type));
27 hash_fields(config.GetMap<
float>(), Type::kFloat);
28 hash_fields(config.GetMap<
int>(), Type::kInteger);
29 hash_fields(config.GetMap<
bool>(), Type::kBool);
A class to store configuration of the Container.
Definition BranchConfig.hpp:118