00001 // $Id: TYYYEventSource.h 478 2009-10-29 12:26:09Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TYYYEVENTSOURCE_H 00015 #define TYYYEVENTSOURCE_H 00016 00017 #include "TGo4EventSource.h" 00018 #include <fstream> 00019 00020 class TYYYRawEvent; 00021 class TGo4UserSourceParameter; 00022 00023 class TYYYEventSource : public TGo4EventSource { 00024 public: 00025 00026 TYYYEventSource(); 00027 00029 TYYYEventSource(const char* name, const char* args, Int_t port); 00030 00032 TYYYEventSource(TGo4UserSourceParameter* par); 00033 00034 virtual ~TYYYEventSource(); 00035 00036 00038 virtual Int_t Open(); 00039 00041 virtual Int_t Close(); 00042 00043 00045 virtual Bool_t CheckEventClass(TClass* cl); 00046 00053 virtual Bool_t BuildEvent(TGo4EventElement* dest); 00054 00055 const char* GetArgs() const { return fxArgs.Data(); } 00056 00057 void SetArgs(const char* arg) { fxArgs=arg; } 00058 00059 Int_t GetPort() const { return fiPort; } 00060 00061 void SetPort(Int_t val) { fiPort=val; } 00062 00063 private: 00064 00065 Bool_t fbIsOpen; 00066 00068 TString fxArgs; 00069 00071 Int_t fiPort; 00072 00074 std::ifstream* fxFile; 00075 00076 ClassDef(TYYYEventSource, 1) 00077 }; 00078 00079 #endif //TGO4MBSSOURCE_H