Changeset 10551 for trunk/FACT++/src
- Timestamp:
- 05/04/11 09:51:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/HeadersFTM.h
r10535 r10551 313 313 StaticDataBoard fBoard[4][10]; // 4 crates * 10 boards 314 314 315 uint16_t fActiveFTU[4]; 315 uint16_t fActiveFTU[4]; // 4 crates * 10 bits 316 316 317 317 StaticData() { init(*this); } … … 332 332 StaticDataBoard &operator[](int i) { return fBoard[i/10][i%10]; } 333 333 const StaticDataBoard &operator[](int i) const { return fBoard[i/10][i%10]; } 334 335 void EnableFTU(int i) { fActiveFTU[i/10] |= (1<<(i%10)); } 336 void DisableFTU(int i) { fActiveFTU[i/10] &= ~(1<<(i%10)); } 337 338 void EnableAllFTU() { for (int i=0; i<4; i++) fActiveFTU[i] = 0x3ff; } 339 void DisableAllFTU() { for (int i=0; i<4; i++) fActiveFTU[i] = 0; } 334 340 335 341 } __attribute__((__packed__)); … … 377 383 bool HasTimeMarker() const { return fGeneralSettings & StaticData::kTimeMarker; } 378 384 379 bool IsActive(int i) const { return fActiveFTU&( 1<<i); }385 bool IsActive(int i) const { return fActiveFTU&(uint64_t(1)<<i); } 380 386 bool IsEnabled(int i) const { return fEnable[i/16]&(1<<(i%16)); } 381 387 … … 386 392 fGeneralSettings(d.fGeneralSettings), 387 393 fStatusLEDs(d.fStatusLEDs), 388 fActiveFTU(d.fActiveFTU[0] | (d.fActiveFTU[1]<<10) | (d.fActiveFTU[2]<<20) | (d.fActiveFTU[3]<<30)), 394 fActiveFTU( uint64_t(d.fActiveFTU[0]) | 395 (uint64_t(d.fActiveFTU[1])<<10) | 396 (uint64_t(d.fActiveFTU[2])<<20) | 397 (uint64_t(d.fActiveFTU[3])<<30)), 389 398 fTriggerInterval(d.fTriggerInterval*4+8), 390 399 fTriggerSeqLP1((d.fTriggerSequence)&0x1f),
Note:
See TracChangeset
for help on using the changeset viewer.