00001 .L testAsyncScan.cxx
00002
00003 {
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 tapi.timSetFrequency(10, 0.01);
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 tapi.changeRunMode(0);
00030
00031 TScanMonitor *monitor = testAsyncScan();
00032
00033 tapi.changeRunMode(0);
00034
00035
00036 tapi.timRegLoad(0x18, 0x603);
00037
00038 tapi.timRegLoad(0x18, 0x62f);
00039
00040
00041 tapi.timRegLoad(0x14, 0x4000);
00042
00043 #if 0
00044
00045 tapi.timRegLoad(0x16, 0x102);
00046
00047 writeRegister(0x203, 0, 8, 2);
00048
00049 writeRegister(0x203, 8, 8, 1);
00050
00051 writeRegister(0x202, 0, 3, 1);
00052 #endif
00053
00054 tapi.timSoftReset(0, 0);
00055 tapi.timBCReset(0, 0);
00056 tapi.sendTimBurst(1000, true);
00057 monitor->newBin(1000, 1);
00058 monitor->finishScan();
00059
00060 tapi.scanEvents(0);
00061 tapi.decodeEvent(0, 0, 6, 0, 1);
00062 printf("%x\n", 2987);
00063 tapi.changeRunMode(1);
00064 }