static void __pause() { CDODISABLE(TIDPRIMARY,1,0); daLogMsg("INFO","Pause Executed"); if (__the_event__) WRITE_EVENT_; } /*end pause */
static void __pause() { CDODISABLE(TIPRIMARY,TIR_SOURCE,0); logMsg("INFO: Pause Executed\n",1,2,3,4,5,6); } /*end pause */
static void __end() { int ii, ievt, rem_count; int len, type, lock_key; DMANODE *outEvent; int oldnumber; int iwait=0; int blocksLeft=0; /* Disable Triggers */ #ifdef TID_MASTER tidDisableTriggerSource(1); #endif /* Before disconnecting... wait for blocks to be emptied */ blocksLeft=tidBReady(); if(blocksLeft) { printf("... end: Blocks left on the TID (%d)\n",blocksLeft); while(iwait < 100) { if(blocksLeft<=0) break; blocksLeft=tidBReady(); iwait++; } printf("... end: Blocks left on the TID (%d)\n",blocksLeft); } tidStatus(); tidIntDisable(); tidIntDisconnect(); /* Execute User defined end */ rocEnd(); CDODISABLE(TIDPRIMARY,1,0); /* we need to make sure all events taken by the VME are collected from the vmeOUT queue */ rem_count = getOutQueueCount(); if (rem_count > 0) { printf("tidprimary_list End: %d events left on vmeOUT queue (will now de-queue them)\n",rem_count); /* This wont work without a secondary readout list (will crash EB or hang the ROC) */ for(ii=0;ii<rem_count;ii++) { __poll(); } } else { printf("tidprimary_list End: vmeOUT queue Empty\n"); } daLogMsg("INFO","End Executed"); if (__the_event__) WRITE_EVENT_; } /* end end block */
static void __pause() { CDODISABLE(TEST,1,0); printf("INFO: User Pause 1 Executed\n"); return; }
static void __end() { int iwait=0; int blocksLeft=0; int id; tiSoftTrig(1,0,0x1123,1); CDODISABLE(TIPRIMARY,TIR_SOURCE,0); /* Before disconnecting... wait for blocks to be emptied */ vmeBusLock(); blocksLeft = tiBReady(); vmeBusUnlock(); printf(">>>>>>>>>>>>>>>>>>>>>>> %d blocks left on the TI\n",blocksLeft);fflush(stdout); if(blocksLeft) { printf(">>>>>>>>>>>>>>>>>>>>>>> before while ... %d blocks left on the TI\n",blocksLeft);fflush(stdout); while(iwait < 10) { taskDelay(10); if(blocksLeft <= 0) break; vmeBusLock(); blocksLeft = tiBReady(); printf(">>>>>>>>>>>>>>>>>>>>>>> inside while ... %d blocks left on the TI\n",blocksLeft);fflush(stdout); vmeBusUnlock(); iwait++; } printf(">>>>>>>>>>>>>>>>>>>>>>> after while ... %d blocks left on the TI\n",blocksLeft);fflush(stdout); } vmeBusLock(); tiStatus(1); vmeBusUnlock(); #ifdef EVENT_CYCLE //reset lms phase printf("INFO: trying to reset lms phase."); vmeBusLock(); lms_phase_change((6 + 1 - lms_phase)%6); vmeBusUnlock(); #endif printf("INFO: End1 Executed\n\n\n");fflush(stdout); return; }
static void __end() { int ii, total_count, rem_count; CDODISABLE(TEST,1,0); #ifdef USE_GEM printf("\n Read %d events\n\n",*(rol->nevents)); evClose(input_handle); #endif printf("INFO: User End 1 Executed\n"); return; }
static void __end() { int iwait=0; int blocksLeft=0; int id; printf("\n\nINFO: End1 Reached\n");fflush(stdout); CDODISABLE(TSPRIMARY,TIR_SOURCE,0); /* Before disconnecting... wait for blocks to be emptied */ vmeBusLock(); blocksLeft = tsBReady(); vmeBusUnlock(); printf(">>>>>>>>>>>>>>>>>>>>>>> %d blocks left on the TS\n",blocksLeft);fflush(stdout); if(blocksLeft) { printf(">>>>>>>>>>>>>>>>>>>>>>> before while ... %d blocks left on the TS\n",blocksLeft);fflush(stdout); while(iwait < 10) { taskDelay(10); if(blocksLeft <= 0) break; vmeBusLock(); blocksLeft = tsBReady(); printf(">>>>>>>>>>>>>>>>>>>>>>> inside while ... %d blocks left on the TS\n",blocksLeft);fflush(stdout); vmeBusUnlock(); iwait++; } printf(">>>>>>>>>>>>>>>>>>>>>>> after while ... %d blocks left on the TS\n",blocksLeft);fflush(stdout); } vmeBusLock(); tsStatus(1); vmeBusUnlock(); printf("INFO: End1 Executed\n\n\n");fflush(stdout); return; }