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