00001 #ifndef SCTAPI_SCTAPIIMPL_H
00002 #define SCTAPI_SCTAPIIMPL_H
00003
00004 #include <boost/shared_ptr.hpp>
00005
00006
00007 #include "SctApi.h"
00008
00009 namespace SctApi {
00013 class TriggerImpl : public ::SctApi::Trigger {
00014 TriggerImpl &operator=(const TriggerImpl &);
00015 public:
00017 TriggerImpl();
00018
00019 TriggerImpl(const TriggerImpl &);
00020
00021 static boost::shared_ptr<TriggerImpl> clone(const boost::shared_ptr< ::SctApi::Trigger> other);
00022
00024 virtual ~TriggerImpl();
00025
00026 void singleL1A();
00027 void doubleL1A(short unsigned int delay);
00028 void delayedL1A(short unsigned int delay);
00029 void calL1A(short unsigned int delay);
00030 void pulseL1A(short unsigned int delay);
00031 void softL1A(short unsigned int delay);
00032 void softCalL1A(short unsigned int delay, short unsigned int delay2);
00033 void softPulseL1A(short unsigned int delay, short unsigned int delay2);
00034 void bcL1A(short unsigned int delay);
00035 void bcCalL1A(short unsigned int delay, short unsigned int delay2);
00036 void bcPulseL1A(short unsigned int delay, short unsigned int delay2);
00037
00038 void setCommIncr(unsigned short command, unsigned short incr);
00039 void getCommIncr(unsigned short &command, unsigned short &incr) const;
00040
00041 const RODTriggers getRODTriggers() const;
00042
00043
00044
00045 void print() const;
00046 private:
00047
00048
00049
00050
00051
00052
00053 RODTriggers trigSequence;
00054
00056 int incCmd;
00057
00059 int incData;
00060 };
00061
00067 class ScanDefImpl : public ::SctApi::Scan {
00068 ScanDefImpl &operator=(const ScanDefImpl &);
00069
00070 public:
00072 ScanDefImpl();
00073
00074 ScanDefImpl(const ScanDefImpl &);
00075
00076 static boost::shared_ptr<ScanDefImpl> clone(const boost::shared_ptr< ::SctApi::Scan> other);
00077
00079 virtual ~ScanDefImpl();
00080
00081
00082
00083
00085 void configure(UINT16 type, FLOAT32 start, FLOAT32 stop, FLOAT32 step);
00086
00088 void configure2(UINT16 type, FLOAT32 start, FLOAT32 stop, FLOAT32 step);
00089
00090 const boost::shared_ptr< ::SctApi::Trigger> getTrigger1() const;
00091 const boost::shared_ptr< ::SctApi::Trigger> getTrigger2() const;
00092
00093 boost::shared_ptr< ::SctApi::Trigger> getTrigger1();
00094 boost::shared_ptr< ::SctApi::Trigger> getTrigger2();
00095
00096 void setTrigger1(boost::shared_ptr< ::SctApi::Trigger> trigger);
00097 void setTrigger2(boost::shared_ptr< ::SctApi::Trigger> trigger);
00098
00099 void setScanVariable1(unsigned short var);
00100 void setScanVariable2(unsigned short var);
00101
00102 unsigned short getScanVariable1() const;
00103 unsigned short getScanVariable2() const;
00104
00105 void setNTrigs(unsigned long nTrigs);
00106 unsigned long getNTrigs() const;
00107
00108 const TrigPoints getVariableTrigs() const;
00109 void setVariableTrigs(const TrigPoints &scans);
00110 void setVariableTrigRange(unsigned short start, unsigned short end, unsigned long value);
00111
00112 const ScanPoints getScanPoints1() const;
00113 const ScanPoints getScanPoints2() const;
00114 void setScanPoints1(const ScanPoints &scans);
00115 void setScanPoints2(const ScanPoints &scans);
00116
00117 int getOption(enum ScanOptions) const;
00118 void setOption(enum ScanOptions, int option);
00119
00120
00121
00122 void print() const;
00123
00124 void setScanNumber(unsigned int scan);
00125 unsigned int getScanNumber() const;
00126 void setRunNumber(unsigned int scan);
00127 unsigned int getRunNumber() const;
00128
00129 std::list<std::string> getModuleList(unsigned int group) const;
00130 void setModuleList(unsigned int group, std::list<std::string> newList);
00131 unsigned int getNGroups() const;
00132 void setNGroups(unsigned int val);
00133
00134 virtual boost::posix_time::ptime getStartTime() const;
00135 virtual void setStartTime(boost::posix_time::ptime t);
00136
00137 virtual boost::posix_time::ptime getEndTime() const;
00138 virtual void setEndTime(boost::posix_time::ptime t);
00139
00141 ScanPoints scanPoints;
00142
00144 ScanPoints scanPoints2;
00145
00147 TrigPoints trigPoints;
00148
00150 bool allTrigsSame;
00151
00152 private:
00153
00155 int scanVariable;
00156
00158 int scanVariable2;
00159
00161 boost::shared_ptr<Trigger> trigSequence;
00162
00164 boost::shared_ptr<Trigger> trigSequence2;
00165
00167 int full;
00168
00170 int bits32;
00171
00173 int loopCalLine;
00174
00176 int distSlave;
00177
00179 int debug;
00180
00182 int tim;
00183
00184 unsigned int scanNumber;
00185 unsigned int runNumber;
00186
00187 std::vector<std::list<std::string> > groupLists;
00188 unsigned int m_maxGroup;
00189
00190 boost::posix_time::ptime startTime;
00191 boost::posix_time::ptime endTime;
00192 };
00193 }
00194
00195 #endif