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

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

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