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

TrackerSIO Class Reference

#include <TrackerSIO.h>

Inheritance diagram for TrackerSIO:

Inheritance graph
[legend]
Collaboration diagram for TrackerSIO:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TrackerSIO (const char *i_name)
 TrackerSIO (const char *i_name, std::vector< TkHit > trackHits)
void clear ()
void set (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

TrackerSIO::TrackerSIO const char *  i_name  ) 
 

Definition at line 27 of file TrackerSIO.cc.

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

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

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

Definition at line 42 of file TrackerSIO.cc.

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

00042                                                                  : SIO_block( i_name ), _hitList(trackHits)
00043 {
00044   //
00045   // Local variables.
00046   //
00047   SIO_record* record;
00048 
00049   //
00050   // Join the event record.
00051   //
00052   record = SIO_recordManager::get( "LCD_LCDG4_Event" );
00053   if( record != NULL )
00054     record->connect( this );
00055 }


Member Function Documentation

void TrackerSIO::clear  ) 
 

Definition at line 59 of file TrackerSIO.cc.

References _hitList.

00060 {
00061   _hitList.erase(_hitList.begin(),_hitList.end());
00062 }

void TrackerSIO::set std::vector< TkHit trackHits  ) 
 

Definition at line 64 of file TrackerSIO.cc.

References _hitList.

00065 {
00066   _hitList=trackHits;
00067 }

unsigned int TrackerSIO::version  )  [virtual]
 

Implements SIO_block.

Definition at line 131 of file TrackerSIO.cc.

References SIO_TRACKER_MAJOR, SIO_TRACKER_MINOR, and SIO_VERSION_ENCODE.

00132 { return( SIO_VERSION_ENCODE( SIO_TRACKER_MAJOR,
00133                               SIO_TRACKER_MINOR ) ); }

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

Implements SIO_block.

Definition at line 73 of file TrackerSIO.cc.

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

00078 {
00079   // Make compiler happy about unused vars
00080   if(op || version) ;
00081 
00082   //
00083   // Local variables
00084   //
00085   double d_vec[3];
00086 
00087   float eloss;
00088   float time;
00089 
00090   MCParticleSIO* parent;
00091 
00092   int temp;
00093 
00094   unsigned int layer;
00095   unsigned int status;
00096 
00097   vector<TkHit>::const_iterator it;
00098 
00099   temp = _hitList.size();
00100   SIO_DATA( stream, &temp, 1 );
00101 
00102   for (it  = _hitList.begin(); it != _hitList.end(); it++)
00103     {
00104       layer    = (*it).layer();
00105       d_vec[0] = (*it).x() / cm;
00106       d_vec[1] = (*it).y() / cm;
00107       d_vec[2] = (*it).z() / cm;
00108       eloss    = (*it).eloss() / GeV;
00109       time     = (*it).t() / ns;
00110       parent   = const_cast<MCParticleSIO *>((*it).mc());
00111 
00112       SIO_DATA(stream, &layer,    1);
00113       SIO_DATA(stream, &d_vec[0], 3);
00114       SIO_DATA(stream, &eloss,    1);
00115       SIO_DATA(stream, &time,     1);
00116       SIO_PNTR(stream, &parent     );
00117     }
00118 
00119   //
00120   // That's all folks!
00121   //
00122   return( SIO_BLOCK_SUCCESS );
00123 }


Member Data Documentation

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

Definition at line 37 of file TrackerSIO.h.

Referenced by clear(), and set().


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