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

/Go4ExampleMesh/TMeshB3AnlProc.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 "TMeshB3AnlProc.h"
00017 
00018 #include <iostream.h>
00019 
00020 #include "TMeshRawEvent.h"
00021 #include "TMeshB3OutputEvent.h"
00022 #include "TMeshB3InputEvent.h"
00023 #include "Go4Analysis/TGo4Analysis.h"
00024 
00025 //***********************************************************
00026 // this one is used in TXXXAnlFact
00027 TMeshB3AnlProc::TMeshB3AnlProc(Text_t * name)
00028   :TGo4EventProcessor(name),fxInput(0)
00029 {
00030   cout << "**** TMeshB3AnlProc: Create" << endl;
00031 }
00032 //***********************************************************
00033 TMeshB3AnlProc::TMeshB3AnlProc()
00034   : TGo4EventProcessor("Processor3"),fxInput(0)
00035 {
00036 }
00037 //***********************************************************
00038 TMeshB3AnlProc::~TMeshB3AnlProc()
00039 {
00040 }
00041 //***********************************************************
00042 
00043 //-----------------------------------------------------------
00044 void TMeshB3AnlProc::Analysis(TMeshB3OutputEvent* poutevt)
00045 {
00046    if(fxInput==0)
00047       {
00048          // lazy init for input event from framework
00049          TGo4EventElement* providerinput=GetInputEvent("Input3Provider");
00050          TMeshRawEvent* raw=dynamic_cast<TMeshRawEvent*>(providerinput); 
00051          if(raw)
00052             fxInput=&(raw->fxSub3); 
00053                // provider delivers full raw event, we use only our component  
00054          else
00055             fxInput=dynamic_cast<TMeshB3InputEvent*>(providerinput);
00056                // provider with partial io delivers just our component
00057       }
00058    if(fxInput)
00059       {
00060          // do the processing here:
00061          for(Int_t i=0;i<4;i++)
00062             {
00063                poutevt->frData[i]=(Float_t)fxInput->fiCrate3[i];               
00064             }
00065          
00066          
00067       }
00068    else
00069       {
00070          throw TGo4UserException(3,"Error: no input event for processor %s",GetName());  
00071       }
00072 
00073 } // BuildCalEvent
00074 
00075 //-----------------------------------------------------------
00076 ClassImp(TMeshB3AnlProc)
00077 
00078 
00079 
00080 
00081 //----------------------------END OF GO4 SOURCE FILE ---------------------

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