00001 #ifndef NMASKSCAN_H 00002 #define NMASKSCAN_H 00003 00004 #include "../ipc/CalibrationController.hh" 00005 #include "../CalibrationControllerImpl.h" 00006 #include "../SctApiAccessException.h" 00007 #include "../SctApiCall.h" 00008 #include "Sct/LogicErrors.h" 00009 00010 #include <Sct/AbcdScans.h> 00011 00012 using namespace Sct; 00013 using namespace SctCalibrationController::Ipc; 00014 namespace SctCalibrationController { 00015 namespace Scripts { 00016 00019 class NMaskScan : public ScanRequestImpl { 00020 public: 00021 static ScanRequestImpl& nmaskScan(unsigned long nTrigs) { 00022 static NMaskScan request; 00023 Sct_SctApi::SctApiIPC_var api = CalibrationControllerImpl::instance()->getApi(); 00024 Sct_SctApi::Scan_var s; 00025 APIRETCALL(api, s, createScan(), "Failed to create scan") 00026 request.setScanNice(s); 00027 00028 APICALL(s, setNTrigs(nTrigs), "Failed to set triggers") 00029 00030 Sct_SctApi::Trigger_var t; 00031 APIRETCALL(s, t, getTrigger1(), "Failed to get Trigger1") 00032 00033 APICALL(t, singleL1A(), "Failed to set trigger type") 00034 00035 APICALL(s, configure(ST_NMASK, 0, 128, 1), "Failed to set Scan information") 00036 return request; 00037 } 00038 00039 private: 00040 NMaskScan(){;} 00041 }; 00042 00043 } 00044 } 00045 00046 #endif //NMASKSCAN_H