• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

beamtime/gsi-aug12/prod/go4/VFTX/TVftxAnalysis.cxx (r4864/r3385)

Go to the documentation of this file.
00001 
00002 
00003 #include "TVftxAnalysis.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 TVftxAnalysis::TVftxAnalysis()
00017 {
00018 }
00019 //***********************************************************
00020 
00021 // this constructor is called by go4analysis executable
00022 TVftxAnalysis::TVftxAnalysis(int argc, char** argv) :
00023    TGo4Analysis(argc, argv)
00024 {
00025    cout << "**** Create TVftxAnalysis 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("MbsCrateProc","TMbsCrateProc");// object name, class name
00034    factory->DefOutputEvent("MbsCrateEvent","TMbsCrateEvent"); // object name, class name
00035 
00036    Text_t lmdfile[512]; // source file
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    // Now the first analysis step is set up.
00051    // Other steps could be created here
00052    AddAnalysisStep(step);
00053 
00054 
00055    TGo4StepFactory* factory2 = new TGo4StepFactory("Factory2");
00056    factory2->DefEventProcessor("VftxProc","TVftxProc");// object name, class name
00057    factory2->DefInputEvent("MbsCrateEvent","TMbsCrateEvent"); // object name, class name 
00058    factory2->DefOutputEvent("VftxEvent","TVftxEvent"); // object name, class name
00059 
00060 
00061    TGo4AnalysisStep* step2 = new TGo4AnalysisStep("VFTX", 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    // uncomment following line to define custom passwords for analysis server
00072    // DefineServerPasswords("CernOct11admin", "CernOct11ctrl", "CernOct11view");
00073 
00074 }
00075 
00076 //***********************************************************
00077 TVftxAnalysis::~TVftxAnalysis()
00078 {
00079    cout << "**** TVftxAnalysis: Delete instance" << endl;
00080 }
00081 

Generated on Tue Dec 10 2013 04:52:21 for ROCsoft by  doxygen 1.7.1