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

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

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