CbmRoot
Loading...
Searching...
No Matches
ChannelMaskSet.h
Go to the documentation of this file.
1/* Copyright (C) 2024 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 "Definitions.h"
8#include "compat/Filesystem.h"
9#include "yaml/Property.h"
10#include "yaml/Yaml.h"
11
12#include <map>
13#include <set>
14
15namespace cbm::algo::sts
16{
17
19
21 std::set<u16> channels;
22
23 bool Contains(u16 channel) const { return channels.count(channel) > 0; }
24
25 MaskedChannels() = default;
26
27 MaskedChannels(std::initializer_list<u16> chans) : channels(chans) {}
28
29 CBM_YAML_FORMAT(YAML::Flow);
31 CBM_YAML_PROPERTIES(yaml::Property(&MaskedChannels::channels, "channels", "Channel mask", YAML::Flow));
32 };
33
34 // febId -> set of channel numbers
35 std::map<size_t, MaskedChannels> values;
36
40 ChannelMaskSet() = default;
41 ~ChannelMaskSet() = default;
42
45 };
46
47} // namespace cbm::algo::sts
48
#define CBM_YAML_EXTERN_DECL(type)
Declare the external instantiation of the Read and Dump functions for a type.
Definition Yaml.h:297
std::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