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

TGo4SimpleSubEvent.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "Riostream.h"
00019 
00020 #include "TGo4Log.h"
00021 
00022 #include "Go4EventServer.h"
00023 
00024 Int_t TGo4SimpleSubEvent::fgiZeroField[]={0};
00025 
00026 
00027 TGo4SimpleSubEvent::TGo4SimpleSubEvent()
00028 :  fsProcid(0), fiFieldLen(0)
00029 {
00030 TRACE((12,"TGo4SimpleSubEvent::TGo4SimpleSubEvent() ",__LINE__, __FILE__));
00031    //cout << "default ctor of simple subevent"<< endl;
00032    //Clear();
00033    fiD0=0;
00034    fiD1=0;
00035    fiD2=0;
00036    fiD3=0;
00037    fiD4=0;
00038    fiD5=0;
00039    fiD6=0;
00040    fiD7=0;
00041    fiD8=0;
00042    fiD9=0;
00043    fiD10=0;
00044    fiD11=0;
00045    fiD12=0;
00046 
00047 // note: clonesarray within clonesarray won't stream! SEGV
00048 //   Int_t subevtnum=7;
00049 //   fxMbsSubEventArray=new TClonesArray("TGo4MbsSubEvent", subevtnum);
00050 //   fxMbsSubEventArray->BypassStreamer(kFALSE);
00051 //
00052 //   TGo4MbsSubEvent* subeve;
00053 //   for (Int_t t=0;t<subevtnum;++t)
00054 //      {
00055 //         //subeve= new( (*fxMbsSubEventArray) [t] ) TGo4MbsSubEvent();
00056 //         fxMbsSubEventArray->New(t);
00057 //      }
00058 
00059 //fxTestSub= new TGo4MbsSubEvent(20);
00060 //fxTestSub->Clear();
00061 }
00062 
00063 
00064 
00065 TGo4SimpleSubEvent::~TGo4SimpleSubEvent()
00066 {
00067 TRACE((12,"TGo4SimpleSubEvent::~TGo4SimpleSubEvent() ",__LINE__, __FILE__));
00068 
00069 //   delete fxMbsSubEventArray;
00070 
00071 }
00072 
00073 void TGo4SimpleSubEvent::PrintEvent()
00074 {
00075    TRACE((11,"TGo4SimpleSubEvent::PrintEvent()",__LINE__, __FILE__));
00076 
00077    TGo4Log::Debug( " SimpleSubEvent Header printout: ");
00078    TGo4Log::Debug( "\tProcid    %d", fsProcid);
00079    TGo4Log::Debug( "\tFieldLen    %d ", fiFieldLen);
00080 
00081 
00082 }
00083 void TGo4SimpleSubEvent::Clear(Option_t *t)
00084 {
00085    TRACE((11,"TGo4SimpleSubEvent::Clear()",__LINE__, __FILE__));
00086    void* destfield = (void*) &fiD0;
00087    void* sourcefield= (void*) TGo4SimpleSubEvent::fgiZeroField;
00088    memcpy(destfield,
00089             sourcefield,
00090                12*sizeof(Int_t));     // does this work?
00091 
00092    fiFieldLen=0;
00093    //cout << "cleared simple subevent"<< endl;
00094 }
00095 
00096 Int_t TGo4SimpleSubEvent::Fill()
00097 {
00098    TRACE((11,"TGo4SimpleSubEvent::Fill()",__LINE__, __FILE__));
00099    MayNotUse("TGo4SimpleSubEvent::Fill()");
00100    return -1;
00101 }
00102 
00103 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:09 2008 for Go4-v3.04-1 by  doxygen 1.4.2