Page History
...
Defined in pdsdata/xtc/Damage.hh
, inline implementation.
Public Types:
Code Block |
---|
Bit Mask enum Value Name ----------------------------------- 1 0x00002 DroppedContribution 12 0x01000 OutOfOrder 13 0x02000 OutOfSynch 14 0x04000 UserDefined 15 0x08000 IncompleteContribution 16 0x10000 ContainsIncomplete Bit = n means 1<<n, i.e. 1 shifted left n bits: { DroppedContribution = 1, OutOfOrder = 12, OutOfSynch = 13, DecimalUserDefined Binary int32_t value = 1= 14, IncompleteContribution = 0000000000000000000000000000000115, ContainsIncomplete = 16 }; // reserve the top byte to augment user defined errors | enum {NotUserBitsMask=0x00FFFFFF, UserBitsShift = 24}; |
- DroppedContribution - means that event is "split" and contains only partial data from incomplete set of detectors. There may be another (or even few) datagram with the same timestamp containing remaining data from the same event.
- OutOfOrder - In this case the event may contain data from one or more detector which actually belong to a different event.
- OutOfSynch
- UserDefined - reserved for user-defined conditions
- IncompleteContribution - means that data in that particular container is badly damaged, are incomplete, and cannot be used
- ContainsIncomplete - means that it contains one or more containers at deeper XTC levels which have IncompleteContribution damage, events with this damage may be partially useful
Code Block |
---|
Bit Mask Name ----------------------------------- 1 0x00002 DroppedContribution 12 0x01000 OutOfOrder 13 0x02000 OutOfSynch 14 0x04000 UserDefined 15 0x08000 IncompleteContribution 16 0x10000 ContainsIncomplete Bit = n means 1<<n, i.e. 1 shifted left n bits: | | | DroppedContribution 00000000000000000000000000000010 OutOfOrder 00000000000000000001000000000000 OutOfSynch Decimal Binary int32_t value = 1 00000000000000000010000000000000 UserDefined 00000000000000000000000000000001 00000000000000000100000000000000 IncompleteContribution 00000000000000001000000000000000 ContainsIncomplete | 00000000000000010000000000000000 |
Public Types:
Code Block |
---|
enum Value| { DroppedContribution| = 1, | DroppedContribution OutOfOrder 00000000000000000000000000000010 OutOfOrder = 12, OutOfSynch 00000000000000000001000000000000 OutOfSynch = 13, UserDefined = 14,00000000000000000010000000000000 UserDefined IncompleteContribution = 15, ContainsIncomplete = 1600000000000000000100000000000000 IncompleteContribution }; // reserve the00000000000000001000000000000000 ContainsIncomplete top byte to augment user defined errors enum {NotUserBitsMask=0x00FFFFFF, UserBitsShift = 24};00000000000000010000000000000000 |
Public Member Functions:
Code Block |
---|
// Constructor Damage(uint32_t v) : _damage(v) {} uint32_t value() const { return _damage; } void increase(Damage::Value v) { _damage |= ((1<<v) & NotUserBitsMask); } void increase(uint32_t v) { _damage |= v & NotUserBitsMask; } uint32_t bits() const { return _damage & NotUserBitsMask;} uint32_t userBits() const { return _damage >> UserBitsShift; } void userBits(uint32_t v) { _damage &= NotUserBitsMask; _damage |= (v << UserBitsShift); } |
...
Overview
Content Tools