54 class TMsgList :
public TNamed {
66 TMsgList(
const char*
name =
"log",
Int_t limit = 1000) :
84 virtual ~TMsgList() { fMsgs.
Clear(); }
86 void AddMsg(
const char* msg)
92 while (fMsgs.
GetSize() >= fLimit) {
114 if (max == 0) max = fMsgs.
GetLast()+1;
118 fSelect.
Add(&fStrCounter);
120 while (((obj = iter()) != 0) && (--curr >=
id) && (--max>=0)) fSelect.
Add(obj);
131 TMsgList*
log =
new TMsgList(
"log", 200);
133 if ((
TMsgList::Class()->GetMethodAllAny(
"Select") == 0) || (strcmp(log->ClassName(),
"TMsgList")!=0)) {
134 printf(
"Most probably, macro runs in interpreter mode\n");
135 printf(
"To access new methods from TMsgList class,\n");
136 printf(
"one should run macro with ACLiC like:\n");
137 printf(
" shell> root -b httpextlog.C+\n");
142 printf(
"Please start macro from directory where httptextlog.js is available\n");
143 printf(
"Only in this case web interface can work\n");
148 TH1D *hpx =
new TH1D(
"hpx",
"This is the px distribution",100,-4,4);
151 TH2F *hpxpy =
new TH2F(
"hpxpy",
"py vs px",40,-4,4,40,-4,4);
165 serv->Register(
"/", hpx);
166 serv->Register(
"/", hpxpy);
169 serv->Register(
"/", log);
172 serv->Restrict(
"/log",
"allow_method=Select,GetTitle");
175 serv->RegisterCommand(
"/Stop",
"bRun=kFALSE;",
"rootsys/icons/ed_delete.png");
176 serv->RegisterCommand(
"/ExitRoot",
"gSystem->Exit(1);",
"rootsys/icons/ed_delete.png");
189 if (cnt++ % kUPDATE == 0) {
195 if (loop % 1000 == 0) {
197 int shift = loop % 40;
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
Random number generator class based on M.
Collectable string class.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual void RemoveLast()
Remove the last object of the list.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
#define ClassDef(name, id)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
The TNamed class is the base class for all named ROOT classes.
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
2-D histogram with a float per channel (see TH1 documentation)}
UInt_t Get() const
Return raw date/time as encoded by TDatime.
1-D histogram with a double per channel (see TH1 documentation)}
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Mother of all ROOT objects.
void SetAutoLoad(const char *scripts="")
When specified, _autoload attribute will be always add to top element of h.json/h.hml requests Used to instruct browser automatically load special code.
virtual void Add(TObject *obj)
virtual Int_t GetLast() const
Returns index of last object in collection.
THist< 1, double, THistStatContent, THistStatUncertainty > TH1D
static TString LLtoa(Long64_t value, Int_t base)
Converts a Long64_t to a TString with respect to the base specified (2-36).
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Int_t Fill(Double_t)
Invalid Fill method.
void SetString(const char *s)
THist< 2, float, THistStatContent, THistStatUncertainty > TH2F
TRootSniffer * GetSniffer() const
returns pointer on objects sniffer
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...