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

/Go4Example1Step/TXXXEvent.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 "TXXXEvent.h"
00017 
00018 #include <iostream.h>
00019 
00020 //***********************************************************
00021 TXXXEvent::TXXXEvent() : TGo4EventElement("XXXEvent"),fxAnlProc(0)
00022 {
00023     cout << "**** TXXXEvent: Create instance" << endl;
00024 }
00025 //***********************************************************
00026 TXXXEvent::TXXXEvent(Text_t * name) : TGo4EventElement(name),fxAnlProc(0)
00027 {
00028   cout << "**** TXXXEvent: Create instance " << name << endl;
00029 }
00030 //***********************************************************
00031 TXXXEvent::~TXXXEvent()
00032 {
00033   cout << "**** TXXXEvent: Delete instance " << endl;
00034 }
00035 
00036 //-----------------------------------------------------------
00037 Int_t TXXXEvent::Init()
00038 {
00039   Int_t rev=0;
00040 
00041   cout << "**** TXXXEvent: Init and clear " << endl;
00042   Clear();
00043   // This event object is filled by class TXXXProc as output event
00044   if(CheckEventSource("TXXXProc")){
00045     fxAnlProc = (TXXXProc*)GetEventSource();
00046     cout << "**** TXXXEvent: Event processor XXXProc set"<< endl;
00047     if(fxAnlProc == 0){
00048      cout << "**** TXXXEvent: Event processor XXXProc not found"<< endl;
00049      rev=1;
00050     }
00051   }
00052   else
00053   {
00054     cout << "**** TXXXEvent: No event source TXXXProc"<< endl;
00055     rev=1;
00056   }
00057   return rev;
00058 }
00059 //-----------------------------------------------------------
00060 Int_t TXXXEvent::Fill()
00061 {
00062   // called by framework per event
00063 
00064    Clear();
00065    if(fxAnlProc)fxAnlProc->Event(this);  // XXXProc fills this event object
00066    return 0;
00067 }
00068 
00069 //-----------------------------------------------------------
00070 void  TXXXEvent::Clear(Option_t *t)
00071 {
00072   // all members should be cleared.
00073    memset((void*) &fCrate1[0],0, sizeof(fCrate1));
00074    memset((void*) &fCrate2[0],0, sizeof(fCrate2));
00075 }
00076 
00077 ClassImp(TXXXEvent)
00078 
00079 
00080 
00081 
00082 //----------------------------END OF GO4 SOURCE FILE ---------------------

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