NSCL DDAS
1.0
Support for XIA DDAS at the NSCL
Main Page
User Guides
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Macros
Pages
ddasdumper
ddaschannel.h
1
/* ddaschannel class definition header file */
2
3
#ifndef DDASCHANNEL_H
4
#define DDASCHANNEL_H
5
6
#include <vector>
7
#include <stdint.h>
8
#include "TObject.h"
9
10
namespace
DAQ {
11
namespace
DDAS {
12
class
DDASHit;
13
}
14
}
15
41
class
ddaschannel
:
public
TObject {
42
public
:
43
44
/********** Variables **********/
45
46
// ordering is important with regards to access and file size. Should
47
// always try to maintain order from largest to smallest data type
48
// Double_t, Int_t, Short_t, Bool_t, pointers
49
50
/* Channel events always have the following info. */
51
Double_t
time
;
52
Double_t
coarsetime
;
53
Double_t
cfd
;
54
55
UInt_t
energy
;
56
UInt_t
timehigh
;
57
UInt_t
timelow
;
58
UInt_t
timecfd
;
59
60
Int_t
channelnum
;
61
Int_t
finishcode
;
62
Int_t
channellength
;
63
Int_t
channelheaderlength
;
64
Int_t
overflowcode
;
65
Int_t
chanid
;
66
Int_t
slotid
;
67
Int_t
crateid
;
68
Int_t
id
;
69
70
Int_t
cfdtrigsourcebit
;
71
Int_t
cfdfailbit
;
72
73
Int_t
tracelength
;
74
75
Int_t
ModMSPS
;
76
77
/* A channel may have extra information... */
78
std::vector<UInt_t>
energySums
;
79
std::vector<UInt_t>
qdcSums
;
80
81
/* A waveform (trace) may be stored too. */
82
std::vector<UShort_t>
trace
;
83
84
Double_t
externalTimestamp
;
85
86
// Canonicals
87
92
ddaschannel
();
93
94
96
ddaschannel
(
const
ddaschannel
& obj);
97
99
ddaschannel
&
operator=
(
const
ddaschannel
& obj);
100
117
ddaschannel
&
operator=
(
DAQ::DDAS::DDASHit
& hit);
118
120
~ddaschannel
();
121
135
void
UnpackChannelData
(
const
uint32_t *data);
136
142
void
Reset
();
143
145
147
UInt_t
GetEnergy
() {
return
energy
;}
148
150
UInt_t
GetTimeHigh
() {
return
timehigh
;}
151
153
UInt_t
GetTimeLow
() {
return
timelow
;}
154
156
UInt_t
GetCFDTime
() {
return
timecfd
;}
157
181
Double_t
GetTime
() {
return
time
;}
182
184
Double_t
GetCoarseTime
() {
return
coarsetime
;}
185
187
Double_t
GetCFD
() {
return
cfd
;}
188
196
UInt_t
GetEnergySums
(Int_t i) {
return
energySums
[i];}
197
199
Int_t
GetChannelNum
() {
return
channelnum
;}
200
205
Int_t
GetFinishCode
() {
return
finishcode
;}
206
212
Int_t
GetChannelLength
() {
return
channellength
;}
213
215
Int_t
GetChannelLengthHeader
() {
return
channelheaderlength
;}
216
218
Int_t
GetOverflowCode
() {
return
overflowcode
;}
219
221
Int_t
GetSlotID
() {
return
slotid
;}
222
224
Int_t
GetCrateID
() {
return
crateid
;}
225
227
Int_t
GetChannelID
() {
return
chanid
;}
228
230
Int_t
GetID
() {
return
id
;}
231
233
Int_t
GetModMSPS
() {
return
ModMSPS
;}
234
236
std::vector<UShort_t>
GetTrace
() {
return
trace
;}
237
238
ClassDef(
ddaschannel
, 4)
239
};
240
241
#endif
Generated on Mon Aug 1 2016 11:33:25 for NSCL DDAS by
1.8.1.2