Logo ROOT   6.08/07
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 #ifndef ROOT_TGFrame
26 #include "TGFrame.h"
27 #endif
28 #ifndef ROOT_TString
29 #include "TString.h"
30 #endif
31 
32 class TGTextView;
33 class TGTextButton;
35 class TProofLog;
36 class TGTextEntry;
37 class TGNumberEntry;
38 class TGListBox;
39 class TGSplitButton;
40 class TGVerticalFrame;
41 class TGCheckButton;
42 class TGLabel;
43 
45 
46 private:
47  enum ETextType { kRaw = 0, kStd = 1, kGrep = 2 };
48 
51 
52  TGTextView *fText; // text widget
53  TGTextButton *fClose; // close button
54  TGListBox *fLogList; // list of workers
55  TGTextButton *fLogNew; // display logs button
56  TProofProgressDialog *fDialog; // owner dialog
57  TProofLog *fProofLog; // the log
58  TGNumberEntry *fLinesFrom; // starting line
59  TGNumberEntry *fLinesTo; // ending line
60  TGTextEntry *fGrepText; // text to grep for in the logs
61  TGTextEntry *fUrlText; // url to connect to
62  TGNumberEntry *fSessNum; // relative index of the session to get
63  TGTextEntry *fFileName; // file to save to
64  TGTextButton *fSave; // save button
65  TGTextButton *fGrepButton; //grep button
66  TGTextButton *fUrlButton; //rebuild button
67  TGCheckButton *fAllLines; // display all lines button
68  TGCheckButton *fRawLines; // display raw lines button
69  TGSplitButton *fAllWorkers; // display all workers button
70  TGVerticalFrame *fVworkers; // Vertical frame
71  TGLabel *fGrepLabel; // label indicating if grepping or piping
72  TGCheckButton *fGrepCheckCmd; // checkbox active if piping
73  TGCheckButton *fGrepCheckInv; // checkbox active if inverting
74 
75  Bool_t fFullText; // 0 - when grep was called
76  Int_t fTextType; // Type of retrieval
77 
78  void Init(Int_t w = 700, Int_t h = 600);
79 
80 public:
82  TProofProgressLog(const char *url = 0, Int_t sessionidx = 0, Int_t w = 700, Int_t h = 600);
83  virtual ~TProofProgressLog();
84 
85  void BuildLogList(Bool_t create = kFALSE);
86  void DoLog(Bool_t grep=kFALSE);
87  void LogMessage(const char *msg, Bool_t all);
88  void Rebuild();
89 
90  void LoadBuffer(const char *buffer);
91  void AddBuffer(const char *buffer);
92 
93  void LoadFile(const char *file);
94 
95  void Clear(Option_t * = 0);
96  void Popup();
97  void SaveToFile();
98  void NoLineEntry();
99  void SetGrepView();
100  void Select(Int_t id, Bool_t all = kTRUE);
101 
102  void SetUrl(const char *url) { fSessionUrl = url; }
103  // slots
104  void CloseWindow();
105 
106  ClassDef(TProofProgressLog,0) //Class implementing a log graphic box
107 };
108 
109 #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
TH1 * h
Definition: legend2.C:5
virtual ~TProofProgressLog()
Destructor.
TGCheckButton * fAllLines
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
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:254
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.
void Init(Int_t w=700, Int_t h=600)
Init window frame for log messages.
TGTextEntry * fFileName
TGNumberEntry * fSessNum
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: Rtypes.h:91
TGCheckButton * fRawLines
Implementation of the PROOF session log handler.
Definition: TProofLog.h:38
TGTextButton * fSave
TGTextEntry * fUrlText