49 if (fDialog) fSessionUrl = fDialog->fSessionUrl;
102 " negative numbers for the previous ones, e.g. -1 for the last-but-one");
123 selall->
Connect(
"Clicked()",
"TProofProgressLog",
this,
"Select(=0)");
126 clearall->
Connect(
"Clicked()",
"TProofProgressLog",
this,
"Select(=1)");
134 fLogNew->
Connect(
"Clicked()",
"TProofProgressLog",
this,
"DoLog(=kFALSE)");
148 fClose->
Connect(
"Clicked()",
"TProofProgressLog",
this,
"CloseWindow()");
154 fSave->
Connect(
"Clicked()",
"TProofProgressLog",
this,
"SaveToFile()");
171 fAllLines->
Connect(
"Clicked()",
"TProofProgressLog",
this,
"NoLineEntry()");
257 "LogMessage(const char*,Bool_t)");
324 title.
Form(
"PROOF - Processing logs for session 'undefined'");
341 Info(
"BuildLogList",
"sesssion URL undefined - do nothing");
346 Warning(
"BuildLogList",
"unable open a manager connection to %s",
351 Warning(
"BuildLogList",
"unable to get logs from %s",
356 title.
Form(
"PROOF - Processing logs for session '%s', started on %s at %s",
394 Warning(
"DoLog",
"no text: do nothing!");
405 TPMERegexp san(
"(^|[^\\\\])([^a-zA-Z0-9_=\\\\/.-])");
406 while ( san.
Substitute(greptext,
"$1\\$2") > 0 );
423 Warning(
"DoLog",
"unable to instantiate TProofLog for %s",
427 Warning(
"DoLog",
"unable to instantiate a TProofMgr for %s",
437 pipeCommand =
"grep -v \"| SvcMsg\"";
461 if (!pipeCommand.IsNull())
462 pipeCommand.Append(
'|');
465 pipeCommand.Append(greptext);
468 pipeCommand.Append(
"grep ");
470 pipeCommand.Append(
"-v ");
471 pipeCommand.Append(
"-- ");
472 pipeCommand.Append(greptext);
483 TIter next(selected);
489 this,
"LogMessage(const char*, Bool_t)");
498 Info(
"DoLog",
"Retrieving unfiltered log for %s", ord.
Data());
503 Info(
"DoLog",
"Retrieving log for %s filtered with %s",
504 ord.
Data(), pipeCommand.Data());
541 if (filename.
IsNull() || filename ==
"<session-tag>.log") {
549 TIter next(selected);
559 option = writemode ?
"w" :
"a";
564 Info(
"SaveToFile",
"logs saved to file %s", filename.
Data());
593 if (frame) frame->
Layout();
621 for (
Int_t ie=0; ie<nen; ie++) {
642 if (!strcmp(url.GetHostFQDN(), urlref.GetHostFQDN())) {
643 if (url.GetPort() == urlref.GetPort()) {
644 if (!strcmp(url.GetUser(), urlref.GetUser())) {
653 Info(
"Rebuild",
"same paremeters {%s, %s}, {%d, %d}: no need to rebuild TProofLog",
TGNumberEntry * fLinesFrom
void LoadFile(const char *file)
Load a file in the window.
virtual const char * GetName() const
Returns name of object.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
void Rebuild()
Rebuild the log info for a new entered session.
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual void Clear(Option_t *="")
Clear text view widget.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
void CloseWindow()
Handle close button or when closed via window manager action.
virtual TGLBEntry * FindEntry(const char *s) const
Find entry by name.
virtual Bool_t LoadBuffer(const char *txtbuf)
Load text from a text buffer. Return false in case of failure.
TGTextButton * fUrlButton
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
TProofProgressDialog * fDialog
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
This class represents a WWW compatible URL.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
Bool_t TestBit(UInt_t f) const
The PROOF manager interacts with the PROOF server coordinator to create or destroy a PROOF session...
virtual ~TProofProgressLog()
Destructor.
TGCheckButton * fAllLines
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void SetMultipleSelections(Bool_t multi=kTRUE)
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
TString & Prepend(const char *cs)
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
static void retrieve(const gsl_integration_workspace *workspace, double *a, double *b, double *r, double *e)
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Remove a range of entries defined by from_ID and to_ID.
virtual TProofLog * GetSessionLogs(Int_t=0, const char *=0, const char *="-v \ SvcMsg\, Bool_t=kFALSE)
TGCheckButton * fGrepCheckCmd
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
void Display(const char *ord="*", Int_t from=-10, Int_t to=-1)
Display the content associated with worker 'ord' from line 'from' to line 'to' inclusive.
Bool_t LoadBuffer(const char *txtbuf)
Load a 0 terminated buffer. Lines will be split at ' '.
static TProofMgr * Mgr(const char *url)
Get instance of the effective manager for 'url' Return 0 on failure.
void LogMessage(const char *msg, Bool_t all)
Load/append a log msg in the log frame, if open.
void SetLogToBox(Bool_t lgbox=kFALSE)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual Long_t GetIntNumber() const
TProofProgressLog * fLogWindow
virtual void SetText(TGString *newText)
Set new text in label.
TGCheckButton * fGrepCheckInv
TGTextButton * fGrepButton
void DoLog(Bool_t grep=kFALSE)
Display logs.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
void Popup()
Show log window.
void Clear(Option_t *=0)
Clear log window.
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
virtual TGLBEntry * GetEntry(Int_t id) const
Returns list box entry with specified id.
virtual TGLBEntry * Select(Int_t id, Bool_t sel=kTRUE)
void SetGrepView()
Sets the view of grep filters according to the value of checkboxes.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
void NoLineEntry()
Enable/disable the line number entry.
virtual void GetSelectedEntries(TList *selected)
Adds all selected entries (TGLBEntry) of the list box into the list selected.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
TProofProgressLog(TProofProgressDialog *d, Int_t w=700, Int_t h=600)
Create a window frame for log messages.
TGVerticalFrame * fVworkers
virtual void SetIntNumber(Long_t val)
const UInt_t kDefaultActive
virtual void AddText(TGText *text)
Add text to the view widget.
virtual TGDimension GetDefaultSize() const
Return the default / minimal size of the widget.
void LoadBuffer(const char *buffer)
Load a text buffer in the window.
void Init(Int_t w=700, Int_t h=600)
Init window frame for log messages.
virtual Int_t GetNumberOfEntries() const
const char * GetString() const
TList * GetListOfLogs() const
const char * GetText() const
TString & Remove(Ssiz_t pos)
void SaveToFile()
Save the logs to a file Only the name of the file is taken, no expansion.
const TGString * GetText() const
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual Bool_t IsValid() const
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
void BuildLogList(Bool_t create=kFALSE)
Build the list of workers.
const TGWindow * GetParent() const
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
const UInt_t kLogElemFilled
void Select(Int_t id, Bool_t all=kTRUE)
actions of select all/clear all button
virtual void Layout()
Layout the listbox components.
TGNumberEntryField * GetNumberEntry() const
Wrapper for PCRE library (Perl Compatible Regular Expressions).
void AddBuffer(const char *buffer)
Add text to the window.
Int_t Save(const char *ord="*", const char *fname=0, Option_t *opt="w")
Save the content associated with worker 'ord' to finel 'fname'.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
Int_t Substitute(TString &s, const TString &r, Bool_t doDollarSubst=kTRUE)
Substitute matching part of s with r, dollar back-ref substitution is performed if doDollarSubst is t...
virtual void DeleteWindow()
Delete window.
TGCheckButton * fRawLines
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
Int_t Retrieve(const char *ord="*", TProofLog::ERetrieveOpt opt=TProofLog::kTrailing, const char *fname=0, const char *pattern=0)
Retrieve the content of the log file associated with worker 'ord'.