ROOT logo
ROOT » NET » NET » TApplicationRemote

class TApplicationRemote: public TApplication


TApplicationRemote

TApplicationRemote maps a remote session. It starts a remote session
and takes care of redirecting the commands to be processed to the
remote session, to collect the graphic output objects and to display
them locally.


Function Members (Methods)

public:
TApplicationRemote(const char* url, Int_t debug = 0, const char* script = 0)
virtual~TApplicationRemote()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual const char*ApplicationName() const
static Bool_tTQObject::AreAllSignalsBlocked()
Bool_tTQObject::AreSignalsBlocked() const
Int_tTApplication::Argc() const
char**TApplication::Argv() const
char*TApplication::Argv(Int_t index) const
static Bool_tTQObject::BlockAllSignals(Bool_t b)
Bool_tTQObject::BlockSignals(Bool_t b)
virtual voidBrowse(TBrowser* b)
virtual voidTQObject::ChangedBy(const char* method)SIGNAL
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
voidTApplication::ClearInputFiles()
virtual TObject*TObject::Clone(const char* newname = "") const
voidTQObject::CollectClassSignalLists(TList& list, TClass* cls)
virtual Int_tTObject::Compare(const TObject* obj) const
Bool_tTQObject::Connect(const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(TQObject* sender, const char* signal, const char* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::Connect(const char* sender_class, const char* signal, const char* receiver_class, void* receiver, const char* slot)
virtual voidTQObject::Connected(const char*)
virtual voidTObject::Copy(TObject& object) const
static voidTApplication::CreateApplication()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidTQObject::Destroyed()SIGNAL
Bool_tTQObject::Disconnect(const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(TQObject* sender, const char* signal = 0, void* receiver = 0, const char* slot = 0)
static Bool_tTQObject::Disconnect(const char* class_name, const char* signal, void* receiver = 0, const char* slot = 0)
virtual voidTQObject::Disconnected(const char*)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
voidTQObject::Emit(const char* signal)
voidTQObject::Emit(const char* signal, Long_t* paramArr)
voidTQObject::Emit(const char* signal, const char* params)
voidTQObject::Emit(const char* signal, Double_t param)
voidTQObject::Emit(const char* signal, Long_t param)
voidTQObject::Emit(const char* signal, Long64_t param)
voidTQObject::Emit(const char* signal, Bool_t param)
voidTQObject::Emit(const char* signal, Char_t param)
voidTQObject::Emit(const char* signal, UChar_t param)
voidTQObject::Emit(const char* signal, Short_t param)
voidTQObject::Emit(const char* signal, UShort_t param)
voidTQObject::Emit(const char* signal, Int_t param)
voidTQObject::Emit(const char* signal, UInt_t param)
voidTQObject::Emit(const char* signal, ULong_t param)
voidTQObject::Emit(const char* signal, ULong64_t param)
voidTQObject::Emit(const char* signal, Float_t param)
voidTQObject::EmitVA(const char* signal, Int_t nargs)
voidTQObject::EmitVA(const char* signal, Int_t nargs, va_list va)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
static Long_tTApplication::ExecuteFile(const char* file, Int_t* error = 0, Bool_t keep = kFALSE)
TApplication::EExitOnExceptionTApplication::ExitOnException(TApplication::EExitOnException opt = kExit)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual TApplicationImp*TApplication::GetApplicationImp()
static TList*TApplication::GetApplications()
TApplication*TApplication::GetAppRemote() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
const char*TApplication::GetIdleCommand() const
TList*TQObject::GetListOfClassSignals() const
TList*TQObject::GetListOfConnections() const
TList*TQObject::GetListOfSignals() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual voidTApplication::GetOptions(Int_t* argc, char** argv)
TSignalHandler*TApplication::GetSignalHandler() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual voidTApplication::HandleException(Int_t sig)
virtual voidTApplication::HandleIdleTimer()SIGNAL
virtual Bool_tTApplication::HandleTermInput()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual Bool_tTQObject::HasConnection(const char* signal_name) const
virtual ULong_tTObject::Hash() const
virtual voidTApplication::Hide()
virtual voidTQObject::HighPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTApplication::Iconify()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTApplication::Init()
voidTApplication::InitializeGraphics()
TObjArray*TApplication::InputFiles() const
virtual voidTObject::Inspect() constMENU
voidInterrupt(Int_t type = kRRI_Hard)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTApplication::IsCmdThread()
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tIsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tTApplication::IsRunning() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
virtual voidTApplication::KeyPressed(Int_t key)SIGNAL
virtual voidTApplication::LineProcessed(const char* line)SIGNAL
static voidTQObject::LoadRQ_OBJECT()
virtual voidTApplication::Lower()
virtual voidTQObject::LowPriority(const char* signal_name, const char* slot_name = 0)
virtual voidTApplication::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTQObject::Message(const char* msg)SIGNAL
static voidTApplication::NeedGraphicsLibs()
Bool_tTApplication::NoLogoOpt() const
Bool_tTApplication::NoLogOpt() const
virtual Bool_tTObject::Notify()
virtual Int_tTQObject::NumberOfConnections() const
virtual Int_tTQObject::NumberOfSignals() const
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
virtual voidTApplication::Open()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TObject&TObject::operator=(const TObject& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "") const
virtual Long_tTApplication::ProcessFile(const char* file, Int_t* error = 0, Bool_t keep = kFALSE)
virtual Long_tProcessLine(const char* line, Bool_t = kFALSE, Int_t* error = 0)
Bool_tTApplication::QuitOpt() const
virtual voidTApplication::Raise()
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTApplication::RemoveIdleTimer()
voidTObject::ResetBit(UInt_t f)
Bool_tTApplication::ReturnFromRun() const
virtual voidTApplication::ReturnPressed(char* text)SIGNAL
virtual voidTApplication::Run(Bool_t retrn = kFALSE)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
Int_tSendFile(const char* file, Int_t opt = kAscii, const char* rfile = 0)
Int_tSendObject(const TObject* obj)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTApplication::SetEchoMode(Bool_t mode)
virtual voidTApplication::SetIdleTimer(UInt_t idleTimeInSec, const char* command)
static voidTObject::SetObjectStat(Bool_t stat)
static voidSetPortParam(Int_t lower = -1, Int_t upper = -1, Int_t attempts = -1)
voidTApplication::SetReturnFromRun(Bool_t ret)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidTApplication::Show()
virtual voidShowMembers(TMemberInspector& insp)
virtual voidTApplication::StartIdleing()
virtual voidTApplication::StopIdleing()
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
virtual Int_tTApplication::TabCompletionHook(char* buf, int* pLoc, ostream& out)
virtual voidTerminate(Int_t status = 0)
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
const char*TApplication::WorkingDirectory() const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
static Int_tTQObject::CheckConnectArgs(TQObject* sender, TClass* sender_class, const char* signal, TClass* receiver_class, const char* slot)
static voidTApplication::Close(TApplication* app)
static Bool_tTQObject::ConnectToClass(TQObject* sender, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
static Bool_tTQObject::ConnectToClass(const char* sender_class, const char* signal, TClass* receiver_class, void* receiver, const char* slot)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual void*TQObject::GetSender()
virtual const char*TQObject::GetSenderClassName() const
virtual voidTApplication::Help(const char* line)
virtual voidTApplication::LoadGraphicsLibs()
virtual voidTApplication::MakeBatch()
voidTObject::MakeZombie()
static TApplication*TApplication::Open(const char* url, Int_t debug, const char* script)
static Int_tTApplication::ParseRemoteLine(const char* ln, TString& hostdir, TString& user, Int_t& dbg, TString& script)
virtual Long_tTApplication::ProcessRemote(const char* line, Int_t* error = 0)
voidTApplication::SetSignalHandler(TSignalHandler* sh)
private:
Int_tBroadcast(const TMessage& mess)
Int_tBroadcast(Int_t kind, Int_t type = kRRT_Undef)
Int_tBroadcast(const char* mess, Int_t kind = kMESS_STRING, Int_t type = kRRT_Undef)
Int_tBroadcastObject(const TObject* obj, Int_t kind = kMESS_OBJECT)
Int_tBroadcastRaw(const void* buffer, Int_t length)
Bool_tCheckFile(const char* file, Long_t modtime)
Int_tCollect(Long_t timeout = -1)
Int_tCollectInput()
voidRecvLogFile(Int_t size)

Data Members

public:
enum ESendFileOpt { kAscii
kBinary
kForce
};
enum EStatusBits { kCollecting
};
enum TApplication::EStatusBits { kProcessRemotely
kDefaultApplication
};
enum TApplication::EExitOnException { kDontExit
kExit
kAbort
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TApplication*TApplication::fAppRemoteCurrent remote application, if defined
TList*TQObject::fListOfConnections! list of connections to this object
TList*TQObject::fListOfSignals! list of signals from this object
Bool_tTQObject::fSignalsBlocked! flag used for suppression of signals
static Bool_tTQObject::fgAllSignalsBlockedflag used for suppression of all signals
static TList*TApplication::fgApplicationsList of available applications
private:
THashList*fFileListList of files already uploaded
TSignalHandler*fIntHandlerinterrupt signal handler (ctrl-c)
Bool_tfInterruptflag interrupt state
TStringfLogFilePathFull remote path to log file
TMonitor*fMonitormonitor for the input socket
TStringfNameUnique name identifying this instance
Int_tfProtocolserver protocol version number
TObject*fReceivedObjectlast received object
TSeqCollection*fRootFileslist of (remote) root files
TSocket*fSocketsocket connection to server
TUrlfUrlserver's url
TRemoteObject*fWorkingDirworking (remote) directory
static Int_tfgPortAttemptsnumber of attempts to find a port
static Int_tfgPortLowerlower bound for ports
static Int_tfgPortUpperupper bound for ports

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TApplicationRemote(const char* url, Int_t debug = 0, const char* script = 0)
 Main constructor: start a remote session at 'url' accepting callbacks
 on local port 'port'; if port is already in use scan up to 'scan - 1'
 ports starting from port + 1, i.e. port + 1, ... , port + scan - 1
~TApplicationRemote()
 Destructor
Int_t Broadcast(const TMessage& mess)
 Broadcast a message to the remote session.
 Returns 0 on success, -1 in case of error.
Int_t Broadcast(const char* mess, Int_t kind = kMESS_STRING, Int_t type = kRRT_Undef)
 Broadcast a character string buffer to the remote session.
 Use kind to set the TMessage what field.
 Returns 0 on success, -1 in case of error.
Int_t BroadcastObject(const TObject* obj, Int_t kind = kMESS_OBJECT)
 Broadcast an object to the remote session.
 Use kind to set the TMessage what field.
 Returns 0 on success, -1 in case of error.
Int_t BroadcastRaw(const void* buffer, Int_t length)
 Broadcast a raw buffer of specified length to the remote session.
 Returns 0 on success, -1 in case of error.
Int_t Collect(Long_t timeout = -1)
 Collect responses from the remote server.
 Returns the number of messages received.
 If timeout >= 0, wait at most timeout seconds (timeout = -1 by default,
 which means wait forever).
Int_t CollectInput()
 Collect and analyze available input from the socket.
 Returns 0 on success, -1 if any failure occurs.
void RecvLogFile(Int_t size)
 Receive the log file from the server
Int_t SendObject(const TObject* obj)
 Send object to server.
 Return 0 on success, -1 in case of error.
Bool_t CheckFile(const char* file, Long_t modtime)
 Check if a file needs to be send to the server. Use the following
 algorithm:
   - check if file appears in file map
     - if yes, get file's modtime and check against time in map,
       if modtime not same get md5 and compare against md5 in map,
       if not same return kTRUE.
     - if no, get file's md5 and modtime and store in file map, ask
       slave if file exists with specific md5, if yes return kFALSE,
       if no return kTRUE.
 Returns kTRUE in case file needs to be send, returns kFALSE in case
 file is already on remote node.
Int_t SendFile(const char* file, Int_t opt = kAscii, const char* rfile = 0)
 Send a file to the server. Return 0 on success, -1 in case of error.
 If defined, the full path of the remote path will be rfile.
 The mask 'opt' is an or of ESendFileOpt:

       kAscii  (0x0)      if set true ascii file transfer is used
       kBinary (0x1)      if set true binary file transfer is used
       kForce  (0x2)      if not set an attempt is done to find out
                          whether the file really needs to be downloaded
                          (a valid copy may already exist in the cache
                          from a previous run)

void Terminate(Int_t status = 0)
 Terminate this session
void SetPortParam(Int_t lower = -1, Int_t upper = -1, Int_t attempts = -1)
 Set port parameters for tunnelling. A value of -1 means unchanged
Long_t ProcessLine(const char* line, Bool_t = kFALSE, Int_t* error = 0)
 Parse a single command line and forward the request to the remote server
 where it will be processed. The line is either a C++ statement or an
 interpreter command starting with a ".".
 Return the return value of the command casted to a long.
void Print(Option_t* option = "") const
 Print some info about this instance
void Interrupt(Int_t type = kRRI_Hard)
 Send interrupt OOB byte to server.
 Returns 0 if ok, -1 in case of error
void Browse(TBrowser* b)
 Browse remote application (working directory and ROOT files).
Int_t Broadcast(const TMessage& mess)
Bool_t IsFolder() const
{ return kTRUE; }
const char * ApplicationName() const
{ return fName; }
Bool_t IsValid() const
{ return (fSocket) ? kTRUE : kFALSE; }