/* switch on output of trigger types by this:*/
/*#define TRIGTYPE_DEBUG 1*/
+/* logoutput of triggertypes for all discarded events*/
+/*#define LOSTTRIGTYPEDEBUG 1 */
#define NEVTIDS 64UL /* must be 2^n */
#define NEVTIDS_IN_FILE 0UL /* must be 2^n */
}
if (i == 0) {
- currTrigNr = (SubEvt_trigNr(subEvt) >> 8) & 0xfffff;
- /* JAM: use only 20 bit as workaround for TRB2/3 differences*/
+
+ currTrigNr = (SubEvt_trigNr(subEvt) >> 8);
+
+/* currTrigNr = (SubEvt_trigNr(subEvt) >> 8) & 0xfffff;*/
+ /* JAM: use only 20 bit as workaround for TRB2/3 differences */
currTrigTag = SubEvt_trigNr(subEvt) & 0xff;
+
+
if (theArgs->evtId != 0)
currId = theArgs->evtId;
else if (theArgs->subsysId != 0) {
}
- trigNr = (SubEvt_trigNr(subEvt) >> 8) & 0xfffff;
- /* JAM: use only 20 bit as workaround for TRB2/3 differences*/
+ trigNr = (SubEvt_trigNr(subEvt) >> 8);
+
+/* trigNr = (SubEvt_trigNr(subEvt) >> 8) & 0xffffff; */
+ /* JAM: use only 32 bit as workaround for TRB2/3 differences*/
trigTag = SubEvt_trigNr(subEvt) & 0xff;
#ifdef TRIGNO_DEBUG
step = 0;
popCnt++;
if (popCnt >= LOST_SUBEVT_LIMIT) {
- /*if (theArgs->debugOptsCnt)
+ /* if (theArgs->debugOptsCnt)
Debug_printPopTrigMismatch(theArgs, theStats, theDebug, i);
*/
/* JAM: do not bail out immediately, but display problem message first.
(*theStats->evtsDiscarded) += delta;
- /*sprintf(msglog, "<I> Discarded %d events at TrigNr: 0x%06x", currTrigNr - lastTrigNr, currTrigNr);
- storeLogInfo(theArgs, msglog); */
- lastTrigNr = 0;
+
+#ifdef LOSTTRIGTYPEDEBUG
+ if ((currId & 0xF)==0xE)
+ {
+ sprintf(msglog, "<I> Discarded %d events before TrigNr: 0x%06x with trigger type 0x%x, last subevent input:%d", currTrigNr - lastTrigNr, currTrigNr,
+ (currId & 0xF),i);
+ storeLogInfo(theArgs, msglog);
+ }
+#endif
+
+ lastTrigNr = 0;
+
+
+
+
} else {
/*sprintf(msglog, "<W> Found No valid last trigger nr at TrigNr: 0x%06x", currTrigNr);
storeLogInfo(theArgs, msglog); */
(*theStats->evtsDiscarded)++;
+
+#ifdef LOSTTRIGTYPEDEBUG
+ if ((currId & 0xF)==0xE)
+ {
+ sprintf(msglog, "<I> Discarded 1 event at TrigNr: 0x%06x with trigger type 0x%x, last subevent input:%d",currTrigNr,
+ (currId & 0xF),i);
+ storeLogInfo(theArgs, msglog);
+ }
+#endif
+
+
+
}
/* Check if triger mismatch is large enough to exit */
if (isMismatchCritical(theArgs, theStats)) {
/* loop over all subevents */
for (subEvt = Evt_data(evt); subEvt < Evt_end(evt); subEvt = Evt_next(evt, subEvt)) {
if (!ourArgs->noPrint) {
- printf("size: 0x%08x decoding: 0x%08x id: 0x%08x trigNr: 0x%08x\n",
- SubEvt_size(subEvt), SubEvt_decoding(subEvt), SubEvt_id(subEvt), SubEvt_trigNr(subEvt));
+ printf("size: 0x%08x decoding: 0x%08x id: 0x%08x trigNr: 0x%08x trigTypeTRB3: 0x%01x\n",
+ SubEvt_size(subEvt), SubEvt_decoding(subEvt), SubEvt_id(subEvt), SubEvt_trigNr(subEvt), SubEvt_trigType_trb3(subEvt));
if (SubEvt_decoding(subEvt) == SubEvtDecoding_32bitData) {
for (i = 0; i < SubEvt_dataSize(subEvt) / sizeof(uint32_t); i++) {
if (i % 4 == 0) { /* newline and the offset in the subEvt */