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

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

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