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

/Go4EventServerExample/TGo4SimpleSubEvent.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4SimpleSubEvent.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "Go4EventServer/Go4EventServer.h"
00021 
00022 Int_t TGo4SimpleSubEvent::fgiZeroField[]={0};
00023 
00024 
00025 TGo4SimpleSubEvent::TGo4SimpleSubEvent()
00026 :  fsProcid(0), fiFieldLen(0)
00027 {
00028 TRACE((12,"TGo4SimpleSubEvent::TGo4SimpleSubEvent() ",__LINE__, __FILE__));
00029    //cout << "default ctor of simple subevent"<< endl;
00030    //Clear();
00031    fiD0=0;
00032    fiD1=0;
00033    fiD2=0;
00034    fiD3=0;
00035    fiD4=0;
00036    fiD5=0;
00037    fiD6=0;
00038    fiD7=0;
00039    fiD8=0;
00040    fiD9=0;
00041    fiD10=0;
00042    fiD11=0;
00043    fiD12=0;
00044 
00045 // note: clonesarray within clonesarray won't stream! SEGV
00046 //   Int_t subevtnum=7;
00047 //   fxMbsSubEventArray=new TClonesArray("TGo4MbsSubEvent", subevtnum);
00048 //   fxMbsSubEventArray->BypassStreamer(kFALSE);
00049 //
00050 //   TGo4MbsSubEvent* subeve;
00051 //   for (Int_t t=0;t<subevtnum;++t)
00052 //      {
00053 //         //subeve= new( (*fxMbsSubEventArray) [t] ) TGo4MbsSubEvent();
00054 //         fxMbsSubEventArray->New(t);
00055 //      }
00056 
00057 //fxTestSub= new TGo4MbsSubEvent(20);
00058 //fxTestSub->Clear();
00059 }
00060 
00061 
00062 
00063 TGo4SimpleSubEvent::~TGo4SimpleSubEvent()
00064 {
00065 TRACE((12,"TGo4SimpleSubEvent::~TGo4SimpleSubEvent() ",__LINE__, __FILE__));
00066 
00067 //   delete fxMbsSubEventArray;
00068 
00069 }
00070 
00071 void TGo4SimpleSubEvent::PrintEvent()
00072 {
00073    TRACE((11,"TGo4SimpleSubEvent::PrintEvent()",__LINE__, __FILE__));
00074 
00075    TGo4Log::Debug( " SimpleSubEvent Header printout: ");
00076    TGo4Log::Debug( "\tProcid    %d", fsProcid);
00077    TGo4Log::Debug( "\tFieldLen    %d ", fiFieldLen);
00078 
00079 
00080 }
00081 void TGo4SimpleSubEvent::Clear(Option_t *t)
00082 {
00083    TRACE((11,"TGo4SimpleSubEvent::Clear()",__LINE__, __FILE__));
00084    void* destfield = (void*) &fiD0;
00085    void* sourcefield= (void*) TGo4SimpleSubEvent::fgiZeroField;
00086    memcpy(destfield,
00087             sourcefield,
00088                12*sizeof(Int_t));     // does this work?
00089 
00090    fiFieldLen=0;
00091    //cout << "cleared simple subevent"<< endl;
00092 }
00093 
00094 Int_t TGo4SimpleSubEvent::Fill()
00095 {
00096    TRACE((11,"TGo4SimpleSubEvent::Fill()",__LINE__, __FILE__));
00097    MayNotUse("TGo4SimpleSubEvent::Fill()");
00098    return -1;
00099 }
00100 
00101 ClassImp(TGo4SimpleSubEvent)
00102 
00103 
00104 
00105 
00106 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:54 2005 for Go4-v2.10-5 by doxygen1.2.15