21 #include "TInterpreter.h"
22 #include "TObjString.h"
51 return "temporary object to setup viewpanel";
79 gROOT->ProcessLineSync(
"TGo4AbstractInterface* go4 = TGo4AbstractInterface::Instance();", &error);
80 gROOT->ProcessLineSync(
"TGo4ObjectManager* om = TGo4AbstractInterface::Instance()->OM();", &error);
81 gROOT->ProcessLineSync(
"TGo4BrowserProxy* br = TGo4AbstractInterface::Instance()->Browser();", &error);
82 gROOT->ProcessLineSync(Form(
".x %s",
TGo4Log::subGO4SYS(
"macros/go4macroinit.C").Data()));
89 gROOT->ProcessLine(Form(
".x %s",
TGo4Log::subGO4SYS(
"macros/go4macroclose.C").Data()));
91 gInterpreter->DeleteGlobal(
fBrowser);
92 gInterpreter->DeleteGlobal(
fOM);
93 gInterpreter->DeleteGlobal(
this);
111 if ((fname==0) || (strlen(fname)==0))
return;
113 TString libs = gInterpreter->GetSharedLibs();
115 const char* token = strtok((
char*) libs.Data(),
" ,\t\n");
118 if (strcmp(token, fname)==0)
return;
119 token = strtok(NULL,
" ,\t\n");
122 gSystem->Load(fname);
134 const char* filename,
135 const char* filetitle)
143 const char* filetitle)
146 if (topslot==0)
return kFALSE;
156 items.Add(
new TObjString(buf));
168 const char* basename,
169 const char* userpass,
193 if ((anal!=0) && (remotecmd!=0)) {
226 if (
Browser()->ItemSlot(objname)!=0)
return TString(objname);
253 if ((itemname==0) || (strlen(itemname)==0))
return 0;
271 std::ifstream f(filename);
273 if (!f.good())
return kFALSE;
278 f.getline(buf, 10000);
303 TObjString* str = (TObjString*)
fxCommands.First();
304 res = str->GetName();
305 if ((res==0) || (strlen(res)==0)) {
323 if (gSystem->Getenv(
"ROOTSYS") != 0) {
324 rootsys = gSystem->Getenv(
"ROOTSYS");
325 if (rootsys[rootsys.Length()-1] !=
'/') rootsys+=
"/";
330 TString libs = gInterpreter->GetSharedLibs();
331 const char* token = strtok((
char*) libs.Data(),
" ,\t\n");
336 && (strstr(token,
"libHistPainter.")==0)) {
337 fs <<
"go4->LoadLibrary(\"";
338 if ((go4sys.Length() > 0) && strstr(token, go4sys.Data())==token)
339 fs <<
"$GO4SYS/" << (token + go4sys.Length());
341 if ((rootsys.Length() > 0) && strstr(token, rootsys.Data())==token)
342 fs <<
"$ROOTSYS/" << (token + rootsys.Length());
346 fs <<
"\");" << std::endl;
348 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)