20 #include "TInterpreter.h"
21 #include "TObjString.h"
22 #include "Riostream.h"
53 return "temporary object to setup viewpanel";
81 gROOT->ProcessLineSync(
"TGo4AbstractInterface* go4 = TGo4AbstractInterface::Instance();", &error);
82 gROOT->ProcessLineSync(
"TGo4ObjectManager* om = TGo4AbstractInterface::Instance()->OM();", &error);
83 gROOT->ProcessLineSync(
"TGo4BrowserProxy* br = TGo4AbstractInterface::Instance()->Browser();", &error);
84 gROOT->ProcessLineSync(Form(
".x %s",
TGo4Log::subGO4SYS(
"macros/go4macroinit.C").Data()));
91 gROOT->ProcessLine(Form(
".x %s",
TGo4Log::subGO4SYS(
"macros/go4macroclose.C").Data()));
93 gInterpreter->DeleteGlobal(
fBrowser);
94 gInterpreter->DeleteGlobal(
fOM);
95 gInterpreter->DeleteGlobal(
this);
113 if ((fname==0) || (strlen(fname)==0))
return;
115 TString libs = gInterpreter->GetSharedLibs();
117 const char* token = strtok((
char*) libs.Data(),
" ,\t\n");
120 if (strcmp(token, fname)==0)
return;
121 token = strtok(NULL,
" ,\t\n");
124 gSystem->Load(fname);
136 const char* filename,
137 const char* filetitle)
145 const char* filetitle)
148 if (topslot==0)
return kFALSE;
158 items.Add(
new TObjString(buf));
170 const char* basename,
171 const char* userpass,
195 if ((anal!=0) && (remotecmd!=0)) {
228 if (
Browser()->ItemSlot(objname)!=0)
return TString(objname);
255 if ((itemname==0) || (strlen(itemname)==0))
return 0;
273 std::ifstream f(filename);
275 if (!f.good())
return kFALSE;
280 f.getline(buf, 10000);
305 TObjString* str = (TObjString*)
fxCommands.First();
306 res = str->GetName();
307 if ((res==0) || (strlen(res)==0)) {
325 if (gSystem->Getenv(
"ROOTSYS") != 0) {
326 rootsys = gSystem->Getenv(
"ROOTSYS");
327 if (rootsys[rootsys.Length()-1] !=
'/') rootsys+=
"/";
332 TString libs = gInterpreter->GetSharedLibs();
333 const char* token = strtok((
char*) libs.Data(),
" ,\t\n");
338 && (strstr(token,
"libHistPainter.")==0)) {
339 fs <<
"go4->LoadLibrary(\"";
340 if ((go4sys.Length() > 0) && strstr(token, go4sys.Data())==token)
341 fs <<
"$GO4SYS/" << (token + go4sys.Length());
343 if ((rootsys.Length() > 0) && strstr(token, rootsys.Data())==token)
344 fs <<
"$ROOTSYS/" << (token + rootsys.Length());
348 fs <<
"\");" << std::endl;
350 token = strtok(NULL,
" ,\t\n");
static TGo4AbstractInterface * fgInstance
virtual TObject * GetObject(const char *itemname, Int_t updatelevel=1)
void OpenFile(const char *fname)
virtual Bool_t IsConnected()
Bool_t LoadHotStart(const char *filename)
TString FindItem(const char *objname)
TString SaveToMemory(const char *pathname, TObject *obj, Bool_t ownership, Bool_t overwrite=kFALSE)
TObject * GetBrowserObject(const char *name, Int_t update=0)
void ExportItemsTo(TObjArray *items, Bool_t fetchitems, const char *filename, const char *filedir, const char *format, const char *description)
virtual Bool_t ExportToFile(const char *itemname, const char *dirpath, const char *format, const char *filetitle=0)
virtual void FetchItem(const char *itemname, Int_t wait_time=2000)
TGo4BrowserProxy * Browser() const
void Initialize(TGo4ObjectManager *om, TGo4BrowserProxy *br)
list of shared libraries when application is started
virtual void RequestAnalysisConfig()
virtual void RedrawItem(const char *itemname)
TGo4Slot * getslot() const
Bool_t DeleteDataSource(TGo4Slot *itemslot)
static void SetInitSharedLibs(const char *libs=0)
static const char * FileExtension()
virtual TString SaveToMemory(const char *path, TObject *obj, Bool_t ownership=kFALSE)
virtual void RequestAnalysisSettings()
virtual Bool_t SaveToFile(const char *itemname, const char *filename, const char *filetitle=0)
TGo4ServerProxy * FindServer(const char *itemname=0, Bool_t asanalysis=kTRUE)
Bool_t ConnectHServer(const char *servername, Int_t portnumber, const char *basename, const char *userpass, const char *filter)
virtual void OpenFile(const char *fname)
TGo4AnalysisProxy * Analysis()
Bool_t SaveBrowserToFile(const char *filename, Bool_t prefetch=kFALSE, const char *selectedpath=0, const char *description=0)
const char * NextHotStartCmd()
virtual void ExecuteLine(const char *line)
virtual Bool_t IsAnalysisConnected()
static void DeleteInstance()
static TString fInitSharedLibs
virtual void ConnectHServer(const char *servername, Int_t portnumber, const char *basename, const char *userpass, const char *filter)
static const char * DefaultPicTitle()
static Int_t DelayMillisec()
virtual Bool_t DeleteItem(const char *itemname)
virtual void StartMonitoring(Int_t period=10)
TGo4ServerProxy * Server()
virtual void ProcessEvents(Int_t timeout=-1)=0
virtual void ExecuteLine(const char *remotecmd)
static const char * Message(Int_t prio, const char *text,...)
void FetchItem(const char *itemname, Int_t wait_time=0)
TGo4BrowserProxy * fBrowser
TGo4Slot * BrowserSlot(const char *item)
void SetItemMonitored(TGo4Slot *slot, Bool_t on=kTRUE)
virtual Bool_t CopyItem(const char *itemname)
Bool_t ProduceExplicitCopy(const char *itemname, const char *tgtpath=0, Bool_t forcerequest=kFALSE)
Bool_t ConnectDabc(const char *nodename)
void RedrawItem(const char *itemname)
TGo4AnalysisProxy * FindAnalysis(const char *itemname=0)
virtual void StopMonitoring()
static void ProduceLoadLibs(std::ostream &fs)
virtual void ConnectDabc(const char *servername)
static TString subGO4SYS(const char *subdir)
virtual TString FindItem(const char *objname)
virtual void MonitorItem(const char *itemname, Bool_t on=kTRUE)
static TGo4AbstractInterface * Instance()
static const char * GO4SYS()
virtual ~TGo4AbstractInterface()
Bool_t BrowserItemName(TGo4Slot *itemslot, TString &res)
TGo4Slot * ItemSlot(const char *itemname)
void ToggleMonitoring(Int_t period)
Bool_t next(Bool_t goesinto=kTRUE)
virtual void LoadLibrary(const char *fname)