#ifndef HONLINESERVER_H #define HONLINESERVER_H // root specs #include "TMutex.h" #include "TString.h" #include "TObjString.h" #include "TMap.h" #include "TObjString.h" #include "honlinehadesconfigparameter.h" #include "honlineresetparameter.h" #include "honlinemdcactiveparameter.h" #include "honlinephysicsactiveparameter.h" #include "honlineclientservercom.h" //hydra specs #include "hades.h" #include "htree.h" #include "hldfilesource.h" #include "hspectrometer.h" #include "hruntimedb.h" // root specs #include "TH1.h" #include "TH2.h" #include "TList.h" class HldSockRemoteSource; class HldGrepFileSource; class HldSource; class HldFileSource; class HOraInfo; class HOnlineConfig; class HOnlineParam; class HOnlineStartHistBooker; class HOnlineHodoHistBooker; class HOnlineWallHistBooker; class HOnlineRichHistBooker; class HOnlineMdcHistBooker; class HOnlineTofHistBooker; class HOnlineTofinoHistBooker; class HOnlineShowerHistBooker; class HOnlinePhysicsHistBooker; class TStopwatch; class HOnlineRichPattern; class HOnlineRichFancy; class HOnlineHadesPar; class HOnlineServer : public TNamed { public: HOnlineServer(); ~HOnlineServer(); void setConfigFile(TString param) { if(param.CompareTo("")==0) { Error("HOnlineServer:SetConfigFile()","NO CONFIG INPUT!"); exit(1); } else{ ConfigInput=param; } } Bool_t createOnlineHists(); Bool_t readConfig(); Bool_t setDataSource(); Int_t initDetectorSetup(); Int_t initParams(); Bool_t initEventClasses(); Bool_t createUnpackers(); Bool_t createTaskList(); Int_t eventLoop(HOnlineClientServerCom* clientservercom); private: Bool_t readAscii (const Char_t* fileName); void addParameter(HOnlineParameter* par){ parameterList.Add(par); } TStopwatch* timer; //! //------------------------------------------ // configuration params TString* inFile; //! TString* inDir; //! TString* outDir; //! TString* ParFile; //! TString* ParFile2; //! TString* FirstInput; //! TString* SecondInput; //! TString* Beamtime; //! TString ConfigInput; //! TString* eventHost; //! HldSource *source; //! HldFileSource *sourceFile; //! HldGrepFileSource *sourceGrep; //! HldSockRemoteSource *sourceR; //! //--------Grep source parameter ------------ Int_t distToLast; //! last file - distToLast will be taken Int_t timeOffset; //! offset in seconds required to t_current Int_t interval; ; //! time interval in seconds for grep on dir //------------------------------------------ HSpectrometer* spec; //! HRuntimeDb* rtdb; //! Int_t refrunID; //! Int_t nOracle; //! Int_t kEvtRemote; //! static Bool_t kINIT; //! static Int_t fCount; //! static Int_t nLoop; //! Hades* myHades; //! //parameter Int_t fxTreeSize; Int_t fxRefreshNb; Int_t fxReset; Bool_t fxDump; Bool_t fbInit; //------------------------------------------ // config parameter static HOnlineHadesPar* hadespar; static HOnlineParam* onlineparam; static HOnlineConfig* onlineconfig; // parameter for communication server/client TList parameterList; HOnlineHadesConfigParameter* hadesconfig; HOnlineResetParameter* reset; HOnlineMdcActiveParameter* mdcActive; HOnlinePhysicsActiveParameter* physicsActive; // histogram pool (all hists, which clients can receive) TList histpool; //------------------------------------------ // hist bookers and list of histograms static TList* StartactiveHists; static HOnlineStartHistBooker* Starthistbooker; static TList* HodoactiveHists; static HOnlineHodoHistBooker* Hodohistbooker; static TList* WallactiveHists; static HOnlineWallHistBooker* Wallhistbooker; static TList* RichactiveHists; static HOnlineRichHistBooker* Richhistbooker; static HOnlineRichPattern* richpattern; static HOnlineRichFancy* richfancy; static TList* MdcactiveHists; static HOnlineMdcHistBooker* Mdchistbooker; static TList* TofactiveHists; static HOnlineTofHistBooker* Tofhistbooker; static TList* TofinoactiveHists; static HOnlineTofinoHistBooker* Tofinohistbooker; static TList* ShoweractiveHists; static HOnlineShowerHistBooker* Showerhistbooker; static TList* PhysicsactiveHists; static HOnlinePhysicsHistBooker* Physicshistbooker; //------------------------------- ClassDef(HOnlineServer,0) //Control class for Hades reconstruction }; #endif