GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TMeshB1InputEvent.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 "TMeshB1InputEvent.h"
15
16#include "TGo4Log.h"
17#include "TMeshUnpackProc.h"
18#include "TGo4FileSource.h"
19
20//***********************************************************
25
26//***********************************************************
28 :TGo4EventElement(name)
29{
30}
31
32//***********************************************************
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("TMeshB1InputEvent 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("TMeshB1InputEvent init for file input");
51 } else {
52 rev = 1;
53 }
54 return rev;
55}
56
57//-----------------------------------------------------------
59{
60 Int_t rev = 0;
61 Clear();
62 if(fxProcessor)
63 fxProcessor->UnpackBranch1(this);
64 else if(fxFile)
65 fxFile->BuildEvent(this);
66 else
67 rev=1;
68 return rev;
69}
70
71//-----------------------------------------------------------
73{
74 void *destfield = (void *) &fiCrate1[0];
75 memset(destfield,0, sizeof(fiCrate1));
76}
TGo4EventSource * GetEventSource() const
Bool_t CheckEventSource(const char *classname)
Check if event source is valid.
Raw event source which reads entries from a root TTree in a TFile.
static void Info(const char *text,...) GO4_PRINTF_ARGS
User shortcut for message with prio 1.
Definition TGo4Log.cxx:294
TGo4FileSource * fxFile
Don't put this to file.
Int_t Fill() override
Method called by the event owner (analysis step) to fill the event element from the set event source.
TMeshUnpackProc * fxProcessor
void Clear(Option_t *opt="") override
Method called by the event owner (analysis step) to clear the event element.
Int_t Init() override
Method called on initialization of event classes.