REST-for-Physics  v2.3
Rare Event Searches ToolKit for Physics
TRestRawReadoutMetadata.h
1//
2// Created by lobis on 24-Aug-23.
3//
4
5#ifndef REST_TRESTRAWREADOUTMETADATA_H
6#define REST_TRESTRAWREADOUTMETADATA_H
7
8#include <TRestMetadata.h>
9
11
13 public:
14 struct ChannelInfo {
15 std::string type;
16 std::string name;
17 UShort_t channelId;
18 // other members
19 };
20 // maps daq id to channel info
21 std::map<UShort_t, ChannelInfo> fChannelInfo;
22
23 void InitializeFromReadout(TRestDetectorReadout* readout);
24
25 public:
26 std::string GetTypeForChannelDaqId(UShort_t channel) const;
27 std::string GetNameForChannelDaqId(UShort_t channel) const;
28
29 Int_t GetChannelIdForChannelDaqId(UShort_t channel) const;
30
31 std::vector<UShort_t> GetChannelDaqIDsForType(const std::string& type) const;
32
33 void PrintMetadata() const;
34
35 TRestRawReadoutMetadata() = default;
36 ~TRestRawReadoutMetadata() = default;
37
38 ClassDef(TRestRawReadoutMetadata, 1)
39};
40
41#endif // REST_TRESTRAWREADOUTMETADATA_H
A metadata class to generate/store a readout description.
A base class for any REST metadata class.
Definition: TRestMetadata.h:74