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

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

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