Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCD_detector_CVS Class Reference

#include <LCD_detector_CVS.hh>

Inheritance diagram for LCD_detector_CVS:

Inheritance graph
[legend]
Collaboration diagram for LCD_detector_CVS:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LCD_detector_CVS (const char *)
 ~LCD_detector_CVS ()
unsigned int getCRC ()
const char * getHeader ()
void setCRC (unsigned int)
void setHeader (char *)
unsigned int xfer (SIO_stream *, SIO_operation, unsigned int)
unsigned int version ()

Private Attributes

unsigned int CRC
std::string header

Constructor & Destructor Documentation

LCD_detector_CVS::LCD_detector_CVS const char *   ) 
 

Definition at line 20 of file LCD_detector_CVS.cc.

References CRC, and header.

00020                                                        : SIO_block( i_name )
00021 {
00022 
00023   CRC    = 0;
00024   header = "<unknown>";
00025 
00026 }

LCD_detector_CVS::~LCD_detector_CVS  ) 
 

Definition at line 33 of file LCD_detector_CVS.cc.

00033 {}


Member Function Documentation

unsigned int LCD_detector_CVS::getCRC  ) 
 

Definition at line 40 of file LCD_detector_CVS.cc.

References CRC.

00040 { return CRC; }

const char * LCD_detector_CVS::getHeader  ) 
 

Definition at line 47 of file LCD_detector_CVS.cc.

References header.

00047 { return header.c_str(); }

void LCD_detector_CVS::setCRC unsigned  int  ) 
 

Definition at line 54 of file LCD_detector_CVS.cc.

References CRC.

Referenced by LCDG4_SIOglobal::LCDG4_SIOglobal().

00054 { CRC = i_CRC; return; }

void LCD_detector_CVS::setHeader char *   ) 
 

Definition at line 63 of file LCD_detector_CVS.cc.

Referenced by LCDG4_SIOglobal::LCDG4_SIOglobal().

00066 {
00067 
00068   //
00069   // Check for presence ofinput string.
00070   //
00071   if( i_header == NULL )
00072     return;
00073 
00074   //
00075   // Copy it!
00076   //
00077   header = i_header;
00078 
00079   //
00080   // That's all folks!
00081   //
00082   return;
00083 }

unsigned int LCD_detector_CVS::version  )  [virtual]
 

Implements SIO_block.

Definition at line 153 of file LCD_detector_CVS.cc.

References LCD_DETECTOR_CVS_MAJOR, LCD_DETECTOR_CVS_MINOR, and SIO_VERSION_ENCODE.

00154 { return( SIO_VERSION_ENCODE( LCD_DETECTOR_CVS_MAJOR,
00155                               LCD_DETECTOR_CVS_MINOR ) ); }

unsigned int LCD_detector_CVS::xfer SIO_stream ,
SIO_operation  ,
unsigned  int
[virtual]
 

Implements SIO_block.

Definition at line 92 of file LCD_detector_CVS.cc.

References SIO_BLOCK_SUCCESS, SIO_DATA, SIO_OP_READ, SIO_OP_WRITE, and SIO_operation.

00097 {
00098   if(version) ; // make compiler happy
00099   int
00100     nchr;
00101 
00102   char
00103     *temp;
00104 
00105   unsigned int
00106     status;
00107 
00108   //
00109   // Determine the length of the CVS header.
00110   //
00111   if( op == SIO_OP_WRITE )
00112     nchr = header.size();
00113 
00114   SIO_DATA( stream, &nchr, 1 );
00115 
00116   //
00117   // Transfer the CVS header.
00118   //
00119   if( op == SIO_OP_WRITE )
00120     {
00121       SIO_DATA( stream, const_cast<char*>(header.c_str()), nchr );
00122     }
00123 
00124   else if( op == SIO_OP_READ  )
00125     {
00126       temp = static_cast<char*>(malloc( nchr + 1 ));
00127       SIO_DATA( stream, temp, nchr );
00128       temp[nchr] = '\0';
00129       header = temp;
00130       free( temp );
00131     }
00132 
00133   //
00134   // The rest is easy.
00135   //
00136   SIO_DATA( stream, &CRC, 1 );
00137 
00138   //
00139   // That's all folks!
00140   //
00141   return( SIO_BLOCK_SUCCESS );
00142 }


Member Data Documentation

unsigned int LCD_detector_CVS::CRC [private]
 

Definition at line 34 of file LCD_detector_CVS.hh.

Referenced by getCRC(), LCD_detector_CVS(), and setCRC().

std::string LCD_detector_CVS::header [private]
 

Definition at line 35 of file LCD_detector_CVS.hh.

Referenced by getHeader(), and LCD_detector_CVS().


The documentation for this class was generated from the following files:
Generated on Thu Oct 7 18:45:04 2004 for LCDG4 by doxygen 1.3.4