GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4SimpleSubEvent.cxx
Go to the documentation of this file.
1 // $Id: TGo4SimpleSubEvent.cxx 2771 2020-04-16 15:24:45Z 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 fuer 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 
19 
21 : fsProcid(0), fiFieldLen(0)
22 {
23 GO4TRACE((12,"TGo4SimpleSubEvent::TGo4SimpleSubEvent() ",__LINE__, __FILE__));
24  //std::cout << "default ctor of simple subevent"<< std::endl;
25  //Clear();
26  fiD0=0;
27  fiD1=0;
28  fiD2=0;
29  fiD3=0;
30  fiD4=0;
31  fiD5=0;
32  fiD6=0;
33  fiD7=0;
34  fiD8=0;
35  fiD9=0;
36  fiD10=0;
37  fiD11=0;
38  fiD12=0;
39 
40 // note: clonesarray within clonesarray won't stream! SEGV
41 // Int_t subevtnum=7;
42 // fxMbsSubEventArray=new TClonesArray("TGo4MbsSubEvent", subevtnum);
43 // fxMbsSubEventArray->BypassStreamer(kFALSE);
44 //
45 // TGo4MbsSubEvent* subeve;
46 // for (Int_t t=0;t<subevtnum;++t)
47 // {
48 // //subeve= new( (*fxMbsSubEventArray) [t] ) TGo4MbsSubEvent();
49 // fxMbsSubEventArray->New(t);
50 // }
51 
52 //fxTestSub= new TGo4MbsSubEvent(20);
53 //fxTestSub->Clear();
54 }
55 
56 
57 
59 {
60 GO4TRACE((12,"TGo4SimpleSubEvent::~TGo4SimpleSubEvent() ",__LINE__, __FILE__));
61 
62 // delete fxMbsSubEventArray;
63 
64 }
65 
67 {
68  GO4TRACE((11,"TGo4SimpleSubEvent::PrintEvent()",__LINE__, __FILE__));
69 
70  TGo4Log::Debug( " SimpleSubEvent Header printout: ");
71  TGo4Log::Debug( "\tProcid %d", fsProcid);
72  TGo4Log::Debug( "\tFieldLen %d ", fiFieldLen);
73 
74 
75 }
76 void TGo4SimpleSubEvent::Clear(Option_t *t)
77 {
78  GO4TRACE((11,"TGo4SimpleSubEvent::Clear()",__LINE__, __FILE__));
79  void* destfield = (void*) &fiD0;
80  void* sourcefield= (void*) TGo4SimpleSubEvent::fgiZeroField;
81  memcpy(destfield,
82  sourcefield,
83  12*sizeof(Int_t)); // does this work?
84 
85  fiFieldLen=0;
86  //std::cout << "cleared simple subevent"<< std::endl;
87 }
88 
90 {
91  GO4TRACE((11,"TGo4SimpleSubEvent::Fill()",__LINE__, __FILE__));
92  MayNotUse("TGo4SimpleSubEvent::Fill()");
93  return -1;
94 }
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:274