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

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

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