Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4ExampleMesh/TMeshB1InputEvent.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TMeshB1InputEvent.h"
00017 
00018 #include <iostream.h>
00019 
00020 //***********************************************************
00021 TMeshB1InputEvent::TMeshB1InputEvent()
00022   :TGo4EventElement("InputEvent1"),fxProcessor(0),fxFile(0)
00023 {
00024 }
00025 //***********************************************************
00026 TMeshB1InputEvent::TMeshB1InputEvent(Text_t * name)
00027   :TGo4EventElement(name),fxProcessor(0),fxFile(0)
00028 {
00029 }
00030 //***********************************************************
00031 TMeshB1InputEvent::~TMeshB1InputEvent()
00032 {
00033 }
00034 //***********************************************************
00035 
00036 //-----------------------------------------------------------
00037 Int_t TMeshB1InputEvent::Init()
00038 {
00039   Int_t rev=0;
00040   //cout << "+++ Init event" << endl;
00041   Clear();
00042   // is it used by Unpack step as output?
00043   if(CheckEventSource("TMeshUnpackProc")){
00044     fxProcessor = dynamic_cast<TMeshUnpackProc*>(GetEventSource());
00045     cout << "**** TMeshB1InputEvent init for Unpack step"<< endl;
00046   }
00047   // or is it used from provider step as input
00048   else if(CheckEventSource("TGo4FileSource")){
00049     fxFile = dynamic_cast<TGo4FileSource*> (GetEventSource());
00050     cout << "**** TMeshB1InputEvent init for file input"<< endl;
00051   }
00052   else          rev=1;
00053   return rev;
00054 }
00055 //-----------------------------------------------------------
00056 Int_t TMeshB1InputEvent::Fill()
00057 {
00058    Int_t rev=0;
00059    Clear();
00060    if(fxProcessor)
00061       fxProcessor->UnpackBranch1(this);  
00062    else if(fxFile)
00063       fxFile->BuildEvent(this); 
00064    else
00065       rev=1;
00066    return rev;
00067 }
00068 
00069 //-----------------------------------------------------------
00070 void  TMeshB1InputEvent::Clear(Option_t *t)
00071 {
00072 void* destfield;
00073    //cout << "+++ event clear" << endl;
00074    destfield = (void*) &fiCrate1[0];
00075    memset(destfield,0, sizeof(fiCrate1));
00076    //cout << "+++ event clear" << endl;
00077 }
00078 
00079 ClassImp(TMeshB1InputEvent)
00080 
00081 
00082 
00083 
00084 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:55 2005 for Go4-v2.10-5 by doxygen1.2.15