00001 #ifndef __CCAENMODULE_H 00002 #define __CCAENMODULE_H 00003 // 00004 // Header files: 00005 #ifndef __CDIGITIZERMODULE_H 00006 #include "CDigitizerModule.h" 00007 #endif 00008 00009 #ifndef __SPECTRODAQ_H 00010 #include <spectrodaq.h> 00011 #endif 00012 00013 #ifndef __STL_STRING 00014 #include <string> 00015 #endif 00016 00017 // forward class definitions: 00018 00019 class CAENcard; 00020 class CTCLInterpreter; 00021 00057 class CCAENModule : public CDigitizerModule 00058 { 00059 private: 00060 CAENcard* m_pCAENcard; 00061 bool m_fMultiEvent; 00062 public: 00063 // Constructors: 00064 CCAENModule(const string& rCommand, 00065 CTCLInterpreter& rInterp); 00066 virtual ~CCAENModule(); 00067 private: 00068 CCAENModule(const CCAENModule& rhs); 00069 CCAENModule& operator= (const CCAENModule& rhs); 00070 int operator==(const CCAENModule& rhs); 00071 int operator!=(const CCAENModule& rhs); 00072 00073 // Selectors. The derived classes need to ensure that thes 00074 // are not returning consts... 00075 00076 public: 00077 CAENcard* getCard() { 00078 return m_pCAENcard; 00079 } 00080 bool isMultiEvent() const { 00081 return m_fMultiEvent; 00082 } 00083 00084 // Mutators.. 00085 protected: 00086 void setCard(CAENcard* pCard) { 00087 m_pCAENcard = pCard; 00088 } 00089 void setMultiEvent(bool on) { 00090 m_fMultiEvent = on; 00091 } 00092 // Class operations: 00093 00094 public: 00095 00096 virtual void Initialize (); 00097 virtual void Prepare (); 00098 virtual void Read (DAQWordBufferPtr& rBuffer); 00099 virtual int Read(void* pBuffer); 00100 virtual void Clear (); 00101 00102 00103 }; 00104 00105 #endif