Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TMeshB2InputEvent.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "TMeshB2InputEvent.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TMeshUnpackProc.h"
00021 #include "TGo4FileSource.h"
00022 
00023 //***********************************************************
00024 TMeshB2InputEvent::TMeshB2InputEvent()
00025   :TGo4EventElement("InputEvent2"),fxProcessor(0),fxFile(0)
00026 {
00027 }
00028 //***********************************************************
00029 TMeshB2InputEvent::TMeshB2InputEvent(const char* name)
00030   :TGo4EventElement(name),fxProcessor(0),fxFile(0)
00031 {
00032 }
00033 //***********************************************************
00034 TMeshB2InputEvent::~TMeshB2InputEvent()
00035 {
00036 }
00037 //***********************************************************
00038 
00039 //-----------------------------------------------------------
00040 Int_t TMeshB2InputEvent::Init()
00041 {
00042   Int_t rev=0;
00043   //cout << "+++ Init event" << endl;
00044   Clear();
00045   // is it used by Unpack step as output?
00046   if(CheckEventSource("TMeshUnpackProc")){
00047     fxProcessor = dynamic_cast<TMeshUnpackProc*>(GetEventSource());
00048     cout << "**** TMeshB2InputEvent init for Unpack step"<< endl;
00049   }
00050   // or is it used from provider step as input
00051   else if(CheckEventSource("TGo4FileSource")){
00052     fxFile = dynamic_cast<TGo4FileSource*> (GetEventSource());
00053     cout << "**** TMeshB2InputEvent init for file input"<< endl;
00054   }
00055   else          rev=1;
00056   return rev;
00057 }
00058 //-----------------------------------------------------------
00059 Int_t TMeshB2InputEvent::Fill()
00060 {
00061    Int_t rev=0;
00062    Clear();
00063    if(fxProcessor)
00064       fxProcessor->UnpackBranch2(this);
00065    else if(fxFile)
00066       fxFile->BuildEvent(this);
00067    else
00068       rev=1;
00069    return rev;
00070 }
00071 
00072 //-----------------------------------------------------------
00073 void  TMeshB2InputEvent::Clear(Option_t *t)
00074 {
00075 void* destfield;
00076    //cout << "+++ event clear" << endl;
00077    destfield = (void*) &fiCrate2[0];
00078    memset(destfield,0, sizeof(fiCrate2));
00079    //cout << "+++ event clear" << endl;
00080 }
00081 
00082 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:10 2008 for Go4-v3.04-1 by  doxygen 1.4.2