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

VxdSIO Class Reference

#include <VxdSIO.h>

Inheritance diagram for VxdSIO:

Inheritance graph
[legend]
Collaboration diagram for VxdSIO:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 VxdSIO (const char *i_name, std::vector< TkHit > trackHits)
unsigned int version ()
unsigned int xfer (SIO_stream *, SIO_operation, unsigned int)

Private Attributes

std::vector< TkHit_hitList

Constructor & Destructor Documentation

VxdSIO::VxdSIO const char *  i_name,
std::vector< TkHit trackHits
 

Definition at line 26 of file VxdSIO.cc.

References SIO_record::connect(), and SIO_recordManager::get().

00026                                                            : SIO_block( i_name ), _hitList(trackHits)
00027 {
00028   //
00029   // Local variables.
00030   //
00031   SIO_record* record;
00032 
00033   //
00034   // Join the event record.
00035   //
00036   record = SIO_recordManager::get( "LCD_LCDG4_Event" );
00037   if( record != NULL )
00038     record->connect( this );
00039 }


Member Function Documentation

unsigned int VxdSIO::version  )  [virtual]
 

Implements SIO_block.

Definition at line 107 of file VxdSIO.cc.

References SIO_VERSION_ENCODE, SIO_VXD_MAJOR, and SIO_VXD_MINOR.

00108 { return SIO_VERSION_ENCODE( SIO_VXD_MAJOR,
00109                              SIO_VXD_MINOR ); }

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

Implements SIO_block.

Definition at line 45 of file VxdSIO.cc.

References cm, GeV, ns, SIO_BLOCK_SUCCESS, SIO_DATA, SIO_operation, and SIO_PNTR.

00050 {
00051   // Make compiler happy about unused vars
00052   if(op || version) ;
00053 
00054   //
00055   // Local variables
00056   //
00057   double d_vec[3];
00058 
00059   float eloss;
00060   float time;
00061 
00062   MCParticleSIO* parent;
00063 
00064   int temp;
00065 
00066   unsigned int layer;
00067   unsigned int status;
00068 
00069   vector<TkHit>::const_iterator it;
00070 
00071   temp = _hitList.size();
00072   SIO_DATA( stream, &temp, 1 );
00073 
00074   for (it  = _hitList.begin(); it != _hitList.end(); it++)
00075     {
00076       layer    = (*it).layer();
00077       // Using G4SIunits.h, mm=0.001.  I don't understand then how millimeters
00078       // are default in Geantt4!!!
00079 //       cout<< "Units: mm="<< mm <<", cm="<< cm <<", GeV="<< GeV <<", ns="<< ns << endl;
00080       d_vec[0] = (*it).x() / cm;
00081       d_vec[1] = (*it).y() / cm;
00082       d_vec[2] = (*it).z() / cm;
00083       eloss    = (*it).eloss() / GeV;
00084       time     = (*it).t() / ns;
00085       parent   = const_cast<MCParticleSIO *>((*it).mc());
00086 
00087       SIO_DATA(stream, &layer,    1);
00088       SIO_DATA(stream, &d_vec[0], 3);
00089       SIO_DATA(stream, &eloss,    1);
00090       SIO_DATA(stream, &time,     1);
00091       SIO_PNTR(stream, &parent     );
00092     }
00093 
00094   //
00095   // That's all folks!
00096   //
00097   return( SIO_BLOCK_SUCCESS );
00098 }


Member Data Documentation

std::vector<TkHit> VxdSIO::_hitList [private]
 

Definition at line 36 of file VxdSIO.h.


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