Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   Related Pages  

/var/pcce/usera/hill/rcc_1.2/RodDaq/RodCrate/RodPrimitive.h

Go to the documentation of this file.
00001 // File: RodPrimitive.h
00002 
00003 #ifndef SCTPIXELROD_RODPRIMITIVE_H
00004 #define SCTPIXELROD_RODPRIMITIVE_H
00005 
00006 /*! 
00007  * @class RodPrimitive  
00008  *
00009  * @brief This is a class for primtives which control ROD execution.
00010  *
00011  * This class contains the primitives which are sent as a list to the RODs. They control 
00012  * almost all aspects of the ROD DSP behavior. New primitives can be defined to perform
00013  * user-defined actions, but corresponding DSP code must also be written, compiled and
00014  * loaded into the DSPs before the primitive can be executed.
00015  *
00016  * @author Tom Meyer (meyer@iastate.edu) - originator
00017  */
00018 
00019 namespace SctPixelRod {
00020 
00021 class RodPrimitive
00022 {
00023 public:
00024         RodPrimitive();                                               // Default constructor
00025         RodPrimitive( long length, long index, long id, long version, 
00026                       long * body);                                   // Alternate constructor
00027         RodPrimitive( const RodPrimitive& );                          // Copy constructor
00028         ~RodPrimitive();                                              // Destructor
00029         RodPrimitive& operator=( const RodPrimitive&);                //Overload = operator
00030 
00031         //! Accessor function to set length
00032         void setLength( long len) { m_length = len; }
00033         //! Accessor function to get length
00034         long getLength() const { return m_length; }
00035         
00036         //! Accessor function to set index
00037         void setIndex( long ind) { m_index = ind; }
00038         //! Accessor function to get index
00039         long getIndex() const { return m_index; }
00040         
00041         //! Accessor function to set ID
00042         void setId( long id) { m_id = id; }
00043         //! Accessor function to get ID
00044         long getId() const { return m_id; }
00045         
00046         //! Accessor function to set version
00047         void setVersion( long version) { m_version = version; }
00048         //! Accessor function to get version
00049         long getVersion() const { return m_version; }
00050         
00051         //! Accessor function to set pointer to data body.
00052         void setBody( long *body) { m_body = body;}
00053         //! Accessor function to get pointer to data body.
00054         long* getBody() const {return m_body; }
00055  
00056         //! Figure checksum
00057         long checkSum();
00058 
00059 private:
00060     //! The length of the primitive (may need to be filled after primitive is defined.) 
00061         long m_length;
00062     //! The index of the primitive. This is an accounting ID giving a unique numerical identifier. 
00063         long m_index;
00064     //! The ID which says what kind of primitive this is (echo, memory test, etc.).
00065         long m_id;
00066     //! The version number for this primitive
00067         long m_version;
00068     //! A pointer to the body of the primitive. Storage is allocated in the calling routine, do
00069     //! not delete the body from within this class. Watch for memory leaks!!!
00070         long *m_body;
00071 
00072 };                                    // End of RodPrimitive declaration
00073 } // End namespace SctPixelRod
00074 
00075 #endif  // SCTPIXELROD_RodPrimitive_H

Generated on Mon Mar 3 11:16:17 2003 for SCTPixelDAQ by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001