00001 #ifndef CHARACTERIZATIONSEQUENCE_H
00002 #define CHARACTERIZATIONSEQUENCE_H
00003
00004 #include "../ipc/SequenceRequest.h"
00005 #include "../ipc/TestRequest.h"
00006 #include "../ipc/CalibrationController.h"
00007 #include "../ipc/TestLibrary.h"
00008 #include "../ipc/Sct_CalibrationController.hh"
00009 #include <iostream>
00010
00011 using namespace std;
00012
00013 namespace SctCalibrationController {
00014
00015 using namespace Ipc;
00016
00017 namespace Scripts {
00018
00019 class CharacterizationSequence : public SequenceRequestImpl {
00020 public:
00021 static CharacterizationSequence& instance() {
00022 static CharacterizationSequence cs;
00023 return cs;
00024 }
00025
00026 virtual string startSequence(Sct_SctApi_T_SctApi& api) {
00027 this->api = &api;
00028 return "CharacterizationSequence";
00029 }
00030
00031 virtual TestRequest* getNextTest(unsigned long index) {
00032 TestLibrary& tl = CalibrationControllerImpl::instance().getTestLibrary();
00033 switch (index) {
00034 case 0:
00035 return &tl.nmask();
00036 case 1:
00037 return &tl.fullBypass();
00038 case 2:
00039 return &tl.pipeline();
00040 case 3:
00041 return &tl.strobeDelay();
00042 case 4:
00043 return &tl.threePointGain();
00044 case 5:
00045 return &tl.responseCurve();
00046 case 6:
00047 return &tl.noiseOccupancy();
00048 case 7:
00049 return &tl.timeWalk();
00050 default:
00051 return 0;
00052 }
00053 }
00054
00055 virtual void endSequence() {
00056 api = 0;
00057 }
00058
00059 private:
00060 Sct_SctApi_T_SctApi* api;
00061 CharacterizationSequence() {}
00062 };
00063 }
00064 }
00065 #endif //CHARACTERIZATIONSEQUENCE_H