Changeset 10924
- Timestamp:
- 06/07/11 22:19:53 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/HeadersFAD.h
r10832 r10924 2 2 #define FACT_HeadersFAD 3 3 4 #ifdef __cplusplus 4 5 #include <ostream> 5 6 … … 13 14 namespace FAD 14 15 { 16 #endif 15 17 enum Enable 16 18 { … … 31 33 enum Commands 32 34 { 33 kCmdWrite = 0x0500, // write to Config-RAM 34 kCmdWriteRoi = kCmdWrite|0x00, // Baseaddress ROI-Values 35 kCmdWriteDac = kCmdWrite|0x24, // Baseaddress DAC-Values 36 37 kCmdWriteRate = kCmdWrite|0x2c, // Continous trigger rate 38 kCmdWriteRunNumber = kCmdWrite|0x2d, // 35 kCmdWrite = 0x0500, // write to Config-RAM 36 kCmdWriteRoi = kCmdWrite|0x00, // Baseaddress ROI-Values 37 kCmdWriteDac = kCmdWrite|0x24, // Baseaddress DAC-Values 38 39 kCmdWriteRate = kCmdWrite|0x2c, // Continous trigger rate 40 kCmdWriteRunNumberMSW = kCmdWrite|0x2d, // Run Number most significant word 41 kCmdWriteRunNumberLSW = kCmdWrite|0x2e, // Run Number least significant word 39 42 40 43 /* … … 71 74 enum 72 75 { 73 kMaxRegAddr = 0xff, // Highest address in config-ram 74 kMaxRegValue = 0xffff, 75 kMaxDacAddr = kNumDac-1, 76 kMaxDacValue = 0xffff, 77 kMaxRoiAddr = kNumChannels-1, 78 kMaxRoiValue = kMaxBins, 76 kMaxRegAddr = 0xff, // Highest address in config-ram 77 kMaxRegValue = 0xffff, 78 kMaxDacAddr = kNumDac-1, 79 kMaxDacValue = 0xffff, 80 kMaxRoiAddr = kNumChannels-1, 81 kMaxRoiValue = kMaxBins, 82 kMaxRunNumber = 0xffffffff, 79 83 }; 80 84 … … 89 93 struct EventHeader 90 94 { 95 #ifdef __cplusplus 91 96 enum Bits 92 97 { … … 99 104 kSpiSclk = 1<< 5, 100 105 }; 101 106 #endif 102 107 // Einmalig: (new header changes entry in array --> send only if array changed) 103 108 // ---------------------------------- … … 173 178 uint16_t fDac[kNumDac]; 174 179 // 175 180 #ifdef __cplusplus 176 181 EventHeader() { init(*this); } 177 182 … … 260 265 void clear() { reset(*this); } 261 266 void print(std::ostream &out) const; 267 #endif 262 268 263 269 } __attribute__((__packed__)); … … 271 277 // uint16_t fData[]; 272 278 279 #ifdef __cplusplus 273 280 ChannelHeader() { init(*this); } 274 281 … … 289 296 uint16_t Chip() const { return fId>>4; } 290 297 uint16_t Channel() const { return fId&0xf; } 291 298 #endif 292 299 } __attribute__((__packed__)); 293 300 … … 386 393 */ 387 394 // -------------------------------------------------------------------- 388 395 #ifdef __cplusplus 389 396 inline std::ostream &operator<<(std::ostream &out, const EventHeader &h) 390 397 { … … 398 405 return out; 399 406 } 407 #endif 408 409 #ifdef __cplusplus 400 410 }; 401 402 #endif 411 #endif 412 413 #endif
Note:
See TracChangeset
for help on using the changeset viewer.