• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/sts-lasertest/go4/STS/TSTSEvent.cxx (r4864/r3159)

Go to the documentation of this file.
00001 /* Generated by Together */
00002 
00003 #include "TSTSEvent.h"
00004 #include "TGo4Version.h"
00005 #if __GO4BUILDVERSION__ > 40502
00006 #include "go4iostream.h"
00007 #else
00008 #include "Riostream.h"
00009 #endif
00010 
00011 TSTSEvent::TSTSEvent(const char* name, Short_t id) :
00012    TGo4EventElement(name,name,id)
00013 {
00014   cout << "**** TSTSEvent: Create instance " << name <<" with composite id "<<id << endl;
00015   Init();
00016 }
00017 
00018 TSTSEvent::TSTSEvent() :
00019    TGo4EventElement()
00020 {
00021         Init();
00022 }
00023 
00024 
00025 
00026 TSTSEvent::~TSTSEvent()
00027 {
00028 }
00029 
00030 
00031 
00032 Int_t TSTSEvent::Init()
00033 {
00034         fNStations = TSTSTopology::GetNDetectors();
00035         fPoints.resize( fNStations );
00036         fDigis.resize( fNStations );
00037         for( Int_t iStation = 0; iStation < fNStations; iStation++ ) {
00038                 fDigis.at( iStation ).resize( TSTSTopology::kNSides );
00039         }
00040         fCurrentScan.Clear();
00041         return 0;
00042 }
00043 
00044 
00045 
00046 void TSTSEvent::AddPoint( UInt_t plane, TSpacepoint const & point )
00047 {
00048         fPoints.at( plane ).push_back( point );
00049 }
00050 
00051 
00052 void TSTSEvent::AddDigi( UInt_t station, UInt_t side, TSTSDigi const & digi )
00053 {
00054         fDigis.at( station ).at(side).push_back( digi );
00055 }
00056 
00057 
00058 void  TSTSEvent::Clear(Option_t *t)
00059 {
00060    if(!IsValid()) return; // buffer everything until we are ready.
00061   // all members should be cleared.
00062          //fHits.clear();
00063          for( UInt_t iStation = 0; iStation < fPoints.size(); iStation++ ) {
00064                  fPoints.at( iStation ).clear();
00065 
00066          }
00067 
00068          for( UInt_t iStation = 0; iStation < fPoints.size(); iStation++ ) {
00069                  for( UInt_t iSide = 0; iSide < TSTSTopology::kNSides; iSide++ ) {
00070                          fDigis.at( iStation ).at( iSide ).clear();
00071                  }
00072          }
00073 
00074          //fCurrentScan.Clear(); // keep previous scanpoint until we get offposition message
00075 
00076 //       fPoints.clear();
00077 }

Generated on Tue Dec 10 2013 04:52:18 for ROCsoft by  doxygen 1.7.1