GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TMeshB12OutputEvent.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 "TMeshB12OutputEvent.h"
15 
16 #include "TGo4Log.h"
17 
18 #include "TMeshB12AnlProc.h"
19 #include "TGo4FileSource.h"
20 
21 //***********************************************************
23  :TGo4EventElement("OutputEvent12")
24 {
25 }
26 
27 //***********************************************************
29  :TGo4EventElement(name)
30 {
31 }
32 
33 //***********************************************************
35 {
36 }
37 
38 //-----------------------------------------------------------
40 {
41  // check for different source types
42  Int_t rev = 0;
43  if (CheckEventSource("TMeshB12AnlProc")) {
44  fxProcessor = dynamic_cast<TMeshB12AnlProc*>(GetEventSource());
45  TGo4Log::Info("TMeshB12OutputEvent Init for analysis step");
46  } else if (CheckEventSource("TGo4FileSource")) {
47  fxFile = dynamic_cast<TGo4FileSource*>(GetEventSource());
48  TGo4Log::Info("TMeshB12OutputEvent Init for file input");
49  } else
50  rev = 1;
51  return rev;
52 }
53 
54 //-----------------------------------------------------------
56 {
57  // check for different source types
58  Int_t rev = 0;
59  Clear();
60  if(fxProcessor)
61  fxProcessor->Analysis(this);
62  else if(fxFile)
63  fxFile->BuildEvent(this);
64  else
65  rev = 1;
66  return rev;
67 }
68 
69 //-----------------------------------------------------------
71 {
72  void *destfield = (void *) &frData[0];
73  memset(destfield,0, sizeof(frData));
74 }
TMeshB12AnlProc * fxProcessor
TGo4EventSource * GetEventSource() const
void Clear(Option_t *opt="") override
Bool_t BuildEvent(TGo4EventElement *dest) override
static void Info(const char *text,...) GO4_PRINTF_ARGS
Definition: TGo4Log.cxx:294
void Analysis(TMeshB12OutputEvent *target)
Bool_t CheckEventSource(const char *classname)
TGo4FileSource * fxFile
Don&#39;t put this to file.