GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TMeshB2InputEvent.cxx
Go to the documentation of this file.
1 // $Id$
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 "TMeshB2InputEvent.h"
15 
16 #include "TGo4Log.h"
17 #include "TMeshUnpackProc.h"
18 #include "TGo4FileSource.h"
19 
20 //***********************************************************
22  :TGo4EventElement("InputEvent2")
23 {
24 }
25 
26 //***********************************************************
28  :TGo4EventElement(name)
29 {
30 }
31 
32 //***********************************************************
34 {
35 }
36 
37 //-----------------------------------------------------------
39 {
40  Int_t rev = 0;
41  Clear();
42  // is it used by Unpack step as output?
43  if(CheckEventSource("TMeshUnpackProc")){
44  fxProcessor = dynamic_cast<TMeshUnpackProc*>(GetEventSource());
45  TGo4Log::Info("TMeshB2InputEvent init for Unpack step");
46  }
47  // or is it used from provider step as input
48  else if(CheckEventSource("TGo4FileSource")){
49  fxFile = dynamic_cast<TGo4FileSource*> (GetEventSource());
50  TGo4Log::Info("TMeshB2InputEvent init for file input");
51  }
52  else rev=1;
53  return rev;
54 }
55 
56 //-----------------------------------------------------------
58 {
59  Int_t rev = 0;
60  Clear();
61  if(fxProcessor)
63  else if(fxFile)
64  fxFile->BuildEvent(this);
65  else
66  rev=1;
67  return rev;
68 }
69 
70 //-----------------------------------------------------------
71 void TMeshB2InputEvent::Clear(Option_t *)
72 {
73  void *destfield = (void *) &fiCrate2[0];
74  memset(destfield,0, sizeof(fiCrate2));
75 }
TGo4EventSource * GetEventSource() const
Int_t Fill() override
Bool_t BuildEvent(TGo4EventElement *dest) override
TGo4FileSource * fxFile
Don&#39;t put this to file.
static void Info(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:294
void Clear(Option_t *opt="") override
TMeshUnpackProc * fxProcessor
Bool_t CheckEventSource(const char *classname)
Int_t Init() override
void UnpackBranch2(TMeshB2InputEvent *target)