RawTypes.h
Go to the documentation of this file.
1 #ifndef RAW_TYPES_H
2 #define RAW_TYPES_H
3 
4 #include <limits> // std::numeric_limits<>
5 
6 namespace raw{
7 
8  typedef enum _compress {
9  kNone, ///< no compression
10  kHuffman, ///< Huffman Encoding
11  kZeroSuppression, ///< Zero Suppression algorithm
12  kZeroHuffman, ///< Zero Suppression followed by Huffman Encoding
13  kDynamicDec, ///< Dynamic decimation
14  kFibonacci ///< Fibonacci encoding
15  } Compress_t;
16 
17  typedef enum _auxdettype {
18  kUnknownAuxDet, ///< no idea
19  kScintillator, ///< Scintillator paddle
20  kTimeOfFlight, ///< Time of flight
21  kCherenkov ///< Cherenkov counter
22  } AuxDetType_t;
23 
24  /// Type representing a TDC tick
25  typedef int TDCtick_t;
26 
27  /// Type representing the ID of a readout channel
28  typedef unsigned int ChannelID_t;
29 
30  /// ID of an invalid channel
31  constexpr ChannelID_t InvalidChannelID
33 
34 
35  /// Returns whether the specified channel ID is valid
36  /// @note This does not mean that channel exists in the current geometry.
37  inline constexpr bool isValidChannelID(raw::ChannelID_t channel)
38  { return channel != InvalidChannelID; }
39 
40 } // namespace raw
41 
42 #endif
Huffman Encoding.
Definition: RawTypes.h:10
enum raw::_compress Compress_t
_compress
Definition: RawTypes.h:8
enum raw::_auxdettype AuxDetType_t
Zero Suppression followed by Huffman Encoding.
Definition: RawTypes.h:12
Raw data description.
Cherenkov counter.
Definition: RawTypes.h:21
uint8_t channel
Definition: CRTFragment.hh:201
Scintillator paddle.
Definition: RawTypes.h:19
no compression
Definition: RawTypes.h:9
int TDCtick_t
Type representing a TDC tick.
Definition: RawTypes.h:25
_auxdettype
Definition: RawTypes.h:17
Zero Suppression algorithm.
Definition: RawTypes.h:11
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:32
constexpr bool isValidChannelID(raw::ChannelID_t channel)
Definition: RawTypes.h:37
static int max(int a, int b)
Fibonacci encoding.
Definition: RawTypes.h:14
Time of flight.
Definition: RawTypes.h:20
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
Dynamic decimation.
Definition: RawTypes.h:13