From Bruce:
First run tapi.
1) From the SBC, run one of the setup scripts with tapi in it's name (the
main difference is it needs SCTDAQ_CONFIGURATION_PATH as a real env
variable instead of in the configuration).
2) go to $SCT_DAQ_ROOT/SctApi/macros and run root
3) If nothing much happened do ".X init.cxx"
4) Make sure the histograms get saved:
tapi.setDebugOption("save_histogram");
Set up the scan:
1) Have a look through testAsyncScan.cxx and see if it looks OK.
The only important things are:
a) TScanDef noise; // Create a scan
b) noise.tim = 1; // Set up the traps for external triggers
c) noise.nth = 15; // Don't histogram everything
d) TScanMonitor *monitor = tapi.startAsyncScan(noise);
2) Load it .L testAsyncScan.cxx
3) TScanMonitor *monitor = testAsyncScan();
4) You may need a tapi.changeRunMode(0);
5) Do the necessary TIM setup with things like:
tapi.timRegLoad(0x18, 0x603);
6) Setup the ROD with things like: (first do .L Functs.cxx)
writeRegister(0x1a4, 24, 8, 0xfb);
Wait for triggers to come through.
On the first trigger there's a text message with "LOCAL" in it somewhere.
Change to a new bin with:
monitor->newBin(1000, 1);
Wait for more triggers
Read out the histogram:
monitor->finishScan();
.X DispHistogram("PATH to histogram which is printed out in the text somewhere")