GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4MsgList.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4MSGLIST_H
15 #define TGO4MSGLIST_H
16 
17 #include "TNamed.h"
18 #include "TList.h"
19 #include "TObjString.h"
20 
21 class TGo4MsgList : public TNamed {
22 
23  protected:
24 
25  TList fMsgs; // list of remained messages, stored as TObjString
26  Int_t fLimit{0}; // max number of stored messages
27  Long64_t fCounter{0}; // current message id
28  TList fSelect;
29  TObjString fStrCounter;
30 
31  public:
32 
33  TGo4MsgList();
34  TGo4MsgList(const char *name, const char *title, Int_t limit = 1000);
35  virtual ~TGo4MsgList();
36 
37  void SetLimit(Int_t limit)
38  {
39  fLimit = limit > 0 ? limit : 1;
40  AddMsg(nullptr);
41  }
42  Int_t GetLimit() const { return fLimit; }
43 
44  Int_t GetCounter() const { return fCounter; }
45 
46  void AddMsg(const char *msg);
47 
48  TList *Select(Int_t max = 0, Long64_t id = 0);
49 
50  ClassDefOverride(TGo4MsgList, 1); // Custom message list for web server *SNIFF* _autoload="go4sys/html/go4.js" _make_request="GO4.MakeMsgListRequest" _after_request=GO4.AfterMsgListRequest _icon=img_text
51 
52 };
53 
54 #endif
TList fSelect
Definition: TGo4MsgList.h:28
void SetLimit(Int_t limit)
Definition: TGo4MsgList.h:37
Int_t fLimit
Definition: TGo4MsgList.h:26
TList fMsgs
Definition: TGo4MsgList.h:25
TObjString fStrCounter
temporary list used for selection
Definition: TGo4MsgList.h:29
Int_t GetCounter() const
Definition: TGo4MsgList.h:44
TList * Select(Int_t max=0, Long64_t id=0)
Definition: TGo4MsgList.cxx:67
Int_t GetLimit() const
Definition: TGo4MsgList.h:42
ClassDefOverride(TGo4MsgList, 1)
TGo4MsgList()
current id stored in the string
Definition: TGo4MsgList.cxx:18
void AddMsg(const char *msg)
Definition: TGo4MsgList.cxx:50
virtual ~TGo4MsgList()
Definition: TGo4MsgList.cxx:45
string msg
Definition: go4init.py:11
Long64_t fCounter
Definition: TGo4MsgList.h:27