AdcTypes.h
Go to the documentation of this file.
1 // AdcTypes.h
2 
3 // David Adams
4 // December 2015
5 //
6 // Integer and floating type for Adc signals.
7 
8 #ifndef AdcTypes_H
9 #define AdcTypes_H
10 
11 #include <vector>
12 #include <utility>
13 
14 typedef int AdcInt;
15 typedef unsigned int AdcIndex;
16 typedef unsigned long AdcLongIndex;
17 
18 typedef short AdcCount;
19 typedef std::vector<AdcCount> AdcCountVector;
20 
21 typedef float AdcSignal;
22 typedef std::vector<AdcSignal> AdcSignalVector;
23 typedef std::vector<AdcSignalVector> AdcSignalVectorVector;
24 
25 typedef float AdcPedestal;
26 
27 typedef std::vector<bool> AdcFilterVector;
28 
29 typedef short AdcFlag;
30 typedef std::vector<AdcFlag> AdcFlagVector;
31 
32 const AdcFlag AdcGood = 0; // ADC sample is fine
33 const AdcFlag AdcUnderflow = 1; // ADC sample is underflow
34 const AdcFlag AdcOverflow = 2; // ADC sample is overflow
35 const AdcFlag AdcStuck = 8; // ADC sample is sticky unspecified
36 const AdcFlag AdcStuckOff = 9; // ADC sample is sticky with low bits at 0
37 const AdcFlag AdcStuckOn = 10; // ADC sample is sticky with low bits at 1
38 const AdcFlag AdcStuckPed = 11; // ADC sample is sticky code near pedestal
39 const AdcFlag AdcStuckSig = 12; // ADC sample is sticky code away from pedestal
40 const AdcFlag AdcMitigated = 16; // ADC sample is mitigated unspecified
41 const AdcFlag AdcSetFixed = 17; // ADC sample is mitigated with set to a fixed value
42 const AdcFlag AdcInterpolated = 18; // ADC sample is mitigated with interpolation
43 const AdcFlag AdcExtrapolated = 19; // ADC sample is mitigated with extrapolation
44 
49 
50 typedef unsigned int AdcChannel;
51 typedef std::vector<AdcChannel> AdcChannelVector;
52 
53 // A ROI includes all ticks from roi.first through roi.second.
54 typedef std::pair<AdcIndex, AdcIndex> AdcRoi;
55 typedef std::vector<AdcRoi> AdcRoiVector;
56 
57 #endif
const AdcIndex AdcChannelStatusNoisy
Definition: AdcTypes.h:48
short AdcCount
Definition: AdcTypes.h:18
const AdcFlag AdcOverflow
Definition: AdcTypes.h:34
const AdcFlag AdcGood
Definition: AdcTypes.h:32
std::vector< AdcFlag > AdcFlagVector
Definition: AdcTypes.h:30
unsigned long AdcLongIndex
Definition: AdcTypes.h:16
const AdcFlag AdcStuckSig
Definition: AdcTypes.h:39
unsigned int AdcIndex
Definition: AdcTypes.h:15
const AdcFlag AdcUnderflow
Definition: AdcTypes.h:33
const AdcFlag AdcStuckOn
Definition: AdcTypes.h:37
std::vector< AdcSignal > AdcSignalVector
Definition: AdcTypes.h:22
const AdcIndex AdcChannelStatusUnknown
Definition: AdcTypes.h:45
float AdcPedestal
Definition: AdcTypes.h:25
float AdcSignal
Definition: AdcTypes.h:21
std::vector< bool > AdcFilterVector
Definition: AdcTypes.h:27
const AdcFlag AdcMitigated
Definition: AdcTypes.h:40
const AdcFlag AdcExtrapolated
Definition: AdcTypes.h:43
short AdcFlag
Definition: AdcTypes.h:29
const AdcIndex AdcChannelStatusBad
Definition: AdcTypes.h:47
const AdcFlag AdcStuckPed
Definition: AdcTypes.h:38
const AdcFlag AdcSetFixed
Definition: AdcTypes.h:41
std::vector< AdcCount > AdcCountVector
Definition: AdcTypes.h:19
const AdcFlag AdcStuck
Definition: AdcTypes.h:35
std::vector< AdcSignalVector > AdcSignalVectorVector
Definition: AdcTypes.h:23
const AdcIndex AdcChannelStatusGood
Definition: AdcTypes.h:46
const AdcFlag AdcInterpolated
Definition: AdcTypes.h:42
std::pair< AdcIndex, AdcIndex > AdcRoi
Definition: AdcTypes.h:54
std::vector< AdcRoi > AdcRoiVector
Definition: AdcTypes.h:55
std::vector< AdcChannel > AdcChannelVector
Definition: AdcTypes.h:51
const AdcFlag AdcStuckOff
Definition: AdcTypes.h:36
unsigned int AdcChannel
Definition: AdcTypes.h:50
int AdcInt
Definition: AdcTypes.h:14