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

/Go4Example2Step/TXXXUnpackEvent.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 "TXXXUnpackEvent.h"
00017 
00018 #include <iostream.h>
00019 
00020 //***********************************************************
00021 TXXXUnpackEvent::TXXXUnpackEvent()
00022   :TGo4EventElement("XXXUnpackEvent"),fxXXXEP(0),fxXXXFS(0)
00023 {
00024 }
00025 //***********************************************************
00026 TXXXUnpackEvent::TXXXUnpackEvent(Text_t * name)
00027   :TGo4EventElement(name),fxXXXEP(0),fxXXXFS(0)
00028 {
00029 }
00030 //***********************************************************
00031 TXXXUnpackEvent::~TXXXUnpackEvent()
00032 {
00033 }
00034 //***********************************************************
00035 
00036 //-----------------------------------------------------------
00037 Int_t TXXXUnpackEvent::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("TXXXUnpackProc")){
00044     fxXXXEP = (TXXXUnpackProc*)GetEventSource();
00045     cout << "**** XXXUnpackEvent init for Unpack step"<< endl;
00046   }
00047   // or is it used from Analysis step as input
00048   else if(CheckEventSource("TGo4FileSource")){
00049     fxXXXFS = (TGo4FileSource*)GetEventSource();
00050     cout << "**** XXXUnpackEvent init for Analysis step"<< endl;
00051   }
00052   else          rev=1;
00053   return rev;
00054 }
00055 //-----------------------------------------------------------
00056 Int_t TXXXUnpackEvent::Fill()
00057 {
00058    Int_t rev=0;
00059    Clear();
00060    if(fxXXXEP)fxXXXEP->XXXUnpack(this);  // user event processing method
00061    if(fxXXXFS)fxXXXFS->BuildEvent(this); // method from framework to restore event from file
00062    return rev;
00063 }
00064 
00065 //-----------------------------------------------------------
00066 void  TXXXUnpackEvent::Clear(Option_t *t)
00067 {
00068 void* destfield;
00069    //cout << "+++ event clear" << endl;
00070    destfield = (void*) &fiCrate1[0];
00071    memset(destfield,0, sizeof(fiCrate1));
00072    destfield = (void*) &fiCrate2[0];
00073    memset(destfield,0, sizeof(fiCrate2));
00074    destfield = (void*) &fiCrate3[0];
00075    memset(destfield,0, sizeof(fiCrate3));
00076    destfield = (void*) &fiCrate4[0];
00077    memset(destfield,0, sizeof(fiCrate4));
00078    //cout << "+++ event clear" << endl;
00079 }
00080 
00081 ClassImp(TXXXUnpackEvent)
00082 
00083 
00084 
00085 
00086 //----------------------------END OF GO4 SOURCE FILE ---------------------

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