00001 #ifndef SCTCALIBRATIONCONTROLLER_RAWSCAN_H 00002 #define SCTCALIBRATIONCONTROLLER_RAWSCAN_H 00003 00004 #include "../ipc/Sct_CalibrationController.hh" 00005 #include "../CalibrationControllerImpl.h" 00006 #include "../SctApiAccessException.h" 00007 #include "../SctApiCall.h" 00008 #include "Sct/LogicErrors.h" 00009 00010 #include <CommonWithDsp/ABCD/ABCDscans.h> 00011 00012 using namespace Sct; 00013 using namespace SctCalibrationController::Ipc; 00014 namespace SctCalibrationController { 00015 namespace Scripts { 00016 00017 class RawScan : public ScanRequestImpl { 00018 public: 00019 static ScanRequestImpl& rawScan(unsigned long nTrigs) { 00020 static RawScan request; 00021 Sct_SctApi_T_SctApi* api = CalibrationControllerImpl::instance().getApi(); 00022 Sct_SctApi_T_Scan* s=0; 00023 APIRETCALL(api, s, createScan(&st), "Failed to create scan") 00024 request.setScan(s); 00025 00026 APICALL(s, setNTrigs(&st, nTrigs), "Failed to set triggers") 00027 request.setClockByTwo(false); 00028 00029 Sct_SctApi_T_Trigger* t = 0; 00030 APIRETCALL(s, t, getTrigger1(&st), "Failed to get Trigger1") 00031 00032 APICALL(s, configure(&st, 1, 0, 2, 1), "Failed to set Scan information") 00033 00034 APICALL(t, singleL1A(&st), "Failed to set trigger type") 00035 00036 return request; 00037 } 00038 00039 virtual ilu_Boolean isRaw(){ 00040 return true; 00041 } 00042 00043 virtual long delay(){ 00044 return 1; 00045 } 00046 00047 virtual ilu_Boolean configureModules(){ 00048 return true; 00049 } 00050 00051 private: 00052 RawScan(){;} 00053 }; 00054 00055 } 00056 } 00057 00058 #endif //SCTCALIBRATIONCONTROLLER_RAWSCAN_H