Go to the documentation of this file.00001
00002
00003 #include "TEpicsAnalysis.h"
00004
00005 #include <stdlib.h>
00006 #include "TGo4Version.h"
00007 #include "TGo4Log.h"
00008
00009 #include "Go4EventServer.h"
00010 #include "TGo4StepFactory.h"
00011 #include "TGo4AnalysisStep.h"
00012
00013
00014
00015 TEpicsAnalysis::TEpicsAnalysis()
00016 {
00017 }
00018
00019
00020
00021 TEpicsAnalysis::TEpicsAnalysis(int argc, char** argv) :
00022 TGo4Analysis(argc, argv)
00023 {
00024 if (!TGo4Version::CheckVersion(__GO4BUILDVERSION__)) {
00025 TGo4Log::Error("Go4 version mismatch");
00026 exit(-1);
00027 }
00028
00029 TGo4Log::Info("Create TEpicsAnalysis name: %s", argv[0]);
00030
00031 TGo4StepFactory* factory = new TGo4StepFactory("Factory");
00032 factory->DefEventProcessor("EpicsProc","TEpicsProc");
00033 factory->DefOutputEvent("EPICS","TEpicsEvent");
00034
00035
00036 TGo4EventSourceParameter* sourcepar = new TGo4MbsFileParameter(Form("%s/data/test.lmd",getenv("GO4SYS")));
00037 TGo4FileStoreParameter* storepar = new TGo4FileStoreParameter(Form("%sOutput", argv[0]));
00038 storepar->SetOverwriteMode(kTRUE);
00039
00040 TGo4AnalysisStep* step = new TGo4AnalysisStep("EPICS", factory, sourcepar, storepar);
00041
00042 step->SetSourceEnabled(kTRUE);
00043 step->SetStoreEnabled(kFALSE);
00044 step->SetProcessEnabled(kTRUE);
00045 step->SetErrorStopEnabled(kTRUE);
00046
00047
00048
00049 AddAnalysisStep(step);
00050
00051
00052
00053
00054 }
00055
00056
00057 TEpicsAnalysis::~TEpicsAnalysis()
00058 {
00059 TGo4Log::Info("TEpicsAnalysis: Delete instance");
00060 }
00061