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

beamtime/cosy-nov11/go4/SISTRIPS/TSiStripsAnalysis.cxx (r4864/r3159)

Go to the documentation of this file.
00001 
00002 
00003 #include "TSiStripsAnalysis.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 
00020 //***********************************************************
00021 TSiStripsAnalysis::TSiStripsAnalysis()
00022 {
00023 }
00024 //***********************************************************
00025 
00026 // this constructor is called by go4analysis executable
00027 TSiStripsAnalysis::TSiStripsAnalysis(int argc, char** argv) :
00028    TGo4Analysis(argc, argv)
00029 {
00030    cout << "**** Create TSiStripsAnalysis name: " << argv[0] << endl;
00031 
00032    if (!TGo4Version::CheckVersion(__GO4BUILDVERSION__)) {
00033       cout << "****  Go4 version mismatch" << endl;
00034       exit(-1);
00035    }
00036 
00037 // standalone analsis will be one step with direct lmd input:
00038 
00039   TGo4StepFactory* factory = new TGo4StepFactory("Factory");
00040   factory->DefEventProcessor("ExploderProc","TExploderProc");// object name, class name
00041   factory->DefOutputEvent("ExploderEvent","TExploderEvent");
00042 
00043    Text_t lmdfile[512]; // source file
00044    sprintf(lmdfile,"%s/data/test.lmd",getenv("GO4SYS"));
00045    TGo4EventSourceParameter* sourcepar = new TGo4MbsFileParameter(lmdfile);
00046 
00047    TGo4FileStoreParameter* storepar = new TGo4FileStoreParameter(Form("%sOutput", argv[0]));
00048    storepar->SetOverwriteMode(kTRUE);
00049 
00050    TGo4AnalysisStep* step = new TGo4AnalysisStep("EXPLODER", factory, sourcepar, storepar);
00051 
00052    step->SetSourceEnabled(kTRUE);
00053    step->SetStoreEnabled(kFALSE);
00054    step->SetProcessEnabled(kTRUE);
00055    step->SetErrorStopEnabled(kTRUE);
00056 
00057    // Now the first analysis step is set up.
00058    // Other steps could be created here
00059    AddAnalysisStep(step);
00060 
00061 
00062    TGo4StepFactory* factory2 = new TGo4StepFactory("Factory2");
00063    factory2->DefEventProcessor("SiStripsProc","TSiStripsProc");// object name, class name
00064    factory2->DefInputEvent("ExploderEvent","TExploderEvent"); // object name, class name
00065    factory2->DefOutputEvent("SiStripsEvent","TSiStripsEvent"); // object name, class name
00066 
00067 
00068    TGo4AnalysisStep* step2 = new TGo4AnalysisStep("SISTRIPS", factory2, 0, 0);
00069 
00070    step2->SetSourceEnabled(kFALSE);
00071    step2->SetStoreEnabled(kFALSE);
00072    step2->SetProcessEnabled(kTRUE);
00073    step2->SetErrorStopEnabled(kTRUE);
00074 
00075    AddAnalysisStep(step2);
00076 
00077 
00078    // uncomment following line to define custom passwords for analysis server
00079    // DefineServerPasswords("CernOct11admin", "CernOct11ctrl", "CernOct11view");
00080 
00081 }
00082 
00083 //***********************************************************
00084 TSiStripsAnalysis::~TSiStripsAnalysis()
00085 {
00086    cout << "**** TSiStripsAnalysis: Delete instance" << endl;
00087 }
00088 

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