• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/cern-gem12/go4/TTrackingProc.cxx (r4864/r3571)

Go to the documentation of this file.
00001 #include "TTrackingProc.h"
00002 #include "TGo4Version.h"
00003 #if __GO4BUILDVERSION__ > 40502
00004 #include "go4iostream.h"
00005 #else
00006 #include "Riostream.h"
00007 #endif
00008 #include "TTimeStamp.h"
00009 #include "TSystem.h"
00010 #include "TROOT.h"
00011 #include "TGo4Log.h"
00012 
00013 #include "TGo4UserException.h"
00014 
00015 
00016 
00017 TTrackingProc::TTrackingProc(const char* name) :
00018    TCBMBeamtimeProc(name),
00019    fGem1(0),
00020    fGem2(0),
00021    fOutputEvent(0)
00022 {
00023    cout << "**** TTrackingProc: Create instance ****" << name << endl;
00024 
00025    fPar = (TTrackingParam*) MakeParameter("TrackingPar", "TTrackingParam", "set_TrackingPar.C");
00026 
00027    printf("TTrackingProc Histograms created \n");
00028 }
00029 
00030 
00031 
00032 TTrackingProc::~TTrackingProc()
00033 {
00034 }
00035 
00036 
00037 
00038 void TTrackingProc::InitEvent(TGo4EventElement* outevnt)
00039 {
00040    // first assign input event:
00041    // since input event object is never discarded within processor lifetime,
00042    // we just search for subevent by name once to speed up processing
00043  TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(GetInputEvent());
00044  if(btevent)
00045  {
00046       fGem1=dynamic_cast<TGem1Event*>(btevent->GetSubEvent("Gem1"));
00047       fGem2=dynamic_cast<TGem2Event*>(btevent->GetSubEvent("Gem2"));
00048   } else  {
00049      cout << "btevent == 0\n";
00050   }
00051  
00052  // then assign output event
00053    // since output event object is never discarded within processor lifetime,
00054    // we just search for subevent by name once to speed up processing
00055    if(fOutputEvent==0)
00056    {
00057       TCBMBeamtimeEvent* btevent=dynamic_cast<TCBMBeamtimeEvent*>(outevnt); 
00058 // CbmKF* kalman = new CbmKF();
00059       if(btevent)
00060       {
00061          fOutputEvent=dynamic_cast<TTrackingEvent*>(btevent->GetSubEvent("TRACKING"));
00062       }
00063       else
00064       {
00065          fOutputEvent= dynamic_cast<TTrackingEvent*>(outevnt);
00066       }
00067       if(fOutputEvent==0) {
00068          GO4_STOP_ANALYSIS_MESSAGE("**** TTrackingProc: Fatal error: output event is not a TTrackingEvent!!! STOP GO4");
00069       }
00070    }
00071 }
00072 
00073 
00074  
00075 void TTrackingProc::FinalizeEvent()
00076 {
00077 
00078 
00079 }

Generated on Tue Dec 10 2013 04:52:16 for ROCsoft by  doxygen 1.7.1