Go to the documentation of this file.00001
00002
00003 void go4Init()
00004 {
00005 gSystem->Load("libThread.so");
00006 gSystem->Load("libMinuit.so");
00007 gSystem->Load("$GO4SYS/lib/libGo4Base.so");
00008 gSystem->Load("$GO4SYS/lib/libGo4Fit.so");
00009 gSystem->Load("$GO4SYS/lib/libGo4ThreadManager.so");
00010 gSystem->Load("$GO4SYS/lib/libGo4TaskHandler.so");
00011 gSystem->Load("$GO4SYS/lib/libGo4AnalBase.so");
00012 gSystem->Load("$GO4SYS/lib/libGo4Analysis.so");
00013 go4StartServer();
00014 }
00015
00016 void go4StartServer()
00017 {
00018 TDirectory* savdir=gDirectory;
00019 TGo4Log::Instance();
00020 TGo4Log::SetIgnoreLevel(1);
00021
00022
00023 TGo4Log::LogfileEnable(kFALSE);
00024
00025 TGo4Analysis* go4 = 0;
00026
00027 if (TGo4Analysis::Exists()) {
00028 go4 = TGo4Analysis::Instance();
00029 go4->CloseAnalysis();
00030 go4->InitEventClasses();
00031 } else {
00032 new TGo4AnalysisClient("Go4CintServer",
00033 0,
00034 "localhost",
00035 1234,
00036 0,
00037 "",
00038 "",
00039 kTRUE,
00040 kFALSE,
00041 kTRUE);
00042 go4 = TGo4Analysis::Instance();
00043 }
00044 if(savdir) savdir->cd();
00045 }
00046
00047 void go4RegisterAll()
00048 {
00049 TGo4Analysis* go4 = TGo4Analysis::Instance();
00050 TDirectory* gdir = gDirectory;
00051
00052
00053
00054
00055
00056
00057
00058 if (gdir!=0) {
00059 gdir->cd();
00060 TIter iter(gdir->GetList());
00061 TObject* obj = 0;
00062 while (obj = iter()) {
00063 if (obj->InheritsFrom(TH1::Class()))
00064 go4->AddHistogram((TH1*)obj);
00065 }
00066 }
00067 }
00068