TestTim.cxx

00001 #include <unistd.h>
00002 
00003 #include <iostream>
00004 using namespace std;
00005 
00006 #define USELIBRARY
00007 
00008 #include "../TApi.h"
00009 
00010 int main () {
00011   cout << "Create new TApi\n";
00012 
00013   TApi *tapi = new TApi();
00014 
00015   cout << "Initialise all\n";
00016   tapi->initialiseAll(0);
00017 
00018   tapi->timL1A();
00019   tapi->timCalL1A(99);
00020 
00021   // Set a relatively low frequency
00022   tapi->timSetFrequency(6, 6);
00023 
00024   cout << "Start free triggers for 10 seconds\n";
00025   tapi->freeTriggers();
00026 
00027   sleep(10);
00028 
00029   cout << "Stop free triggers\n";
00030   tapi->stopTriggers();
00031 
00032   sleep(2);
00033 
00034   cout << "Shutdown all\n";
00035   tapi->shutdownAll();
00036 
00037   cout << "Delete TApi\n";
00038   delete tapi;
00039 
00040   return 0;  
00041 }

Generated on Mon Feb 6 14:01:35 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6