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