00001 #ifndef SCT_SCTAPI_TRIGGERIMPL_H
00002 #define SCT_SCTAPI_TRIGGERIMPL_H
00003
00008
00009 namespace SctApi {
00010 class TriggerImpl;
00011 };
00012
00013
00014 #include <boost/shared_ptr.hpp>
00015 #include "Trigger.h"
00016
00017
00018 namespace SctApi {
00019
00020 class TriggerImpl : public ::SctApi::Trigger {
00021 TriggerImpl &operator=(const TriggerImpl &);
00022 public:
00024 TriggerImpl();
00025
00026 TriggerImpl(const TriggerImpl &);
00027
00028 static boost::shared_ptr<TriggerImpl> clone(const boost::shared_ptr< ::SctApi::Trigger> other);
00029
00031 virtual ~TriggerImpl();
00032
00033 void singleL1A();
00034 void doubleL1A(short unsigned int delay);
00035 void delayedL1A(short unsigned int delay);
00036 void calL1A(short unsigned int delay);
00037 void pulseL1A(short unsigned int delay);
00038 void softL1A(short unsigned int delay);
00039 void softCalL1A(short unsigned int delay, short unsigned int delay2);
00040 void softPulseL1A(short unsigned int delay, short unsigned int delay2);
00041 void softBc(short unsigned int delay);
00042 void soft();
00043 void bc();
00044 void bcL1A(short unsigned int delay);
00045 void bcCalL1A(short unsigned int delay, short unsigned int delay2);
00046 void bcPulseL1A(short unsigned int delay, short unsigned int delay2);
00047
00048 void setCommIncr(unsigned short command, unsigned short incr);
00049 void getCommIncr(unsigned short &command, unsigned short &incr) const;
00050
00051 const RODTriggers getRODTriggers(int scan_point) const;
00052 const TIMTriggers getTIMTriggers(int scan_point) const;
00053
00054 virtual bool isValidRODTrigger() const;
00055 virtual bool isValidTIMTrigger() const;
00056 virtual bool timNeedsSequencer() const;
00057
00058
00061 virtual void clear();
00062
00063 virtual void addCommand(UINT16 first, UINT32 second);
00064
00065 virtual Source getSource() const;
00066 virtual void setSource(Source);
00067
00069 virtual void setFrequency(double freq);
00071 virtual double getFrequency() const;
00072
00073
00074 virtual int getRandom() const;
00075 virtual void setRandom(int);
00076
00077 std::string print() const;
00078 private:
00079
00080
00081
00082
00083
00084
00085 RODTriggers trigSequence;
00086
00088 int incCmd;
00089
00091 int incData;
00092
00093 Source m_source;
00094 double m_freq;
00095
00096 int m_random;
00097 };
00098
00099
00100 };
00101
00102 #endif