GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TMeshB12OutputEvent.cxx
Go to the documentation of this file.
1 // $Id: TMeshB12OutputEvent.cxx 2627 2019-10-01 08:02: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 "TMeshB12OutputEvent.h"
15 
16 #include "TGo4Log.h"
17 
18 #include "TMeshB12AnlProc.h"
19 #include "TGo4FileSource.h"
20 
21 //***********************************************************
23  :TGo4EventElement("OutputEvent12"),fxProcessor(0),fxFile(0)
24 {
25 }
26 //***********************************************************
28  :TGo4EventElement(name),fxProcessor(0),fxFile(0)
29 {
30 }
31 //***********************************************************
33 {
34 }
35 //***********************************************************
36 
37 
38 //-----------------------------------------------------------
40 {
41  // check for different source types
42  Int_t rev = 0;
43  if(CheckEventSource("TMeshB12AnlProc"))
44  {
45  fxProcessor = dynamic_cast<TMeshB12AnlProc*>(GetEventSource());
46  TGo4Log::Info("TMeshB12OutputEvent Init for analysis step");
47  }
48  else if(CheckEventSource("TGo4FileSource"))
49  {
50  fxFile = dynamic_cast<TGo4FileSource*>(GetEventSource());
51  TGo4Log::Info("TMeshB12OutputEvent Init for file input");
52  }
53  else
54  rev=1;
55  return rev;
56 
57 }
58 //-----------------------------------------------------------
60 {
61  // check for different source types
62  Int_t rev = 0;
63  Clear();
64  if(fxProcessor)
65  fxProcessor->Analysis(this);
66  else if(fxFile)
67  fxFile->BuildEvent(this);
68  else
69  rev = 1;
70  return rev;
71 
72 }
73 //-----------------------------------------------------------
74 void TMeshB12OutputEvent::Clear(Option_t *t)
75 {
76 //-----------------------------------------------------------
77  void* destfield = (void*) &frData[0];
78  memset(destfield,0, sizeof(frData));
79 }
TMeshB12AnlProc * fxProcessor
void Analysis(TMeshB12OutputEvent *target)
TGo4EventSource * GetEventSource() const
Bool_t CheckEventSource(const char *classname)
virtual Bool_t BuildEvent(TGo4EventElement *dest)
virtual void Clear(Option_t *t="")
TGo4FileSource * fxFile
Don't put this to file.
static void Info(const char *text,...)
Definition: TGo4Log.cxx:297