Go to the documentation of this file.00001
00002
00003 #include "TTRDBucharestAnalysis.h"
00004
00005 #include <stdlib.h>
00006
00007 #include "Go4EventServer.h"
00008 #include "TGo4StepFactory.h"
00009 #include "TGo4AnalysisStep.h"
00010 #include "TGo4Version.h"
00011 #include "TGo4Log.h"
00012
00013
00014
00015 TTRDBucharestAnalysis::TTRDBucharestAnalysis()
00016 {
00017 }
00018
00019
00020
00021 TTRDBucharestAnalysis::TTRDBucharestAnalysis(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 TTRDBucharestAnalysis name: %s", argv[0]);
00030
00031 TGo4StepFactory* factory = new TGo4StepFactory("Factory");
00032 factory->DefEventProcessor("MbsCrateProc","TMbsCrateProc");
00033 factory->DefOutputEvent("MbsCrateEvent","TMbsCrateEvent");
00034
00035 Text_t lmdfile[512];
00036 sprintf(lmdfile,"%s/data/test.lmd",getenv("GO4SYS"));
00037 TGo4EventSourceParameter* sourcepar = new TGo4MbsFileParameter(lmdfile);
00038
00039 TGo4FileStoreParameter* storepar = new TGo4FileStoreParameter(Form("%sOutput", argv[0]));
00040 storepar->SetOverwriteMode(kTRUE);
00041
00042 TGo4AnalysisStep* step = new TGo4AnalysisStep("Unpack", factory, sourcepar, storepar);
00043
00044 step->SetSourceEnabled(kTRUE);
00045 step->SetStoreEnabled(kFALSE);
00046 step->SetProcessEnabled(kTRUE);
00047 step->SetErrorStopEnabled(kTRUE);
00048
00049
00050
00051 AddAnalysisStep(step);
00052
00053
00054 TGo4StepFactory* factory2 = new TGo4StepFactory("Factory2");
00055 factory2->DefEventProcessor("TRDBucharestProc","TTRDBucharestProc");
00056 factory2->DefInputEvent("MbsCrateEvent","TMbsCrateEvent");
00057 factory2->DefOutputEvent("TRDBucharestEvent","TTRDBucharestEvent");
00058
00059
00060 TGo4AnalysisStep* step2 = new TGo4AnalysisStep("TRDBUCH", factory2, 0, 0);
00061
00062 step2->SetSourceEnabled(kFALSE);
00063 step2->SetStoreEnabled(kFALSE);
00064 step2->SetProcessEnabled(kTRUE);
00065 step2->SetErrorStopEnabled(kTRUE);
00066
00067 AddAnalysisStep(step2);
00068
00069
00070
00071
00072
00073 }
00074
00075
00076 TTRDBucharestAnalysis::~TTRDBucharestAnalysis()
00077 {
00078 TGo4Log::Info("TTRDBucharestAnalysis: Delete instance");
00079 }
00080