GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4Sniffer.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 TGO4SNIFFER_H
15#define TGO4SNIFFER_H
16
17#include "TRootSnifferFull.h"
18#include "TGo4AnalysisSniffer.h"
19#include "TGo4MsgList.h"
20
22class TGraph;
23class TGo4Ratemeter;
24class THttpServer;
25
26class TGo4Sniffer : public TRootSnifferFull,
27 public TGo4AnalysisSniffer {
28
29 protected:
30
32
33 TGraph *fEventRate{nullptr};
34
36
38
40
42 Bool_t fbPythonBound{kFALSE};
43
44 TString fAutoLoadArg;
45
46 void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj) override;
47
49 virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString &text);
50
52 Bool_t HasRestrictMethod();
53
55 Bool_t HasProduceMultiMethod();
56
58 void RestrictGo4(const char *path, const char *options);
59
61 Bool_t HasAutoLoadMethod();
62
64 Bool_t SetAutoLoadGo4(const char *script);
65
66 static THttpServer *gHttpServer;
67
68 public:
69
70 static THttpServer *GetHttpServer();
71
72 static Bool_t CreateEngine(const char *name);
73
74 TGo4Sniffer(const char *name);
75 virtual ~TGo4Sniffer();
76
77 void ScanRoot(TRootSnifferScanRec &rec) override;
78
79 void *FindInHierarchy(const char *path, TClass **cl = nullptr, TDataMember **member = nullptr, Int_t *chld = nullptr) override;
80
81 // ========= methods registered as command and available from web interface =========
82
83 Bool_t CmdStart();
84 Bool_t CmdStop();
85 Bool_t CmdClear();
86 Bool_t CmdRestart();
87 Bool_t CmdClose();
88 Bool_t CmdOpenFile(const char *fname);
89 Bool_t CmdCloseFiles();
90 Bool_t CmdExit();
91 Bool_t CmdClearObject(const char *objname);
92 Bool_t CmdDeleteObject(const char *objname);
93 Bool_t CmdExecute(const char *exeline);
94
95 // === methods used via http interface by Go4GUI ===============
96
97 Bool_t AddAnalysisObject(TObject *obj);
98
99 Bool_t RemoteTreeDraw(const char *histoname,
100 const char *treename,
101 const char *varexpr,
102 const char *cutexpr);
103
104 TObject *CreateItemStatus(const char *itemname);
105
107 void SetTitle(const char *title = "") override;
108
110 void RatemeterUpdate(TGo4Ratemeter *) override;
111
113 void StatusMessage(int level, Bool_t printout, const TString &) override;
114
116 void ProcessSnifferEvents() override;
117
118
119 ClassDefOverride(TGo4Sniffer, 1); // Sniffer of Go4 analysis objects for THttpServer
120};
121
122
123#endif
Subclass of TGo4AnalysisStatus that has UpdateFromURL method the only reason for this subclass is to ...
Class containing event counter and ratemeter services.
void ScanRoot(TRootSnifferScanRec &rec) override
static THttpServer * GetHttpServer()
Bool_t CmdStop()
Bool_t AddAnalysisObject(TObject *obj)
Bool_t CmdExit()
TObject * CreateItemStatus(const char *itemname)
TGraph * fEventRate
Definition TGo4Sniffer.h:33
void SetTitle(const char *title="") override
Method called by logger with every string, going to output.
static Bool_t CreateEngine(const char *name)
void StatusMessage(int level, Bool_t printout, const TString &) override
Method from analysis sniffer.
ClassDefOverride(TGo4Sniffer, 1)
Bool_t HasRestrictMethod()
Indicate that Restrict method implemented, also commands with arguments are exists.
void RatemeterUpdate(TGo4Ratemeter *) override
Method from analysis sniffer.
Bool_t CmdClearObject(const char *objname)
Bool_t CmdDeleteObject(const char *objname)
TGo4MsgList fDebugOutput
Definition TGo4Sniffer.h:37
Bool_t SetAutoLoadGo4(const char *script)
Wrapper for new method in TRootSniffer.
void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj) override
Bool_t CmdCloseFiles()
TString fAutoLoadArg
Definition TGo4Sniffer.h:44
static THttpServer * gHttpServer
Definition TGo4Sniffer.h:66
Bool_t CmdOpenFile(const char *fname)
Bool_t RemoteTreeDraw(const char *histoname, const char *treename, const char *varexpr, const char *cutexpr)
TGo4Ratemeter * fRatemeter
Definition TGo4Sniffer.h:35
void * FindInHierarchy(const char *path, TClass **cl=nullptr, TDataMember **member=nullptr, Int_t *chld=nullptr) override
Bool_t CmdRestart()
void ProcessSnifferEvents() override
Method called in go4 analysis thread, used to executed server commands.
Bool_t CmdStart()
TGo4Sniffer(const char *name)
TGo4AnalysisWebStatus * fAnalysisStatus
Definition TGo4Sniffer.h:31
Bool_t HasProduceMultiMethod()
Indicate that sniffer has MultiProcess method implemented, can be used from GUI.
TGo4MsgList fStatusMessages
Definition TGo4Sniffer.h:39
Bool_t HasAutoLoadMethod()
Indicate if SetAutoLoad method exists.
virtual ~TGo4Sniffer()
Bool_t CmdClear()
Bool_t fbPythonBound
if true, python binding of go4 has already been done.
Definition TGo4Sniffer.h:42
Bool_t CmdClose()
Bool_t CmdExecute(const char *exeline)
void RestrictGo4(const char *path, const char *options)
Wrapper for new method in TRootSniffer.
virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString &text)
Send message to gui - need to be implemented.