Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

SctApiImpl.h

00001 #ifndef SCTAPI_SCTAPIIMPL_H
00002 #define SCTAPI_SCTAPIIMPL_H
00003 
00004 #include <boost/shared_ptr.hpp>
00005 
00006 // Need complete types for public inheritence
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 softBc(short unsigned int delay);
00035   void bcL1A(short unsigned int delay);
00036   void bcCalL1A(short unsigned int delay, short unsigned int delay2);
00037   void bcPulseL1A(short unsigned int delay, short unsigned int delay2);
00038 
00039   void setCommIncr(unsigned short command, unsigned short incr);
00040   void getCommIncr(unsigned short &command, unsigned short &incr) const;
00041 
00042   const RODTriggers getRODTriggers() const;
00043 
00044 /*   void copy(const ::SctApi::Trigger &trig); */
00045 
00046   void print() const;
00047 private:
00048 //   /// Command values (max 6)
00049 //   TArrayS trigCommand;
00050 
00051 //   /// Data values (max 6)
00052 //   TArrayI trigData;
00053 
00054   RODTriggers trigSequence;
00055 
00057   int incCmd;
00058 
00060   int incData;
00061 };
00062 
00068 class ScanDefImpl : public ::SctApi::Scan {
00069   ScanDefImpl &operator=(const ScanDefImpl &);
00070 
00071  public:
00073   ScanDefImpl();
00074 
00075   ScanDefImpl(const ScanDefImpl &);
00076 
00077   static boost::shared_ptr<ScanDefImpl> clone(const boost::shared_ptr< ::SctApi::Scan> other);
00078 
00080   virtual ~ScanDefImpl();
00081 
00082 //   /// Print the scan
00083 //   void print() const;
00084 
00086   void configure(UINT16 type, FLOAT32 start, FLOAT32 stop, FLOAT32 step);
00087 
00089   void configure2(UINT16 type, FLOAT32 start, FLOAT32 stop, FLOAT32 step);
00090 
00091   const boost::shared_ptr< ::SctApi::Trigger> getTrigger1() const;
00092   const boost::shared_ptr< ::SctApi::Trigger> getTrigger2() const;
00093 
00094   boost::shared_ptr< ::SctApi::Trigger> getTrigger1();
00095   boost::shared_ptr< ::SctApi::Trigger> getTrigger2();
00096 
00097   void setTrigger1(boost::shared_ptr< ::SctApi::Trigger> trigger);
00098   void setTrigger2(boost::shared_ptr< ::SctApi::Trigger> trigger);
00099 
00100   void setScanVariable1(unsigned short var);
00101   void setScanVariable2(unsigned short var);
00102 
00103   unsigned short getScanVariable1() const;
00104   unsigned short getScanVariable2() const;
00105 
00106   void setNTrigs(unsigned long nTrigs);
00107   unsigned long getNTrigs() const;
00108 
00109   const TrigPoints getVariableTrigs() const;
00110   void setVariableTrigs(const TrigPoints &scans);
00111   void setVariableTrigRange(unsigned short start, unsigned short end, unsigned long value);
00112 
00113   const ScanPoints getScanPoints1() const;
00114   const ScanPoints getScanPoints2() const;
00115   void setScanPoints1(const ScanPoints &scans);
00116   void setScanPoints2(const ScanPoints &scans);
00117 
00118   int getOption(enum ScanOptions) const;
00119   void setOption(enum ScanOptions, int option);
00120 
00121 /*   void copy(const ::SctApi::Scan &scan); */
00122 
00123   void print() const;
00124 
00125   void setScanNumber(unsigned int scan);
00126   unsigned int getScanNumber() const;
00127   void setRunNumber(unsigned int scan);
00128   unsigned int getRunNumber() const;
00129 
00130   std::list<std::string> getModuleList(unsigned int group) const;
00131   void setModuleList(unsigned int group, std::list<std::string> newList);
00132   unsigned int getNGroups() const;
00133   void setNGroups(unsigned int val);
00134   
00135   virtual boost::posix_time::ptime getStartTime() const;
00136   virtual void setStartTime(boost::posix_time::ptime t);
00137   
00138   virtual boost::posix_time::ptime getEndTime() const;
00139   virtual void setEndTime(boost::posix_time::ptime t);  
00140   
00142   ScanPoints scanPoints;
00143 
00145   ScanPoints scanPoints2;
00146 
00148   TrigPoints trigPoints;
00149 
00151   bool allTrigsSame;
00152 
00153 private:
00154 
00156   int scanVariable;
00157 
00159   int scanVariable2;
00160 
00162   boost::shared_ptr<Trigger> trigSequence;
00163 
00165   boost::shared_ptr<Trigger> trigSequence2;
00166 
00168   int full;
00169 
00171   int bits32;
00172 
00174   int loopCalLine;
00175 
00177   int distSlave;
00178 
00180   int debug;
00181 
00183   int tim;
00184 
00186   int nth;
00187 
00189   int nth_rem;
00190 
00192   int enableDataMode;
00193 
00194   unsigned int scanNumber;
00195   unsigned int runNumber;
00196 
00197   std::vector<std::list<std::string> > groupLists;
00198   unsigned int m_maxGroup;
00199   
00200   boost::posix_time::ptime startTime;       
00201   boost::posix_time::ptime endTime;         
00202 };
00203 }
00204 
00205 #endif

Generated on Fri Jan 14 12:47:07 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5