McStas Readout Master 0.3.3
Loading...
Searching...
No Matches
enums.h
1#pragma once
2#include <string>
3
4#ifdef WIN32
5// Export symbols if compile flags "READOUT_SHARED" and "READOUT_EXPORT" are set on Windows.
6 #ifdef READOUT_SHARED
7 #ifdef READOUT_EXPORT
8 #define RL_API __declspec(dllexport)
9 #else
10 #define RL_API __declspec(dllimport)
11 #endif
12 #else
13 // Disable definition if linking statically.
14 #define RL_API
15 #endif
16#else
17// Disable definition for non-Win32 systems.
18#define RL_API
19#endif
20
22enum class Verbosity {
23 silent,
24 errors,
25 warnings,
26 info,
27 details
28};
29
37enum DetectorType {
38 Reserved = 0x00,
39 TTLMonitor = 0x10,
40 LOKI = 0x30,
41 TBL3H3 = 0x32,
42 BIFROST = 0x34,
43 MIRACLES = 0x38,
44 CSPEC = 0x3c,
45 TREX = 0x40,
46 NMX = 0x44,
47 FREIA = 0x48,
48 TBLVMM = 0x49,
49 ESTIA=0x4c,
50 BEER=0x50,
51 DREAM = 0x60,
52 MAGIC = 0x64,
53 HEIMDAL = 0x68,
54 // Common Beam Monitor types don't (yet) have defined identifiers
55 CBM0 = 0xf0,
56 CBM1 = 0xf1,
57 CBM2 = 0xf2,
58 CBMI = 0xfa,
59};
60
67enum class ReadoutType {
68 TTLMonitor,
69 CAEN,
70 VMM3,
71 CDT,
72 BM0,
73 BM2,
74 BMI,
75};
76
78RL_API DetectorType detectorType_from_int(int);
80RL_API ReadoutType readoutType_from_detectorType(DetectorType type);
82RL_API ReadoutType readoutType_from_int(int int_type);
83
85RL_API DetectorType detectorType_from_name(const std::string & name);
87RL_API ReadoutType readoutType_from_name(const std::string & name);
89RL_API std::string detectorType_name(DetectorType);
91RL_API std::string readoutType_name(ReadoutType);