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

TMeshB1OutputEvent.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 "TMeshB1OutputEvent.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TMeshB1AnlProc.h"
00021 #include "TGo4FileSource.h"
00022 
00023 //***********************************************************
00024 TMeshB1OutputEvent::TMeshB1OutputEvent()
00025   :TGo4EventElement("OutputEvent1"),fxProcessor(0),fxFile(0)
00026 {
00027 }
00028 //***********************************************************
00029 TMeshB1OutputEvent::TMeshB1OutputEvent(const char* name)
00030   :TGo4EventElement(name),fxProcessor(0),fxFile(0)
00031 {
00032 }
00033 //***********************************************************
00034 TMeshB1OutputEvent::~TMeshB1OutputEvent()
00035 {
00036 }
00037 //***********************************************************
00038 
00039 
00040 //-----------------------------------------------------------
00041 Int_t TMeshB1OutputEvent::Init()
00042 {
00043    // check for different source types
00044    Int_t rev = 0;
00045    if(CheckEventSource("TMeshB1AnlProc"))
00046       {
00047          fxProcessor = dynamic_cast<TMeshB1AnlProc*>(GetEventSource());
00048          cout << "**** TMeshB1OutputEvent Init for analysis step"<< endl;
00049       }
00050    else if(CheckEventSource("TGo4FileSource"))
00051       {
00052          fxFile = dynamic_cast<TGo4FileSource*>(GetEventSource());
00053          cout << "**** TMeshB1OutputEvent Init for file input"<< endl;
00054       }
00055    else
00056       rev=1;
00057    return rev;
00058 
00059 }
00060 //-----------------------------------------------------------
00061 Int_t TMeshB1OutputEvent::Fill()
00062 {
00063    // check for different source types
00064    Int_t rev = 0;
00065    Clear();
00066    if(fxProcessor)
00067       fxProcessor->Analysis(this);
00068    else if(fxFile)
00069       fxFile->BuildEvent(this);
00070    else
00071       rev = 1;
00072    return rev;
00073 
00074 }
00075 //-----------------------------------------------------------
00076 void TMeshB1OutputEvent::Clear(Option_t *t)
00077 {
00078 //-----------------------------------------------------------
00079 void* destfield;
00080    destfield = (void*) &frData[0];
00081    memset(destfield,0, sizeof(frData));
00082 }
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