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

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

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