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

beamtime/cern-oct12/go4/RICH/TRICHAnalysis.cxx (r4864/r3724)

Go to the documentation of this file.
00001 #include "TRICHAnalysis.h"
00002 
00003 #include <stdlib.h>
00004 
00005 #include "Go4EventServer.h"
00006 #include "TGo4StepFactory.h"
00007 #include "TGo4AnalysisStep.h"
00008 #include "TGo4Version.h"
00009 #include "TGo4Log.h"
00010 
00011 
00012 //***********************************************************
00013 TRICHAnalysis::TRICHAnalysis()
00014 {
00015 }
00016 //***********************************************************
00017 
00018 // this constructor is called by go4analysis executable
00019 TRICHAnalysis::TRICHAnalysis(int argc, char** argv) :
00020    TGo4Analysis(argc, argv)
00021 {
00022    if (!TGo4Version::CheckVersion(__GO4BUILDVERSION__)) {
00023       TGo4Log::Error("Go4 version mismatch");
00024       exit(-1);
00025    }
00026 
00027    TGo4Log::Info("Create TRICHAnalysis name: %s", argv[0]);
00028 
00029    TGo4StepFactory* factory = new TGo4StepFactory("Factory");
00030    factory->DefEventProcessor("RocProc","TRocProc");// object name, class name
00031    factory->DefOutputEvent("RocEvent","TRocEvent"); // object name, class name
00032 
00033    Text_t lmdfile[512]; // source file
00034    sprintf(lmdfile,"%s/data/test.lmd",getenv("GO4SYS"));
00035    TGo4EventSourceParameter* sourcepar = new TGo4MbsFileParameter(lmdfile);
00036 
00037    TGo4FileStoreParameter* storepar = new TGo4FileStoreParameter(Form("%sOutput", argv[0]));
00038    storepar->SetOverwriteMode(kTRUE);
00039 
00040    TGo4AnalysisStep* step = new TGo4AnalysisStep("Unpack", factory, sourcepar, storepar);
00041 
00042    step->SetSourceEnabled(kTRUE);
00043    step->SetStoreEnabled(kFALSE);
00044    step->SetProcessEnabled(kTRUE);
00045    step->SetErrorStopEnabled(kTRUE);
00046 
00047    // Now the first analysis step is set up.
00048    // Other steps could be created here
00049    AddAnalysisStep(step);
00050 
00051 
00052    TGo4StepFactory* factory2 = new TGo4StepFactory("Factory2");
00053    factory2->DefEventProcessor("RICHProc","TRICHProc");// object name, class name
00054    factory2->DefInputEvent("RocEvent","TRocEvent"); // object name, class name 
00055    factory2->DefOutputEvent("RICHEvent","TRICHEvent"); // object name, class name
00056 
00057 
00058    TGo4AnalysisStep* step2 = new TGo4AnalysisStep("RICH", factory2, 0, 0);
00059 
00060    step2->SetSourceEnabled(kFALSE);
00061    step2->SetStoreEnabled(kFALSE);
00062    step2->SetProcessEnabled(kTRUE);
00063    step2->SetErrorStopEnabled(kTRUE);
00064 
00065    AddAnalysisStep(step2);
00066 
00067 
00068    // uncomment following line to define custom passwords for analysis server
00069    // DefineServerPasswords("CernOct11admin", "CernOct11ctrl", "CernOct11view");
00070 
00071 }
00072 
00073 //***********************************************************
00074 TRICHAnalysis::~TRICHAnalysis()
00075 {
00076    TGo4Log::Info("TRICHAnalysis: Delete instance");
00077 }

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