00001 // @(#)fROOT/STEER:$Name: $:$Id: TFndMonitorMan.h,v 1.8 2007/09/05 11:09:42 Diego_Faso Exp $ 00002 // Author: Diego Faso <mailto:faso@to.infn.it>, 2006/06/01 00003 00004 #ifndef FROOT_TFndMonitorMan 00005 #define FROOT_TFndMonitorMan 00006 00007 #ifndef ROOT_Gtypes 00008 #include "Gtypes.h" 00009 #endif 00010 00011 #include "FROOT.h" 00012 using namespace FROOT; 00013 00014 class TFndMonitorMan{ 00015 00016 protected: 00017 TThread *fCheckProdThread; 00018 TThread *fStartProdThread; 00019 TString fProducerCommand; 00020 00021 // private: 00022 // virtual void SendProducerCommand(TString appl,TString db_host,TString data_path,TString run_name,Int_t n_events); 00023 00024 public: 00025 TFndMonitorMan(); 00026 virtual ~TFndMonitorMan(); 00027 00028 // void SetProducerCommand(TString command) { fProducerCommand = command; } 00029 TString GetProducerCommand() { return fProducerCommand; } 00030 virtual void StopCheckRunningThread(); 00031 00032 static void *CheckRunningProdThread(void *arg); // Check current online producer 00033 static void *RunProdThread(void *arg); // Start new producer process in a new thread 00034 00035 virtual void SendProducerCommand(TString appl,TString db_host,TString data_path,TString run_type,Int_t run_num,Int_t n_events); 00036 00037 void AutoRestartOnlineProd(Int_t mode=1); // default will try to recovery histograms content 00038 00039 virtual void KillCurrentProducer(); 00040 virtual void KillOtherProducers(); 00041 virtual void KillYourself(); 00042 virtual void RemoveMapFiles(); 00043 00044 ClassDef(TFndMonitorMan,0) 00045 }; 00046 00047 #endif // FROOT_TFndMonitorMan