18 #include "TInterpreter.h"
20 #include "TStopwatch.h"
87 gSystem->ProcessEvents();
97 Wait(timeout<=0 ? 0 : timeout*0.001);
104 Double_t spenttime = 0.;
105 Bool_t first = kTRUE;
109 if (first) first = kFALSE;
110 else gSystem->Sleep(50);
111 gSystem->ProcessEvents();
113 spenttime += watch.RealTime();
114 }
while (spenttime <= tm_sec);
131 const char* analisysitem =
"Analysis";
143 dynamic_cast<TGo4AnalysisProxy*> (analslot->
GetProxy());
158 const char* ClientDir,
159 const char* ClientExec,
160 const char* ClientNode,
164 const char* UserArgs)
166 TString launchcmd, killcmd;
181 gSystem->ProcessEvents();
188 Int_t ControllerMode,
189 const char* password)
201 if (ControllerMode>0)
217 Error(
"WaitAnalysis",
"Analysis not found");
223 while (delay_sec-->0) {
224 gSystem->ProcessEvents();
226 gSystem->ProcessEvents();
266 Int_t delay_sec = tmout > 0 ? tmout : 20;
267 while (delay_sec-->0) {
268 gSystem->ProcessEvents();
269 gSystem->Sleep(1000);
270 gSystem->ProcessEvents();
285 gSystem->ProcessEvents();
287 gSystem->ProcessEvents();
297 gSystem->ProcessEvents();
298 gSystem->Sleep(1000);
299 gSystem->ProcessEvents();
309 Int_t delay_sec = tmout > 0 ? tmout : 10;
310 while (delay_sec-->0) {
311 gSystem->ProcessEvents();
312 gSystem->Sleep(1000);
313 gSystem->ProcessEvents();
322 if (anal==0)
return 0;
336 if (status==0)
return;
359 Bool_t enableprocess,
372 const char* sourcename,
384 const char* sourcename,
397 if(TagFile==0) par.
SetTagName(
"GO4-NOLMDTAG");
406 const char* sourcename,
424 const char* sourcename,
442 const char* sourcename,
460 const char* sourcename,
480 const char* sourcename,
492 const char* sourcename,
508 const char* storename,
528 const char* storename,
548 static Int_t cancounter = 0;
550 TString cname =
"Panel";
553 TCanvas* c =
new TCanvas(cname.Data(), TString(
"Drawing of ") + cname, width, height);
564 TCanvas* c = (TCanvas*) handle;
565 return TString(c ? c->GetName() :
"");
575 TCanvas* c = (TCanvas*) handle;
576 if ((c==0) || (newname==0) || (strlen(newname)==0))
return kFALSE;
578 if (gROOT->GetListOfCanvases()->FindObject(newname)) {
579 Message(Form(
"Canvas with name %s already exists",newname));
592 if (gPad==0)
return 0;
598 TCanvas* c = (TCanvas*) handle;
607 TCanvas* c = (TCanvas*) handle;
608 if (c!=0) c->Divide(numX, numY);
613 TCanvas* c = (TCanvas*) handle;
614 if (c!=0)
return (TPad*) c->cd(number);
622 TObject* obj =
GetObject(itemname, 5000);
624 if (obj!=0) obj->Draw(drawopt);
633 TIter next(gROOT->GetListOfCanvases());
635 while ((pad = (TPad*) next()) != 0) {
638 TVirtualPad* subpad = 0;
640 while ((subpad = pad->GetPad(number++))!=0)
674 if ((filename==0) || (strlen(filename)==0))
return;
691 Error(
"ProcessHotStart",
"Internal problem");
701 gROOT->ProcessLineSync(nextcmd, &error);
705 Error(
"ProcessHotStart",
"ProcessLine(\"%s\") error %d", nextcmd, error);
Bool_t IsAnalysisSettingsReady() const
void SetAutoFileName(const char *name)
TGo4AnalysisProxy * AddAnalysisProxy(Bool_t isserver)
void SetCompression(Int_t comp)
void SetStartEvent(UInt_t firstindex)
void Message(const char *str1, const char *str2, Int_t blockdelay)
void SetProcessEnabled(Bool_t on=kTRUE)
virtual TObject * GetObject(const char *itemname, Int_t updatelevel=1)
void StepMbsFileSource(const char *stepname, const char *sourcename, int timeout, const char *TagFile, int start=0, int stop=0, int interval=0)
ViewPanelHandle StartViewPanel()
void SetStoreEnabled(Bool_t on=kTRUE)
Bool_t IsAnalysisReady() const
void SetSplitlevel(Int_t split)
Bool_t LoadHotStart(const char *filename)
void SetSplitlevel(Int_t split)
void StepMbsEventServerSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
void SetStopEvent(UInt_t lastindex)
void StepRandomSource(const char *stepname, const char *sourcename, int timeout)
TGo4BrowserProxy * Browser() const
void SetAutoSaveOn(Bool_t on=kTRUE)
TGo4Proxy * GetProxy() const
Bool_t LaunchAsClient(TString &launchcmd, TString &killcmd, Int_t shellkind, Int_t konsole, const char *name, const char *remotehost, const char *remotedir, const char *remoteexe, Int_t exe_kind=0, const char *exeargs=0)
void Initialize(TGo4ObjectManager *om, TGo4BrowserProxy *br)
list of shared libraries when application is started
void DisconnectAnalysis()
void MakeFolder(const char *pathname)
void RefreshNamesList(int tmout=10)
virtual void RedrawItem(const char *itemname)
void HotStart(const char *filename)
void ProcessEvents(Int_t timeout=-1)
TGo4RootBrowserProxy * fRootBrowser
void SetSourceEnabled(Bool_t on=kTRUE)
void StepFileSource(const char *stepname, const char *sourcename, int timeout)
virtual Bool_t RefreshNamesList()
Bool_t DrawItem(const char *itemname, ViewPanelHandle panel=0, const char *drawopt=0)
virtual Bool_t IsAdministrator()
void StepBackStore(const char *stepname, const char *storename, int bufsize, int splitlevel)
void SetAutosaveSize(Int_t interval)
void StepFileStore(const char *stepname, const char *storename, bool overwrite, int bufsize, int splitlevel, int compression, int autosaveperiod=10000)
TPad * SelectPad(ViewPanelHandle panel, Int_t number=0)
virtual Bool_t IsAnalysisServer() const
void SetTagName(const char *name)
void RedrawPanel(ViewPanelHandle panel)
TGo4AnalysisProxy * Analysis()
void ConfigStep(const char *stepname, Bool_t enableprocess, Bool_t enablesource, Bool_t enablestore)
void SetStorePar(TGo4EventStoreParameter *kind)
virtual void StartAnalysis()
TGo4Slot * DataSlot(const char *item)
Bool_t ConnectToServer(const char *remotehost, Int_t remoteport, Int_t ascontroller, const char *accesspass)
const char * NextHotStartCmd()
TGo4Slot * RatemeterSlot()
void SetSourcePar(TGo4EventSourceParameter *kind)
TObject * GetAssignedObject()
void SetDefaultReceiver(TGo4ObjectManager *rcv, const char *path)
virtual void RequestAnalysisSettings()
void SetAnalysisReady(Bool_t on=kTRUE)
void SetOverwriteMode(Bool_t over=kTRUE)
void StepMbsRevServSource(const char *stepname, const char *sourcename, int timeout, int port, int start=0, int stop=0, int interval=0)
virtual Bool_t IsConnected()
Bool_t SetViewPanelName(ViewPanelHandle handle, const char *newname)
ViewPanelHandle GetActiveViewPanel()
void CreateMemoryFolder(const char *foldername=0)
TGo4Slot * SettingsSlot()
void AnalysisAutoSave(const char *filename, Int_t interval, Int_t compression, Bool_t enabled, Bool_t overwrite)
TGo4ServerProxy * Server()
TGo4AnalysisStepStatus * GetStepStatus(const char *stepname)
void SetTimeout(Int_t out)
virtual Bool_t NamesListReceived()
void SetEventInterval(UInt_t skipinterval)
void SetBufsize(Int_t bufsize)
TGo4AnalysisStepStatus * GetStepStatus(const char *name)
void DivideViewPanel(ViewPanelHandle panel, Int_t numX, Int_t numY)
void AddProxy(const char *pathname, TGo4Proxy *cont, const char *name, const char *title="title")
virtual void SubmitAnalysisSettings()
void StepUserSource(const char *stepname, const char *sourcename, int timeout, int port, const char *expr)
ViewPanelHandle FindViewPanel(const char *name)
void StepMbsStreamSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
void SetExpression(const char *name)
void SubmitAnalysisConfig(int tmout=20)
TGo4Slot * BrowserTopSlot()
void SetAutoSaveOverwrite(Bool_t over=kTRUE)
virtual void StopAnalysis()
virtual Bool_t HandleTimer(TTimer *timer)
void SetConfigFileName(const char *name)
TGo4AnalysisStatus * GetAnalStatus()
void SetBufsize(Int_t bufsize)
virtual Bool_t DelayedRefreshNamesList(Int_t delay_sec)
void SetAutoSaveInterval(Int_t i)
TString GetViewPanelName(ViewPanelHandle handle)
TGo4ObjectManager * OM() const
void AnalysisConfigName(const char *filename)
void DrawPicture(const char *itemname, TGo4Picture *pic, TPad *pad)
void StepMbsTransportSource(const char *stepname, const char *sourcename, int timeout, int start=0, int stop=0, int interval=0)
void SetAutoSaveCompression(Int_t i=5)
void WaitAnalysis(Int_t delay_sec)
void ToggleMonitoring(Int_t period)
TGo4Slot * AddLink(TGo4Slot *source, const char *pathname, const char *linkname, const char *linktitle)
void Message(const char *msg)
virtual void DisconnectAnalysis(Int_t waittime=30, Bool_t servershutdown=kFALSE)
void RedrawItem(const char *itemname)
void ConnectAnalysis(const char *ServerNode, Int_t ServerPort, Int_t ControllerMode, const char *password=0)