TApplicationRemote Class Reference

#include <TApplicationRemote.h>

Inheritance diagram for TApplicationRemote:

TApplication TApplication TQObject TObject TQObject TObject TQObject TObject TQObject TObject List of all members.

Public Types

enum  ESendFileOpt
enum  EStatusBits
enum  ESendFileOpt
enum  EStatusBits

Public Member Functions

 TApplicationRemote (const char *url, Int_t debug=0, const char *script=0)
virtual ~TApplicationRemote ()
virtual void Browse (TBrowser *b)
Bool_t IsFolder () const
const char * ApplicationName () const
Long_t ProcessLine (const char *line, Bool_t=kFALSE, Int_t *error=0)
Int_t SendFile (const char *file, Int_t opt=kAscii, const char *rfile=0)
Int_t SendObject (const TObject *obj)
void Interrupt (Int_t type=kRRI_Hard)
Bool_t IsValid () const
void Print (Option_t *option="") const
void Terminate (Int_t status=0)
 TApplicationRemote (const char *url, Int_t debug=0, const char *script=0)
virtual ~TApplicationRemote ()
virtual void Browse (TBrowser *b)
Bool_t IsFolder () const
const char * ApplicationName () const
Long_t ProcessLine (const char *line, Bool_t=kFALSE, Int_t *error=0)
Int_t SendFile (const char *file, Int_t opt=kAscii, const char *rfile=0)
Int_t SendObject (const TObject *obj)
void Interrupt (Int_t type=kRRI_Hard)
Bool_t IsValid () const
void Print (Option_t *option="") const
void Terminate (Int_t status=0)

Static Public Member Functions

static void SetPortParam (Int_t lower=-1, Int_t upper=-1, Int_t attempts=-1)
static void SetPortParam (Int_t lower=-1, Int_t upper=-1, Int_t attempts=-1)

Private Member Functions

Int_t Broadcast (const TMessage &mess)
Int_t Broadcast (const char *mess, Int_t kind=kMESS_STRING, Int_t type=kRRT_Undef)
Int_t Broadcast (Int_t kind, Int_t type=kRRT_Undef)
Int_t BroadcastObject (const TObject *obj, Int_t kind=kMESS_OBJECT)
Int_t BroadcastRaw (const void *buffer, Int_t length)
Bool_t CheckFile (const char *file, Long_t modtime)
Int_t Collect (Long_t timeout=-1)
Int_t CollectInput ()
void RecvLogFile (Int_t size)
Int_t Broadcast (const TMessage &mess)
Int_t Broadcast (const char *mess, Int_t kind=kMESS_STRING, Int_t type=kRRT_Undef)
Int_t Broadcast (Int_t kind, Int_t type=kRRT_Undef)
Int_t BroadcastObject (const TObject *obj, Int_t kind=kMESS_OBJECT)
Int_t BroadcastRaw (const void *buffer, Int_t length)
Bool_t CheckFile (const char *file, Long_t modtime)
Int_t Collect (Long_t timeout=-1)
Int_t CollectInput ()
void RecvLogFile (Int_t size)

Private Attributes

TString fName
Int_t fProtocol
TUrl fUrl
TSocketfSocket
TMonitorfMonitor
Bool_t fInterrupt
TSignalHandlerfIntHandler
TString fLogFilePath
THashListfFileList
TObjectfReceivedObject
TSeqCollectionfRootFiles
TRemoteObjectfWorkingDir
TSocketfSocket
TMonitorfMonitor
TSignalHandlerfIntHandler
THashListfFileList
TObjectfReceivedObject
TSeqCollectionfRootFiles
TRemoteObjectfWorkingDir

Static Private Attributes

static Int_t fgPortAttempts
static Int_t fgPortLower
static Int_t fgPortUpper

Classes

class  TARFileStat

Detailed Description

Definition at line 56 of file TApplicationRemote.h.


Member Enumeration Documentation

enum TApplicationRemote::ESendFileOpt

Definition at line 59 of file TApplicationRemote.h.

enum TApplicationRemote::EStatusBits

Reimplemented from TApplication.

Definition at line 65 of file TApplicationRemote.h.

enum TApplicationRemote::ESendFileOpt

Definition at line 59 of file TApplicationRemote.h.

enum TApplicationRemote::EStatusBits

Reimplemented from TApplication.

Definition at line 65 of file TApplicationRemote.h.


Constructor & Destructor Documentation

TApplicationRemote::TApplicationRemote ( const char *  url,
Int_t  debug = 0,
const char *  script = 0 
)

Definition at line 89 of file TApplicationRemote.cxx.

References TServerSocket::Accept(), TSeqCollection::Add(), TMonitor::Add(), buf, Collect(), TString::Data(), TMonitor::DeActivateAll(), TObject::Error(), TSystem::Exec(), fFileList, fgPortAttempts, fgPortLower, fgPortUpper, fIntHandler, fLogFilePath, fMonitor, fName, TString::Form(), Form(), fProtocol, fReceivedObject, fRootFiles, fSocket, fUrl, UserGroup_t::fUser, fWorkingDir, gApplication, gDebug, TSystem::GetEffectiveUid(), TUrl::GetFile(), TUrl::GetHost(), TROOT::GetListOfSockets(), TUrl::GetOptions(), TUrl::GetUser(), TSystem::GetUserInfo(), gRandom, gROOT, gScriptCmd, gSystem, TObject::Info(), TApplication::InitializeGraphics(), TString::Insert(), TSocket::IsValid(), kCollecting, TObject::kInvalidObject, kMESS_ANY, kRRemote_Protocol, Long64_t, TApplication::NeedGraphicsLibs(), TSystem::Now(), XrdMonCtrCollector::port, Printf(), TSocket::Recv(), TCollection::Remove(), TString::ReplaceAll(), TObject::ResetBit(), TRandom::Rndm(), SafeDelete, TMonitor::Select(), TObject::SetBit(), TUrl::SetHost(), TCollection::SetName(), TRandom::SetSeed(), TMessage::What(), and what.

TApplicationRemote::~TApplicationRemote (  )  [virtual]

Definition at line 248 of file TApplicationRemote.cxx.

References TROOT::GetListOfSockets(), gROOT, TCollection::Remove(), and Terminate().

TApplicationRemote::TApplicationRemote ( const char *  url,
Int_t  debug = 0,
const char *  script = 0 
)

virtual TApplicationRemote::~TApplicationRemote (  )  [virtual]


Member Function Documentation

Int_t TApplicationRemote::Broadcast ( const TMessage mess  )  [private]

Definition at line 257 of file TApplicationRemote.cxx.

References TObject::Error(), fSocket, IsValid(), and TSocket::Send().

Referenced by Broadcast(), BroadcastObject(), CollectInput(), ProcessLine(), SendFile(), SendObject(), and Terminate().

Int_t TApplicationRemote::Broadcast ( const char *  mess,
Int_t  kind = kMESS_STRING,
Int_t  type = kRRT_Undef 
) [private]

Definition at line 273 of file TApplicationRemote.cxx.

References Broadcast(), kMESS_ANY, and TBufferFile::WriteString().

Int_t TApplicationRemote::Broadcast ( Int_t  kind,
Int_t  type = kRRT_Undef 
) [inline, private]

Definition at line 99 of file TApplicationRemote.h.

References Broadcast(), and type.

Int_t TApplicationRemote::BroadcastObject ( const TObject obj,
Int_t  kind = kMESS_OBJECT 
) [private]

Definition at line 287 of file TApplicationRemote.cxx.

References Broadcast(), and TMessage::WriteObject().

Int_t TApplicationRemote::BroadcastRaw ( const void *  buffer,
Int_t  length 
) [private]

Definition at line 299 of file TApplicationRemote.cxx.

References TObject::Error(), fSocket, IsValid(), and TSocket::SendRaw().

Bool_t TApplicationRemote::CheckFile ( const char *  file,
Long_t  modtime 
) [private]

Definition at line 656 of file TApplicationRemote.cxx.

References TList::Add(), TSystem::BaseName(), Collect(), TObject::Error(), fFileList, TMD5::FileChecksum(), THashList::FindObject(), TApplicationRemote::TARFileStat::fMD5, TApplicationRemote::TARFileStat::fModtime, fSocket, gSystem, IsValid(), kFALSE, kMESS_ANY, kRRT_CheckFile, kTRUE, md5, TSocket::Recv(), TSocket::Send(), type, TObject::Warning(), and TMessage::What().

Referenced by SendFile().

Int_t TApplicationRemote::Collect ( Long_t  timeout = -1  )  [private]

Definition at line 315 of file TApplicationRemote.cxx.

References TMonitor::ActivateAll(), TSignalHandler::Add(), xmlio::cnt, CollectInput(), TMonitor::DeActivate(), TMonitor::DeActivateAll(), fIntHandler, fMonitor, gDebug, TMonitor::GetActive(), TObject::Info(), kCollecting, TSignalHandler::Remove(), TObject::ResetBit(), s, TMonitor::Select(), and TObject::SetBit().

Referenced by CheckFile(), Interrupt(), ProcessLine(), SendFile(), and TApplicationRemote().

Int_t TApplicationRemote::CollectInput (  )  [private]

Definition at line 385 of file TApplicationRemote.cxx.

References TSystem::AccessPathName(), TSeqCollection::Add(), Broadcast(), TString::Data(), RootCsg::dot(), TObject::Error(), TCollection::FindObject(), fprintf(), fReceivedObject, fRootFiles, fSocket, fWorkingDir, gDebug, gDirectory, TDirectory::Get(), TMessage::GetClass(), TRemoteObject::GetClassName(), TROOT::GetMacroPath(), TNamed::GetName(), gROOT, gSystem, h, TObject::Info(), kFALSE, kForce, TObject::kInvalidObject, kMESS_ANY, kMESS_NOTOK, kMESS_OBJECT, kNPOS, kReadPermission, kRRT_Fatal, kRRT_GetObject, kRRT_LogDone, kRRT_LogFile, kRRT_Message, kRRT_SendFile, kTRUE, TString::Last(), list, m, o, TBufferFile::ReadObject(), TBufferFile::ReadString(), TSocket::Recv(), RecvLogFile(), TROOT::RefreshBrowsers(), TString::Remove(), SafeDelete, TSocket::Send(), SendFile(), TSocket::SendObject(), TObject::SetBit(), size, str, type, TObject::Warning(), TMessage::What(), what, and TSystem::Which().

Referenced by Collect().

void TApplicationRemote::RecvLogFile ( Int_t  size  )  [private]

Definition at line 594 of file TApplicationRemote.cxx.

References buf, TObject::Error(), fSocket, kMAXBUF, lseek, p, TSocket::RecvRaw(), SEEK_END, TObject::SysError(), w, TObject::Warning(), and write.

Referenced by CollectInput().

void TApplicationRemote::Browse ( TBrowser b  )  [virtual]

Reimplemented from TObject.

Definition at line 1045 of file TApplicationRemote.cxx.

References b, fRootFiles, fWorkingDir, TNamed::GetTitle(), gROOT, and TROOT::RefreshBrowsers().

Bool_t TApplicationRemote::IsFolder (  )  const [inline, virtual]

Reimplemented from TObject.

Definition at line 113 of file TApplicationRemote.h.

References kTRUE.

const char* TApplicationRemote::ApplicationName (  )  const [inline, virtual]

Reimplemented from TApplication.

Definition at line 114 of file TApplicationRemote.h.

References fName.

Long_t TApplicationRemote::ProcessLine ( const char *  line,
Bool_t  = kFALSE,
Int_t error = 0 
) [virtual]

Reimplemented from TApplication.

Definition at line 872 of file TApplicationRemote.cxx.

References Broadcast(), Collect(), fReceivedObject, gApplication, TApplication::Help(), TApplication::InitializeGraphics(), kMESS_CINT, and TApplication::ProcessLine().

Int_t TApplicationRemote::SendFile ( const char *  file,
Int_t  opt = kAscii,
const char *  rfile = 0 
)

Definition at line 744 of file TApplicationRemote.cxx.

References TSystem::BaseName(), Broadcast(), buf, CheckFile(), close, Collect(), TObject::Error(), flags, fSocket, fUrl, gDebug, TSystem::GetErrno(), TUrl::GetHost(), TSystem::GetPathInfo(), TUrl::GetPort(), gSystem, id, TObject::Info(), Interrupt(), IsValid(), kBinary, kCollecting, kFALSE, kForce, kMAXBUF, kMESS_ANY, kRRT_File, kTRUE, len, Long64_t, lseek, O_BINARY, open, read, TSystem::ResetErrno(), SafeDelete, SEEK_SET, TSocket::SendRaw(), size, snprintf, TObject::SysError(), and TObject::TestBit().

Referenced by CollectInput().

Int_t TApplicationRemote::SendObject ( const TObject obj  ) 

Definition at line 643 of file TApplicationRemote.cxx.

References Broadcast(), IsValid(), kMESS_OBJECT, and TMessage::WriteObject().

void TApplicationRemote::Interrupt ( Int_t  type = kRRI_Hard  ) 

Definition at line 925 of file TApplicationRemote.cxx.

References Collect(), TObject::Error(), fInterrupt, fSocket, TSocket::GetOption(), gSystem, TObject::Info(), IsValid(), kAtMark, kBytesToRead, kOob, kRRI_Hard, kRRI_Shutdown, kRRI_Soft, kTRUE, n, nloop, TSocket::RecvRaw(), TSocket::SendRaw(), and TSystem::Sleep().

Referenced by TARInterruptHandler::Notify(), and SendFile().

Bool_t TApplicationRemote::IsValid (  )  const [inline]

Definition at line 122 of file TApplicationRemote.h.

References fSocket, kFALSE, and kTRUE.

Referenced by Broadcast(), BroadcastRaw(), CheckFile(), Interrupt(), SendFile(), and SendObject().

void TApplicationRemote::Print ( Option_t option = ""  )  const [virtual]

Reimplemented from TObject.

Definition at line 909 of file TApplicationRemote.cxx.

References TString::Data(), fLogFilePath, fName, Form(), fUrl, TUrl::GetHostFQDN(), TUrl::GetUser(), Printf(), and s.

void TApplicationRemote::Terminate ( Int_t  status = 0  )  [virtual]

Reimplemented from TApplication.

Definition at line 842 of file TApplicationRemote.cxx.

References Broadcast(), fMonitor, fRootFiles, fSocket, kMESS_ANY, kRRT_Terminate, and SafeDelete.

Referenced by ~TApplicationRemote().

void TApplicationRemote::SetPortParam ( Int_t  lower = -1,
Int_t  upper = -1,
Int_t  attempts = -1 
) [static]

Definition at line 856 of file TApplicationRemote.cxx.

References fgPortAttempts, fgPortLower, fgPortUpper, and TObject::Info().

Referenced by G__G__Net_165_0_21(), and G__setup_memfuncTApplicationRemote().

Int_t TApplicationRemote::Broadcast ( const TMessage mess  )  [private]

Int_t TApplicationRemote::Broadcast ( const char *  mess,
Int_t  kind = kMESS_STRING,
Int_t  type = kRRT_Undef 
) [private]

Int_t TApplicationRemote::Broadcast ( Int_t  kind,
Int_t  type = kRRT_Undef 
) [inline, private]

Definition at line 99 of file TApplicationRemote.h.

References Broadcast(), and type.

Int_t TApplicationRemote::BroadcastObject ( const TObject obj,
Int_t  kind = kMESS_OBJECT 
) [private]

Int_t TApplicationRemote::BroadcastRaw ( const void *  buffer,
Int_t  length 
) [private]

Bool_t TApplicationRemote::CheckFile ( const char *  file,
Long_t  modtime 
) [private]

Int_t TApplicationRemote::Collect ( Long_t  timeout = -1  )  [private]

Int_t TApplicationRemote::CollectInput (  )  [private]

void TApplicationRemote::RecvLogFile ( Int_t  size  )  [private]

virtual void TApplicationRemote::Browse ( TBrowser b  )  [virtual]

Reimplemented from TObject.

Bool_t TApplicationRemote::IsFolder (  )  const [inline, virtual]

Reimplemented from TObject.

Definition at line 113 of file TApplicationRemote.h.

References kTRUE.

const char* TApplicationRemote::ApplicationName (  )  const [inline, virtual]

Reimplemented from TApplication.

Definition at line 114 of file TApplicationRemote.h.

References fName.

Long_t TApplicationRemote::ProcessLine ( const char *  line,
Bool_t  = kFALSE,
Int_t error = 0 
) [virtual]

Reimplemented from TApplication.

Int_t TApplicationRemote::SendFile ( const char *  file,
Int_t  opt = kAscii,
const char *  rfile = 0 
)

Int_t TApplicationRemote::SendObject ( const TObject obj  ) 

void TApplicationRemote::Interrupt ( Int_t  type = kRRI_Hard  ) 

Bool_t TApplicationRemote::IsValid (  )  const [inline]

Definition at line 122 of file TApplicationRemote.h.

References fSocket, kFALSE, and kTRUE.

void TApplicationRemote::Print ( Option_t option = ""  )  const [virtual]

Reimplemented from TObject.

void TApplicationRemote::Terminate ( Int_t  status = 0  )  [virtual]

Reimplemented from TApplication.

static void TApplicationRemote::SetPortParam ( Int_t  lower = -1,
Int_t  upper = -1,
Int_t  attempts = -1 
) [static]


Member Data Documentation

TString TApplicationRemote::fName [private]

Definition at line 78 of file TApplicationRemote.h.

Referenced by ApplicationName(), Print(), and TApplicationRemote().

Int_t TApplicationRemote::fProtocol [private]

Definition at line 79 of file TApplicationRemote.h.

Referenced by TApplicationRemote().

TUrl TApplicationRemote::fUrl [private]

Definition at line 80 of file TApplicationRemote.h.

Referenced by Print(), SendFile(), and TApplicationRemote().

TSocket* TApplicationRemote::fSocket [private]

Definition at line 81 of file TApplicationRemote.h.

Referenced by Broadcast(), BroadcastRaw(), CheckFile(), CollectInput(), Interrupt(), IsValid(), RecvLogFile(), SendFile(), TApplicationRemote(), and Terminate().

TMonitor* TApplicationRemote::fMonitor [private]

Definition at line 82 of file TApplicationRemote.h.

Referenced by Collect(), TApplicationRemote(), and Terminate().

Bool_t TApplicationRemote::fInterrupt [private]

Definition at line 83 of file TApplicationRemote.h.

Referenced by Interrupt().

TSignalHandler* TApplicationRemote::fIntHandler [private]

Definition at line 84 of file TApplicationRemote.h.

Referenced by Collect(), and TApplicationRemote().

TString TApplicationRemote::fLogFilePath [private]

Definition at line 86 of file TApplicationRemote.h.

Referenced by Print(), and TApplicationRemote().

THashList* TApplicationRemote::fFileList [private]

Definition at line 87 of file TApplicationRemote.h.

Referenced by CheckFile(), and TApplicationRemote().

TObject* TApplicationRemote::fReceivedObject [private]

Definition at line 89 of file TApplicationRemote.h.

Referenced by CollectInput(), ProcessLine(), and TApplicationRemote().

TSeqCollection* TApplicationRemote::fRootFiles [private]

Definition at line 90 of file TApplicationRemote.h.

Referenced by Browse(), CollectInput(), TApplicationRemote(), and Terminate().

TRemoteObject* TApplicationRemote::fWorkingDir [private]

Definition at line 91 of file TApplicationRemote.h.

Referenced by Browse(), CollectInput(), and TApplicationRemote().

Int_t TApplicationRemote::fgPortAttempts [static, private]

Definition at line 93 of file TApplicationRemote.h.

Referenced by SetPortParam(), and TApplicationRemote().

Int_t TApplicationRemote::fgPortLower [static, private]

Definition at line 94 of file TApplicationRemote.h.

Referenced by SetPortParam(), and TApplicationRemote().

Int_t TApplicationRemote::fgPortUpper [static, private]

Definition at line 95 of file TApplicationRemote.h.

Referenced by SetPortParam(), and TApplicationRemote().

TSocket* TApplicationRemote::fSocket [private]

Definition at line 81 of file TApplicationRemote.h.

TMonitor* TApplicationRemote::fMonitor [private]

Definition at line 82 of file TApplicationRemote.h.

TSignalHandler* TApplicationRemote::fIntHandler [private]

Definition at line 84 of file TApplicationRemote.h.

THashList* TApplicationRemote::fFileList [private]

Definition at line 87 of file TApplicationRemote.h.

TObject* TApplicationRemote::fReceivedObject [private]

Definition at line 89 of file TApplicationRemote.h.

TSeqCollection* TApplicationRemote::fRootFiles [private]

Definition at line 90 of file TApplicationRemote.h.

TRemoteObject* TApplicationRemote::fWorkingDir [private]

Definition at line 91 of file TApplicationRemote.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:34:25 2011 for ROOT_528-00b_version by  doxygen 1.5.1