Logo ROOT   6.21/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 
28 class TGTextView;
29 class TGTextButton;
31 class TProofLog;
32 class TGTextEntry;
33 class TGNumberEntry;
34 class TGListBox;
35 class TGSplitButton;
36 class TGVerticalFrame;
37 class TGCheckButton;
38 class TGLabel;
39 
41 
42 private:
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 
76 public:
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
TGNumberEntry * fLinesFrom
TGNumberEntry * fLinesTo
void LoadFile(const char *file)
Load a file in the window.
void Rebuild()
Rebuild the log info for a new entered session.
void CloseWindow()
Handle close button or when closed via window manager action.
void SetUrl(const char *url)
TGTextButton * fUrlButton
const char Option_t
Definition: RtypesCore.h:62
TProofProgressDialog * fDialog
virtual ~TProofProgressLog()
Destructor.
TGCheckButton * fAllLines
Basic string class.
Definition: TString.h:131
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGCheckButton * fGrepCheckCmd
void LogMessage(const char *msg, Bool_t all)
Load/append a log msg in the log frame, if open.
#define ClassDef(name, id)
Definition: Rtypes.h:326
TGCheckButton * fGrepCheckInv
TGTextButton * fGrepButton
void DoLog(Bool_t grep=kFALSE)
Display logs.
void Popup()
Show log window.
void Clear(Option_t *=0)
Clear log window.
TGTextEntry * fGrepText
TGTextButton * fLogNew
void SetGrepView()
Sets the view of grep filters according to the value of checkboxes.
TGTextButton * fClose
void NoLineEntry()
Enable/disable the line number entry.
TProofProgressLog(TProofProgressDialog *d, Int_t w=700, Int_t h=600)
Create a window frame for log messages.
TGVerticalFrame * fVworkers
TGSplitButton * fAllWorkers
void LoadBuffer(const char *buffer)
Load a text buffer in the window.
#define h(i)
Definition: RSha256.hxx:106
void Init(Int_t w=700, Int_t h=600)
Init window frame for log messages.
const Bool_t kFALSE
Definition: RtypesCore.h:88
TGTextEntry * fFileName
TGNumberEntry * fSessNum
#define d(i)
Definition: RSha256.hxx:102
void SaveToFile()
Save the logs to a file Only the name of the file is taken, no expansion.
void BuildLogList(Bool_t create=kFALSE)
Build the list of workers.
void Select(Int_t id, Bool_t all=kTRUE)
actions of select all/clear all button
Definition: file.py:1
void AddBuffer(const char *buffer)
Add text to the window.
const Bool_t kTRUE
Definition: RtypesCore.h:87
TGCheckButton * fRawLines
Implementation of the PROOF session log handler.
Definition: TProofLog.h:32
TGTextButton * fSave
TGTextEntry * fUrlText