CbmRoot
Loading...
Searching...
No Matches
ChannelMaskSet.h
Go to the documentation of this file.
1/* Copyright (C) 2024-2025 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Felix Weiglhofer [committer], Dominik Smith */
4
5#pragma once
6
7#include "CbmYaml.h"
10
11#include <map>
12#include <set>
13
14namespace cbm::algo::sts
15{
16
18
20 std::set<u16> channels;
21
22 bool Contains(u16 channel) const { return channels.count(channel) > 0; }
23
24 MaskedChannels() = default;
25
26 MaskedChannels(std::initializer_list<u16> chans) : channels(chans) {}
27
28 CBM_YAML_FORMAT(YAML::Flow);
30 CBM_YAML_PROPERTIES(yaml::Property(&MaskedChannels::channels, "channels", "Channel mask", YAML::Flow));
31 };
32
33 // febId -> set of channel numbers
34 std::map<size_t, MaskedChannels> values;
35
39 ChannelMaskSet() = default;
40 ~ChannelMaskSet() = default;
41
43 CBM_YAML_PROPERTIES(yaml::Property(&ChannelMaskSet::values, "maskSet", "Channel mask set"));
44 };
45
46} // namespace cbm::algo::sts
47
#define CBM_YAML_EXTERN_DECL(type)
Declare the external instantiation of the Read and Dump functions for a type.
Definition CbmYaml.h:342
uint16_t u16
Definition Definitions.h:19
MaskedChannels(std::initializer_list< u16 > chans)
CBM_YAML_PROPERTIES(yaml::Property(&MaskedChannels::channels, "channels", "Channel mask", YAML::Flow))
ChannelMaskSet()=default
Construct emtpy mapping.
CBM_YAML_PROPERTIES(yaml::Property(&ChannelMaskSet::values, "maskSet", "Channel mask set"))
std::map< size_t, MaskedChannels > values