]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
Workaround for daq_anal: added trb3 trigger type to subevent header display
authorJörn Adamczewski-Musch <j.adamczewski@gsi.de>
Wed, 30 Apr 2014 14:07:13 +0000 (16:07 +0200)
committerJörn Adamczewski-Musch <j.adamczewski@gsi.de>
Wed, 30 Apr 2014 14:07:13 +0000 (16:07 +0200)
evtbuilder: enabled 24bit trigger number range again

hadaq/evtbuild.c
hadaq/showevt.c

index 36c53fc7b729a313e736637844c9b870d70d38c6..cd3e091d72b4cf0a05a71114e864a6076d999b97 100644 (file)
@@ -67,6 +67,8 @@ static RFILE *fRemote = NULL;
 /* 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 */
@@ -1279,10 +1281,15 @@ int main(int argc, char *argv[])
                        }
 
                        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) {
@@ -1313,8 +1320,10 @@ int main(int argc, char *argv[])
 
                        }
 
-                       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
@@ -1351,7 +1360,7 @@ int main(int argc, char *argv[])
                                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.
@@ -1571,13 +1580,37 @@ int main(int argc, char *argv[])
 
 
                                (*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)) {
index d67eb8611d3d7663955a4f987c6527dad9a6396f..1357c7236da7fd6b5525689d0afbcca1c0eb6177 100644 (file)
@@ -62,8 +62,8 @@ int analyseEvt(void *evt)
        /* 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 */