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