#include <RawQieDigit.h>
Inheritance diagram for RawQieDigit:

Public Types | |
| enum | EQieErrorCode { kParityError = BIT(0), kCapIdError = BIT(1), kMisCountError = BIT(2), kPriorityTruncate = BIT(3), kCapIdSameMenuError = BIT(4), kCapIdSharedMinderError = BIT(5), kTransferSharedMinderError = BIT(6) } |
| enum | EQieDataTypes { kPedestal = 0, kCurrentInjection = 1, kDiagnosticData = 2, kTCal = 3, kSGate = 4, kDynode = 5, kLiFlasher = 6, kExternalTrigger = 7 } |
Public Member Functions | |
| RawQieDigit () | |
| RawQieDigit (const Int_t *&p, const RawDigitCrateStatus *cstat) | |
| virtual | ~RawQieDigit () |
Static Public Member Functions | |
| const Char_t * | AsString (EQieErrorCode errcode) |
| const Char_t * | AsString (EQieDataTypes dtype) |
Protected Member Functions | |
| void | SetCapIdSameMenuError () |
| void | SetCapIdSharedMinderError () |
| void | SetTransferSharedMinderError () |
Friends | |
| class | RawDigitDataBlock |
|
|
Definition at line 48 of file RawQieDigit.h. 00048 {
00049 // interpretation of DataTypes
00050 kPedestal = 0, // (VME trigger)
00051 kCurrentInjection = 1, // (VME trigger)
00052 kDiagnosticData = 2, // (VME trigger)
00053 kTCal = 3,
00054 kSGate = 4, // (spill mode)
00055 kDynode = 5,
00056 kLiFlasher = 6,
00057 kExternalTrigger = 7 // (i.e. CalDet TOF)
00058 };
|
|
|
Definition at line 25 of file RawQieDigit.h. 00025 {
00026 // interpretation of ErrorCode bits
00027 kParityError = BIT(0), // 0x01
00028 kCapIdError = BIT(1), // 0x02
00029 // miscount includes:
00030 // word count not mod(16)
00031 // 2 data xfer headers before a trailer
00032 // buffer overflow (only written on the last word of the buffer)
00033 kMisCountError = BIT(2), // 0x04
00034 // PriorityTruncate indicates that this was the last
00035 // bucket read out before readout was aborted by
00036 // a higher-priority data type. (See EQieDataTypes, below).
00037 kPriorityTruncate = BIT(3), // 0x08
00038 // CapIdSameMenuError / CapIdSharedMinderError indicates that
00039 // this digit was in the same menu / minder as another with the CapIdError
00040 kCapIdSameMenuError = BIT(4), // 0x10
00041 kCapIdSharedMinderError = BIT(5), // 0x20
00042 // TransferSharedMinderError indicates that this digit was in the same
00043 // minder as another with either ParityError or MisCountError.
00044 kTransferSharedMinderError = BIT(6) // 0x40
00045 };
|
|
|
Definition at line 74 of file RawQieDigit.h. 00074 : RawDigit() { ; }
|
|
||||||||||||
|
Definition at line 21 of file RawQieDigit.cxx. 00022 {
00023 // this is where the sub-block is actually unpacked
00024 // to fill the fields
00025 // Note the error bit in the middle of the channel address - NJT
00026 //
00027 // 3 2 1 0
00028 // 10987654321098765432109876543210
00029 // gggggMMMemmmm g=geoAddr, M=masterChan, m=minderChan
00030 // U: eeecccccccceccccaaaaaaaaaaaaaaaa e=err, c=chan, a=adc
00031 // L: dddxxttttttttttttttttttttttttttt d=datatype x=unused, t=tdc
00032 // X: PlexStripEndId::fEncoded
00033
00034 const int errshift = 29;
00035 const int errmask = 0x00000007;
00036 const int errshift2 = 16;
00037 const int errmask2 = 0x00000010;
00038 const int chanshift = 16;
00039 const int chanmask = 0x00001fef; // Note hole in bit 4
00040 const int adcmask = 0x0000ffff;
00041 const int tdcmask = 0x07ffffff;
00042 const int dtshift = 29;
00043 const int dtmask = 0x00000007;
00044
00045 // ADC = FLSDigit.RawA|B * 60 : max RawX = (2^17-1)/60 = 2184.5pe
00046 // TDC = FLSDigit.TdcA|B * 10 : max TdcX = (2^28-1)/10 = 26.8msec
00047
00048 Int_t chadd = ( p[0] >> chanshift) & chanmask;
00049 BuildRawChannelId(cstat,chadd);
00050
00051 // Error code has the extra bit added.
00052 fErrorCode = ( p[0] >> errshift) & errmask;
00053 if(( p[0] >> errshift2) & errmask2) fErrorCode |= kPriorityTruncate;
00054
00055 fAdc = p[0] & adcmask;
00056 fTdc = p[1] & tdcmask;
00057 fDataType = ( p[1] >> dtshift) & dtmask;
00058
00059 #ifdef RWHDEBUG
00060 printf("RawQieDigit::(Unpack from chunk) RCId %s\n ADC %5d TDC %6d\n",
00061 fRawChannelId.AsString(""),
00062 fAdc,fTdc);
00063 #endif
00064
00065 // processing eat up 2 words
00066 p += 2;
00067 }
|
|
|
Definition at line 75 of file RawQieDigit.h. 00075 { ; }
|
|
|
Definition at line 106 of file RawQieDigit.cxx. References kCurrentInjection, kDiagnosticData, kDynode, kExternalTrigger, kLiFlasher, kPedestal, kSGate, and kTCal. 00107 {
00108 switch (dtype) {
00109 case kPedestal: return "Pedestal"; break;
00110 case kCurrentInjection: return "Current Injection"; break;
00111 case kDiagnosticData: return "Diagnostic Data"; break;
00112 case kTCal: return "TCal"; break;
00113 case kSGate: return "SGate"; break;
00114 case kDynode: return "Dynode"; break;
00115 case kLiFlasher: return "LI Flasher"; break;
00116 case kExternalTrigger: return "External Trigger"; break;
00117 default: return "Unknown QIE Data Type"; break;
00118 }
00119 }
|
|
|
Definition at line 91 of file RawQieDigit.cxx. References kCapIdError, kCapIdSameMenuError, kCapIdSharedMinderError, kMisCountError, kParityError, kPriorityTruncate, and kTransferSharedMinderError. Referenced by RawQieErrorStatsBlock::FormatToOStream(), RawDigitDataBlock::PostFillRawDigits(), and FiltSGateModule::ProcessDigitDataBlks(). 00092 {
00093 switch (errcode) {
00094 case kParityError: return "Parity Error"; break;
00095 case kCapIdError: return "CapId Error"; break;
00096 case kMisCountError: return "MisCount Error"; break;
00097 case kPriorityTruncate: return "PriorityTuncate Error"; break;
00098 case kCapIdSameMenuError: return "CapId Error in Same Menu Warning"; break;
00099 case kCapIdSharedMinderError: return "CapId Error in Same Minder Warning"; break;
00100 case kTransferSharedMinderError: return "Transfer Error in Same Minder Warning"; break;
00101 default: return "Unknown QIE Error Code"; break;
00102 }
00103 }
|
|
|
Definition at line 70 of file RawQieDigit.cxx. Referenced by RawDigitDataBlock::PostFillRawDigits(). 00071 {
00072 // Set error flag due to CapIdError in the same menu
00073 fErrorCode |= RawQieDigit::kCapIdSameMenuError;
00074 }
|
|
|
Definition at line 77 of file RawQieDigit.cxx. Referenced by RawDigitDataBlock::PostFillRawDigits(). 00078 {
00079 // Set error flag due to CapIdError in the same minder
00080 fErrorCode |= RawQieDigit::kCapIdSharedMinderError;
00081 }
|
|
|
Definition at line 84 of file RawQieDigit.cxx. Referenced by RawDigitDataBlock::PostFillRawDigits(). 00085 {
00086 // Set error flag due to Parity/MisCountError in the same minder
00087 fErrorCode |= RawQieDigit::kTransferSharedMinderError;
00088 }
|
|
|
Definition at line 64 of file RawQieDigit.h. |
1.3.9.1