GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4SimpleSubEvent.cxx
Go to the documentation of this file.
1 // $Id: TGo4SimpleSubEvent.cxx 999 2013-07-25 11:58:59Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TGo4SimpleSubEvent.h"
15 
16 #include "TGo4Log.h"
17 
18 #include "Go4EventServer.h"
19 
21 
22 
24 : fsProcid(0), fiFieldLen(0)
25 {
26 GO4TRACE((12,"TGo4SimpleSubEvent::TGo4SimpleSubEvent() ",__LINE__, __FILE__));
27  //std::cout << "default ctor of simple subevent"<< std::endl;
28  //Clear();
29  fiD0=0;
30  fiD1=0;
31  fiD2=0;
32  fiD3=0;
33  fiD4=0;
34  fiD5=0;
35  fiD6=0;
36  fiD7=0;
37  fiD8=0;
38  fiD9=0;
39  fiD10=0;
40  fiD11=0;
41  fiD12=0;
42 
43 // note: clonesarray within clonesarray won't stream! SEGV
44 // Int_t subevtnum=7;
45 // fxMbsSubEventArray=new TClonesArray("TGo4MbsSubEvent", subevtnum);
46 // fxMbsSubEventArray->BypassStreamer(kFALSE);
47 //
48 // TGo4MbsSubEvent* subeve;
49 // for (Int_t t=0;t<subevtnum;++t)
50 // {
51 // //subeve= new( (*fxMbsSubEventArray) [t] ) TGo4MbsSubEvent();
52 // fxMbsSubEventArray->New(t);
53 // }
54 
55 //fxTestSub= new TGo4MbsSubEvent(20);
56 //fxTestSub->Clear();
57 }
58 
59 
60 
62 {
63 GO4TRACE((12,"TGo4SimpleSubEvent::~TGo4SimpleSubEvent() ",__LINE__, __FILE__));
64 
65 // delete fxMbsSubEventArray;
66 
67 }
68 
70 {
71  GO4TRACE((11,"TGo4SimpleSubEvent::PrintEvent()",__LINE__, __FILE__));
72 
73  TGo4Log::Debug( " SimpleSubEvent Header printout: ");
74  TGo4Log::Debug( "\tProcid %d", fsProcid);
75  TGo4Log::Debug( "\tFieldLen %d ", fiFieldLen);
76 
77 
78 }
79 void TGo4SimpleSubEvent::Clear(Option_t *t)
80 {
81  GO4TRACE((11,"TGo4SimpleSubEvent::Clear()",__LINE__, __FILE__));
82  void* destfield = (void*) &fiD0;
83  void* sourcefield= (void*) TGo4SimpleSubEvent::fgiZeroField;
84  memcpy(destfield,
85  sourcefield,
86  12*sizeof(Int_t)); // does this work?
87 
88  fiFieldLen=0;
89  //std::cout << "cleared simple subevent"<< std::endl;
90 }
91 
93 {
94  GO4TRACE((11,"TGo4SimpleSubEvent::Fill()",__LINE__, __FILE__));
95  MayNotUse("TGo4SimpleSubEvent::Fill()");
96  return -1;
97 }
static Int_t fgiZeroField[13]
virtual void Clear(Option_t *t="")
#define GO4TRACE(X)
Definition: TGo4Log.h:26
static void Debug(const char *text,...)
Definition: TGo4Log.cxx:270