Go to the documentation of this file.00001
00002
00003 #include "TRPCAnalysis.h"
00004
00005 #include <stdlib.h>
00006 #include "Riostream.h"
00007
00008 #include "Go4EventServer.h"
00009 #include "TGo4StepFactory.h"
00010 #include "TGo4AnalysisStep.h"
00011 #include "TGo4Version.h"
00012
00013
00014
00015
00016 TRPCAnalysis::TRPCAnalysis()
00017 {
00018 }
00019
00020
00021
00022 TRPCAnalysis::TRPCAnalysis(int argc, char** argv) :
00023 TGo4Analysis(argc, argv)
00024 {
00025 cout << "**** Create TRPCAnalysis name: " << argv[0] << endl;
00026
00027 if (!TGo4Version::CheckVersion(__GO4BUILDVERSION__)) {
00028 cout << "**** Go4 version mismatch" << endl;
00029 exit(-1);
00030 }
00031
00032 TGo4StepFactory* factory = new TGo4StepFactory("Factory");
00033 factory->DefEventProcessor("RocProc","TRocProc");
00034 factory->DefOutputEvent("RocEvent","TRocEvent");
00035
00036 Text_t lmdfile[512];
00037 sprintf(lmdfile,"%s/data/test.lmd",getenv("GO4SYS"));
00038 TGo4EventSourceParameter* sourcepar = new TGo4MbsFileParameter(lmdfile);
00039
00040 TGo4FileStoreParameter* storepar = new TGo4FileStoreParameter(Form("%sOutput", argv[0]));
00041 storepar->SetOverwriteMode(kTRUE);
00042
00043 TGo4AnalysisStep* step = new TGo4AnalysisStep("Unpack", factory, sourcepar, storepar);
00044
00045 step->SetSourceEnabled(kTRUE);
00046 step->SetStoreEnabled(kFALSE);
00047 step->SetProcessEnabled(kTRUE);
00048 step->SetErrorStopEnabled(kTRUE);
00049
00050
00051
00052 AddAnalysisStep(step);
00053
00054
00055 TGo4StepFactory* factory2 = new TGo4StepFactory("Factory2");
00056 factory2->DefEventProcessor("RPCProc","TRPCProc");
00057 factory2->DefInputEvent("RocEvent","TRocEvent");
00058 factory2->DefOutputEvent("RPCEvent","TRPCEvent");
00059
00060
00061 TGo4AnalysisStep* step2 = new TGo4AnalysisStep("RPC", factory2, 0, 0);
00062
00063 step2->SetSourceEnabled(kFALSE);
00064 step2->SetStoreEnabled(kFALSE);
00065 step2->SetProcessEnabled(kTRUE);
00066 step2->SetErrorStopEnabled(kTRUE);
00067
00068 AddAnalysisStep(step2);
00069
00070
00071
00072
00073
00074 }
00075
00076
00077 TRPCAnalysis::~TRPCAnalysis()
00078 {
00079 cout << "**** TRPCAnalysis: Delete instance" << endl;
00080 }
00081