00001 /* 00002 This software is Copyright by the Board of Trustees of Michigan 00003 State University (c) Copyright 2005. 00004 00005 You may use this software under the terms of the GNU public license 00006 (GPL). The terms of this license are described at: 00007 00008 http://www.gnu.org/licenses/gpl.txt 00009 00010 Author: 00011 Ron Fox 00012 NSCL 00013 Michigan State University 00014 East Lansing, MI 48824-1321 00015 */ 00016 00018 // CCAENV977.h 00019 // Implementation of the Class CCAENV977 00020 // Created on: 07-Jun-2005 04:42:54 PM 00021 // Original author: Ron Fox 00023 00024 #if !defined(__CCAENV977_H) 00025 #define __CCAENV977_H 00026 00027 #ifndef __HISTOTYPES_H 00028 #include <histotypes.h> 00029 #endif 00030 00031 00032 // Forward definitions. 00033 00034 class CVmeModule; 00035 00057 class CCAENV977 00058 { 00059 private: 00063 CVmeModule& m_Module; 00064 00065 00066 // Constants with class scope: 00067 public: 00068 // bits in the test control register: 00069 00070 static const UShort_t test_Clear = 1; 00071 static const UShort_t test_Mask = 2; 00072 static const UShort_t test_OrMask = 4; 00073 static const UShort_t test_IrqMask = 8; 00074 static const UShort_t test_Read = 0x10; 00075 00076 // Bits in the module constrol register: 00077 00078 static const UShort_t control_Pattern = 1; 00079 static const UShort_t control_gateMask = 2; 00080 static const UShort_t control_OrMask = 4; 00081 00082 public: 00083 // Constructors and other canonical operations: 00084 00085 CCAENV977(ULong_t lBase, UShort_t nCrate = 0); 00086 virtual ~CCAENV977(); 00087 CCAENV977(const CCAENV977& rhs); 00088 CCAENV977& operator=(const CCAENV977& rhs); 00089 int operator==(const CCAENV977& rhs) const; 00090 int operator!=(const CCAENV977& rhs) const; 00091 00092 // Functions of the object itself: 00093 00094 UShort_t inputSet(); 00095 void inputSet(UShort_t value); 00096 UShort_t inputMask(); 00097 void inputMask(UShort_t mask); 00098 UShort_t inputRead(); 00099 UShort_t singleHitRead(); 00100 UShort_t multihitRead(); 00101 UShort_t outputSet(); 00102 void outputSet(UShort_t pattern); 00103 UShort_t outputMask(); 00104 void outputMask(UShort_t mask); 00105 UShort_t interruptMask(); 00106 void interruptMask(UShort_t mask); 00107 void outputClear(); 00108 UShort_t singleHitReadAndClear(); 00109 UShort_t multiHitReadAndClear(); 00110 UShort_t testControlRegister(); 00111 void testControlRegister(UShort_t mask); 00112 UShort_t serialNumber(); 00113 UShort_t firmwareLevel(); 00114 void controlRegister(UShort_t mask); 00115 UShort_t controlRegister(); 00116 void Reset(); 00117 00118 00119 }; 00120 00121 00122 #endif