00001 // $Id: TGo4Dabc.cxx 1217 2014-07-23 08:03:33Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 00015 #include "TGo4Dabc.h" 00016 00017 #include "TGo4Sniffer.h" 00018 #include "THttpServer.h" 00019 #include "TGo4AnalysisImp.h" 00020 00021 THttpServer* gGo4HttpServer = 0; 00022 00023 bool TGo4Dabc::CreateEngine(const char* args) 00024 { 00025 if (gGo4HttpServer == 0) { 00026 gGo4HttpServer = new THttpServer(""); 00027 00028 gGo4HttpServer->SetSniffer(new TGo4Sniffer("go4_dabc")); 00029 } 00030 00031 const char* separ = (strchr(args,'?')!=0) ? "&" : "?"; 00032 00033 TString allargs; 00034 00035 allargs.Form("%s%splayer=TGo4DabcPlayer&top=Go4", args, separ); 00036 00037 if (TGo4Analysis::Instance()!=0) { 00038 allargs.Append("/"); 00039 allargs.Append(TGo4Analysis::Instance()->GetName()); 00040 } 00041 00042 return gGo4HttpServer->CreateEngine(allargs.Data()); 00043 }