42 #include "TGo4LockGuard.h"
67 const char* classname,
68 const char* fullpath) :
84 virtual Bool_t
IsRemote()
const {
return kTRUE; }
109 return (res<0) || (res > millisec);
112 void ReceiveObject(TObject* obj,
const char* objfolder,
const char* objname, Bool_t owner)
116 if ((objfolder!=0) && (strlen(objfolder)!=0)) {
117 path += objfolder; path +=
"/";
119 if ((objname!=0) && (strlen(objname)!=0)) path += objname;
163 fIter = folder->GetListOfFolders()->MakeIterator();
179 return ((dynamic_cast<TFolder*>(
fCurrent)!=0) ||
180 (dynamic_cast<TGo4TreeStructure*>(
fCurrent)!=0));
185 if (strcmp(flagname,
"IsRemote")==0)
return 1;
186 if (strcmp(flagname,
"IsDeleteProtect")==0) {
191 if (strcmp(flagname,
"IsResetProtect")==0) {
256 if (entry==0)
return 0;
258 if (entry->InheritsFrom(TGo4TreeStructure::Class()))
259 return TTree::Class()->GetName();
261 if(entry->InheritsFrom(TGo4BranchStatus::Class())) {
266 if (entry->InheritsFrom(TGo4ParameterStatus::Class())) {
271 if(entry->InheritsFrom(TGo4AnalysisStatus::Class())) {
272 return TGo4AnalysisStatus::Class()->GetName();
275 if(entry->InheritsFrom(TGo4ObjectStatus::Class())) {
280 return entry->ClassName();
297 fbNamesListReceived(kFALSE),
298 fbAnalysisRunning(kFALSE),
299 fDisconectCounter(-111),
303 fxConnectionTimer(0),
304 fNumberOfWaitingProxyes(0)
335 TGo4Log::Debug(
"TGo4Display instance is not deleted correctly when analysis proxy is destroyed");
439 if (proxy==0)
continue;
441 if ((pathname!=0) && (strcmp(proxy->
GetPathName(), pathname)!=0))
continue;
449 bool docompress =
false;
450 if (proxytodelete!=0) {
452 delete proxytodelete;
459 if (proxy==0)
continue;
476 if (dynamic_cast<TGo4AnalysisStatus*> (status)!=0) {
510 fullname.Prepend(
"/");
524 TString message = status->GetName();
528 if(message.Contains(
"event classes were initialized"))
533 for(
int j=0; j<4;++j)
540 if (message.Contains(
"is shutting down now!")) {
544 if(qu!=0) qu->
Clear();
554 if (status!=0)
delete status;
569 TObject* envelopeobj = envelope->
TakeObject();
570 if ((envelopeobj!=0) && envelopeobj->InheritsFrom(TH1::Class()))
571 ((TH1*) envelopeobj)->SetDirectory(0);
640 if (classname==0)
return 0;
642 TString objfolder, objname;
660 if (proxy==0)
return kFALSE;
683 rcvname.Append(
"_status");
691 Bool_t astree = strcmp(proxy->
GetPathName(),
"Tree")==0;
695 com->SetValue(kFALSE,0);
696 com->SetValue(kFALSE,1);
697 com->SetValue(astree,2);
706 if ((fullname==0) || (tgtslot==0))
return kFALSE;
708 TString objfolder, objname;
721 if (evname==0)
return;
723 TString folder, name;
738 if (astree) folder =
"Tree";
739 else folder =
"Event";
754 TString tfoldername, tobjectname;
757 TString hfoldername, hobjectname;
787 if (obj==0)
return kFALSE;
789 const char* objname = obj->GetName();
790 if ((objname==0) || (*objname==0))
return kFALSE;
803 if((fname==0) || (strlen(fname)==0)) {
815 if((fname==0) || (strlen(fname)==0)) {
868 TString foldername, objectname;
877 TString foldername, objectname;
887 TString foldername, objectname;
922 TString foldername, objectname;
935 if (tsk==0)
return 0;
946 const char* remotehost,
947 const char* remotedir,
948 const char* remoteexe,
955 if (tsk==0)
return kFALSE;
961 name, remotehost, remotedir, remoteexe,
962 guiport, exe_kind, exeargs))
return kFALSE;
966 if ((konsole==2) || (konsole==3))
967 gSystem->Exec(launchcmd.Data());
969 fNodeName.Form(
"%s:%d",remotehost,guiport);
978 const char* remotehost,
980 const char* remotedir,
981 const char* remoteexe,
987 name, remotehost, remotedir, remoteexe,
988 remoteport, exe_kind, exeargs))
return kFALSE;
990 if ((konsole==2) || (konsole==3))
991 gSystem->Exec(launchcmd.Data());
999 const char* accesspass)
1006 switch (ascontroller) {
1016 default: accesspass =
"";
break;
1021 client->
ConnectServer(remotehost, remoteport, mode, accesspass);
1022 fNodeName.Form(
"%s:%d",remotehost,remoteport);
1031 Int_t period = seconds*1000;
1034 gSystem->Sleep(100);
1035 gSystem->ProcessEvents();
1111 std::cout<<
" TGo4AnalysisProxy::HandleTimer still sees not that display is gone. Cleanup myself!"<< std::endl;
void SetLine(const char *name)
void DisplayDeleted(TGo4Display *displ)
virtual Bool_t RefreshNamesList()
virtual Int_t getflag(const char *flagname)
virtual Bool_t DelayedRefreshNamesList(Int_t delay_sec)
Bool_t IsDeleteProtect() const
TGo4AnalysisLevelIter(TFolder *folder, Bool_t istree=kFALSE)
virtual Bool_t HandleTimer(TTimer *timer)
TGo4AnalysisProxy(Bool_t isserver=kFALSE)
const char * GetObjectFullName() const
void SetDefaultReceiver(TGo4ObjectManager *rcv, const char *path)
void SetProxy(TGo4Proxy *cont)
virtual Int_t Initialization()
TGo4Slot * UpdateObjectSlot()
UInt_t GetNegotiationPort()
virtual void LoadConfigFile(const char *fname)
virtual const char * info()
virtual TGo4LevelIter * subiterator()
TGo4ObjectManager * fxReceiver
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 SetAggregate(TObject *ob)
void ReceiveStatus(TGo4Status *status)
virtual Bool_t IsRemote() const
void ChangeObjectName(const char *newname)
virtual void RemoteTreeDraw(const char *treename, const char *varexp, const char *cutcond, const char *hname)
void DoObjectAssignement(TGo4ObjectManager *rcv, const char *path, TObject *obj, Bool_t owner)
virtual TGo4TaskHandler * GetTaskHandler()
virtual void ClearAllAnalysisObjects()
virtual void ClearAnalysisObject(const char *fullpath)
Bool_t SubmitProxy(TGo4AnalysisObjectAccess *proxy)
virtual void RequestEventStatus(const char *evname, Bool_t astree, TGo4Slot *tgtslot)
void DeleteChilds(const char *startedwith=0)
TFolder * GetNamesFolder(Bool_t chown=kFALSE)
virtual Bool_t IsViewer()
Bool_t IsAnalysisRunning()
virtual Bool_t IsAdministrator()
void AssignNewNamesList(TGo4AnalysisObjectNames *objnames)
virtual Bool_t IsController()
virtual Bool_t HasSublevels() const
void ReceiveObject(TObject *obj, const char *objfolder, const char *objname, Bool_t owner)
virtual ~TGo4AnalysisObjectAccess()
TGo4AnalysisObjectNames * fAnalysisNames
virtual Bool_t IsAnalysisServer() const
Bool_t IsResetProtect() const
virtual void Clear(Option_t *opt="")
virtual void Update(TGo4Slot *slot, Bool_t strong)
virtual void RemotePrintEvent(const char *evname, Int_t evnumber, Int_t subid, Bool_t ishex, Bool_t islong)
virtual const char * name()
Bool_t ConnectToServer(const char *remotehost, Int_t remoteport, Int_t ascontroller, const char *accesspass)
virtual void Initialize(TGo4Slot *slot)
TGo4Slot * RatemeterSlot()
TObject * GetAssignedObject()
void SetDefaultReceiver(TGo4ObjectManager *rcv, const char *path)
virtual void RequestAnalysisSettings()
void SetAnalysisReady(Bool_t on=kTRUE)
virtual void WriteAutoSave(const char *fname, Int_t complevel, Bool_t overwrite)
void SetAnalysis(TGo4AnalysisProxy *an)
virtual Bool_t IsConnected()
TGo4Slot * FindChild(const char *name)
virtual ~TGo4AnalysisProxy()
virtual const char * GetContainedObjectInfo()
virtual void Finalize(TGo4Slot *slot)
TGo4Slot * SettingsSlot()
TTimer * fxConnectionTimer
void ReceiveObject(TNamed *obj)
virtual TGo4BufferQueue * GetCommandQueue(const char *task=0)
void SetAnalysisSettingsReady(Bool_t on=kTRUE)
TGo4AnalysisObjectNames * GetNamesList(Bool_t chown=kTRUE)
virtual Bool_t NamesListReceived()
virtual Bool_t CanGetObject() const
void DisplayDisconnected(TGo4Display *displ)
virtual void RemoveObjectFromAnalysis(const char *fullpath)
virtual const char * GetObjectClassName() const
virtual void WriteData(TGo4Slot *slot, TDirectory *dir, Bool_t onlyobjs)
virtual const char * GetObjectName() const
static const char * EntryClassName(TObject *entry)
static Bool_t GetLaunchString(TString &launchcmd, TString &killcmd, Int_t serverkind, Int_t shellkind, Int_t konsole, const char *name, const char *remotehost, const char *remotedir, const char *remoteexe, Int_t guiport, Int_t exe_kind=0, const char *exeargs=0)
virtual Bool_t isremote()
virtual Bool_t isfolder()
TFolder * GetNamesFolder(Bool_t chown=kFALSE)
TGo4AnalysisObjectAccess * fxDefaultProxy
virtual TGo4LevelIter * MakeIter()
virtual ~TGo4AnalysisLevelIter()
TGo4AnalysisProxy * fxAnalProxy
void SetObjectFullName(const char *nam)
TGo4AnalysisObjectAccess * FindSubmittedProxy(const char *pathname, const char *objname)
Bool_t ConnectServer(const char *node, UInt_t negport, Go4CommandMode_t role=kGo4ComModeRefused, const char *passwd=0)
virtual const char * GetClassName()
virtual const char * GetContainedObjectInfo()
const char * GetObjectClass() const
virtual void SaveConfigFile(const char *fname)
const char * GetObjFolder() const
virtual void StartAnalysis()
static void ProduceFolderAndName(const char *fullname, TString &foldername, TString &objectname)
Int_t fNumberOfWaitingProxyes
void ForwardEvent(TGo4Slot *source, Int_t id, void *param=0)
virtual Int_t AssignObjectTo(TGo4ObjectManager *rcv, const char *path)
virtual void CloseAnalysisSettings()
virtual Bool_t RequestObjectStatus(const char *objectname, TGo4Slot *tgtslot)
Int_t AssignObjectToSlot(TGo4Slot *slot)
TString fNodeName
0 - not launched, 1 - external shell, 2 - in qt shell
void SetValue(Int_t num, Int_t i)
virtual void Delete(Option_t *opt="")
void SetString(const char *txt, Int_t i)
Go4CommandMode_t GetRole()
virtual void Initialize(TGo4Slot *slot)
TGo4AnalysisObjectAccess(TGo4AnalysisProxy *cont, Int_t proxykind, const char *name, const char *classname, const char *fullpath)
Bool_t AssignObject(TObject *obj, Bool_t owner)
const char * GetObjName() const
const char * GetPathName() const
virtual Bool_t UpdateAnalysisObject(const char *objectname, TObject *obj)
Bool_t fbNamesListReceived
virtual const char * GetServerName() const
TObjArray fxSubmittedProxy
virtual void ChageObjectProtection(const char *fullpath, const char *flags)
virtual void ExecuteLine(const char *line)
Bool_t CheckLifeTime(long int millisec)
virtual TGo4Access * ProvideAccess(const char *name)
Int_t GetObjectSize() const
static const char * GetModeDescription(Go4CommandMode_t mode)
virtual void SubmitAnalysisSettings()
Bool_t WaitForConnection(Int_t seconds)
virtual void PrintDynListEntry(const char *fullpath)
TGo4TaskManager * GetTaskManager()
virtual void ReadData(TGo4Slot *slot, TDirectory *dir)
void DeleteSubmittedProxy(TGo4AnalysisObjectAccess *proxy)
Bool_t SubmitCommand(const char *name)
virtual void DisconnectAnalysis(Int_t waittime=30, Bool_t servershutdown=kFALSE)
static void Debug(const char *text,...)
virtual void StopAnalysis()
virtual Bool_t StartConnectorThread()
static Bool_t LaunchAsServer(TString &launchcmd, TString &killcmd, Int_t shellkind, Int_t konsole, const char *name, const char *remotehost, Int_t remoteport, const char *remotedir, const char *remoteexe, Int_t exe_kind=0, const char *exeargs=0)