Logo ROOT   6.16/01
Reference Guide
TProofProgressLog.h
Go to the documentation of this file.
1// @(#)root/sessionviewer:$Id: c52dc6cb225c25e34d388329d41570a484d98ce0 $
2// Author: G Ganis, Aug 2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TProofProgressLog
13#define ROOT_TProofProgressLog
14
15///////////////////////////////////////////////////////////////////////////
16// //
17// TProofProgressLog //
18// //
19// Dialog used to display Proof session logs from the Proof progress //
20// dialog. //
21// It uses TProofMgr::GetSessionLogs() mechanism internally //
22// //
23///////////////////////////////////////////////////////////////////////////
24
25#include "TGFrame.h"
26#include "TString.h"
27
28class TGTextView;
29class TGTextButton;
31class TProofLog;
32class TGTextEntry;
33class TGNumberEntry;
34class TGListBox;
35class TGSplitButton;
36class TGVerticalFrame;
37class TGCheckButton;
38class TGLabel;
39
41
42private:
43 enum ETextType { kRaw = 0, kStd = 1, kGrep = 2 };
44
47
48 TGTextView *fText; // text widget
49 TGTextButton *fClose; // close button
50 TGListBox *fLogList; // list of workers
51 TGTextButton *fLogNew; // display logs button
52 TProofProgressDialog *fDialog; // owner dialog
53 TProofLog *fProofLog; // the log
54 TGNumberEntry *fLinesFrom; // starting line
55 TGNumberEntry *fLinesTo; // ending line
56 TGTextEntry *fGrepText; // text to grep for in the logs
57 TGTextEntry *fUrlText; // url to connect to
58 TGNumberEntry *fSessNum; // relative index of the session to get
59 TGTextEntry *fFileName; // file to save to
60 TGTextButton *fSave; // save button
61 TGTextButton *fGrepButton; //grep button
62 TGTextButton *fUrlButton; //rebuild button
63 TGCheckButton *fAllLines; // display all lines button
64 TGCheckButton *fRawLines; // display raw lines button
65 TGSplitButton *fAllWorkers; // display all workers button
66 TGVerticalFrame *fVworkers; // Vertical frame
67 TGLabel *fGrepLabel; // label indicating if grepping or piping
68 TGCheckButton *fGrepCheckCmd; // checkbox active if piping
69 TGCheckButton *fGrepCheckInv; // checkbox active if inverting
70
71 Bool_t fFullText; // 0 - when grep was called
72 Int_t fTextType; // Type of retrieval
73
74 void Init(Int_t w = 700, Int_t h = 600);
75
76public:
78 TProofProgressLog(const char *url = 0, Int_t sessionidx = 0, Int_t w = 700, Int_t h = 600);
79 virtual ~TProofProgressLog();
80
81 void BuildLogList(Bool_t create = kFALSE);
82 void DoLog(Bool_t grep=kFALSE);
83 void LogMessage(const char *msg, Bool_t all);
84 void Rebuild();
85
86 void LoadBuffer(const char *buffer);
87 void AddBuffer(const char *buffer);
88
89 void LoadFile(const char *file);
90
91 void Clear(Option_t * = 0);
92 void Popup();
93 void SaveToFile();
94 void NoLineEntry();
95 void SetGrepView();
96 void Select(Int_t id, Bool_t all = kTRUE);
97
98 void SetUrl(const char *url) { fSessionUrl = url; }
99 // slots
100 void CloseWindow();
101
102 ClassDef(TProofProgressLog,0) //Class implementing a log graphic box
103};
104
105#endif
#define d(i)
Definition: RSha256.hxx:102
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
Implementation of the PROOF session log handler.
Definition: TProofLog.h:32
virtual ~TProofProgressLog()
Destructor.
TGTextButton * fClose
void Select(Int_t id, Bool_t all=kTRUE)
actions of select all/clear all button
void Init(Int_t w=700, Int_t h=600)
Init window frame for log messages.
void SetUrl(const char *url)
void Rebuild()
Rebuild the log info for a new entered session.
void DoLog(Bool_t grep=kFALSE)
Display logs.
TGCheckButton * fGrepCheckInv
TGTextEntry * fUrlText
TGTextButton * fGrepButton
TGVerticalFrame * fVworkers
TGCheckButton * fAllLines
void LogMessage(const char *msg, Bool_t all)
Load/append a log msg in the log frame, if open.
void SetGrepView()
Sets the view of grep filters according to the value of checkboxes.
TGNumberEntry * fSessNum
TGTextButton * fLogNew
void LoadBuffer(const char *buffer)
Load a text buffer in the window.
void AddBuffer(const char *buffer)
Add text to the window.
void BuildLogList(Bool_t create=kFALSE)
Build the list of workers.
TGTextButton * fUrlButton
TGCheckButton * fGrepCheckCmd
void Clear(Option_t *=0)
Clear log window.
TProofProgressDialog * fDialog
TGSplitButton * fAllWorkers
TProofProgressLog(TProofProgressDialog *d, Int_t w=700, Int_t h=600)
Create a window frame for log messages.
void LoadFile(const char *file)
Load a file in the window.
TGTextEntry * fGrepText
TGNumberEntry * fLinesTo
TGCheckButton * fRawLines
TGTextEntry * fFileName
TGTextButton * fSave
TGNumberEntry * fLinesFrom
void NoLineEntry()
Enable/disable the line number entry.
void CloseWindow()
Handle close button or when closed via window manager action.
void SaveToFile()
Save the logs to a file Only the name of the file is taken, no expansion.
void Popup()
Show log window.
Basic string class.
Definition: TString.h:131
Definition: file.py:1