GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
21class 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
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
51
52};
53
54#endif
void SetLimit(Int_t limit)
Definition TGo4MsgList.h:37
Int_t GetCounter() const
Definition TGo4MsgList.h:44
TGo4MsgList()
current id stored in the string
TList fSelect
Definition TGo4MsgList.h:28
TList * Select(Int_t max=0, Long64_t id=0)
void AddMsg(const char *msg)
Long64_t fCounter
Definition TGo4MsgList.h:27
virtual ~TGo4MsgList()
Int_t GetLimit() const
Definition TGo4MsgList.h:42
ClassDefOverride(TGo4MsgList, 1)
TObjString fStrCounter
temporary list used for selection
Definition TGo4MsgList.h:29