Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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;
30 class TProofProgressDialog;
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 
40 class TProofProgressLog : public TGTransientFrame {
41 
42 private:
43  enum ETextType { kRaw = 0, kStd = 1, kGrep = 2 };
44 
45  TString fSessionUrl;
46  Int_t fSessionIdx;
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:
77  TProofProgressLog(TProofProgressDialog *d, Int_t w = 700, Int_t h = 600);
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