GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4Sniffer.h
Go to the documentation of this file.
1 // $Id: TGo4Sniffer.h 2045 2018-03-02 14:43:11Z linev $
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 f�r 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 #ifdef SNIFFER_FULL
18 #include "TRootSnifferFull.h"
19 typedef TRootSnifferFull SniffBaseClass;
20 #else
21 #include "TRootSniffer.h"
22 typedef TRootSniffer SniffBaseClass;
23 #endif
24 
25 #include "TGo4AnalysisSniffer.h"
26 
27 #include "TGo4MsgList.h"
28 
30 class TGraph;
31 class TGo4Ratemeter;
32 class THttpServer;
33 
34 class TGo4Sniffer : public SniffBaseClass,
35  public TGo4AnalysisSniffer {
36 
37  protected:
38 
40 
41  TGraph* fEventRate;
42 
44 
46 
48 
50  Bool_t fbPythonBound;
51 
52  virtual void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj);
53 
55  virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString& text);
56 
58  Bool_t HasRestrictMethod();
59 
61  Bool_t HasProduceMultiMethod();
62 
64  void RestrictGo4(const char* path, const char* options);
65 
67  Bool_t HasAutoLoadMethod();
68 
70  Bool_t SetAutoLoadGo4(const char* script);
71 
72  static THttpServer* gHttpServer;
73 
74 
75  public:
76 
77  static THttpServer* GetHttpServer() { return gHttpServer; }
78 
79  static Bool_t CreateEngine(const char* name);
80 
81 
82  TGo4Sniffer(const char* name);
83  virtual ~TGo4Sniffer();
84 
85  virtual void ScanRoot(TRootSnifferScanRec& rec);
86 
87  virtual void *FindInHierarchy(const char *path, TClass **cl = 0, TDataMember **member = 0, Int_t *chld = 0);
88 
89  // ========= methods registered as command and available from web interface =========
90 
91  Bool_t CmdStart();
92  Bool_t CmdStop();
93  Bool_t CmdClear();
94  Bool_t CmdRestart();
95  Bool_t CmdClose();
96  Bool_t CmdOpenFile(const char* fname);
97  Bool_t CmdCloseFiles();
98  Bool_t CmdExit();
99  Bool_t CmdClearObject(const char* objname);
100  Bool_t CmdDeleteObject(const char* objname);
101  Bool_t CmdExecute(const char* exeline);
102 
103  // === methods used via http interface by Go4GUI ===============
104 
105  Bool_t AddAnalysisObject(TObject* obj);
106 
107  Bool_t RemoteTreeDraw(const char* histoname,
108  const char* treename,
109  const char* varexpr,
110  const char* cutexpr);
111 
112  TObject* CreateItemStatus(const char* itemname);
113 
115  virtual void SetTitle(const char* title = "");
116 
118  virtual void RatemeterUpdate(TGo4Ratemeter*);
119 
121  virtual void StatusMessage(int level, Bool_t printout, const TString&);
122 
124  virtual void ProcessSnifferEvents();
125 
126 
127  ClassDef(TGo4Sniffer, 1); // Sniffer of Go4 analysis objects for THttpServer
128 };
129 
130 
131 #endif
TGo4MsgList fDebugOutput
Definition: TGo4Sniffer.h:45
ClassDef(TGo4Sniffer, 1)
Bool_t HasRestrictMethod()
Bool_t CmdOpenFile(const char *fname)
static THttpServer * GetHttpServer()
Definition: TGo4Sniffer.h:77
Bool_t fbPythonBound
Definition: TGo4Sniffer.h:50
virtual void * FindInHierarchy(const char *path, TClass **cl=0, TDataMember **member=0, Int_t *chld=0)
Bool_t CmdCloseFiles()
TGo4MsgList fStatusMessages
Definition: TGo4Sniffer.h:47
virtual void StatusMessage(int level, Bool_t printout, const TString &)
Bool_t CmdExecute(const char *exeline)
Bool_t CmdRestart()
virtual void ProcessSnifferEvents()
Bool_t CmdExit()
TGo4AnalysisWebStatus * fAnalysisStatus
Definition: TGo4Sniffer.h:39
TRootSniffer SniffBaseClass
Definition: TGo4Sniffer.h:22
Bool_t HasProduceMultiMethod()
Bool_t CmdStop()
Bool_t RemoteTreeDraw(const char *histoname, const char *treename, const char *varexpr, const char *cutexpr)
Bool_t CmdClose()
virtual void ScanRoot(TRootSnifferScanRec &rec)
TGo4Sniffer(const char *name)
Definition: TGo4Sniffer.cxx:70
virtual void SetTitle(const char *title="")
static THttpServer * gHttpServer
Definition: TGo4Sniffer.h:72
virtual ~TGo4Sniffer()
Bool_t CmdClear()
virtual void ScanObjectProperties(TRootSnifferScanRec &rec, TObject *obj)
Bool_t CmdClearObject(const char *objname)
virtual void SendStatusMessage(Int_t level, Bool_t printout, const TString &text)
TObject * CreateItemStatus(const char *itemname)
static Bool_t CreateEngine(const char *name)
Definition: TGo4Sniffer.cxx:47
virtual void RatemeterUpdate(TGo4Ratemeter *)
Bool_t SetAutoLoadGo4(const char *script)
Bool_t CmdStart()
TGo4Ratemeter * fRatemeter
Definition: TGo4Sniffer.h:43
Bool_t CmdDeleteObject(const char *objname)
Bool_t AddAnalysisObject(TObject *obj)
void RestrictGo4(const char *path, const char *options)
TGraph * fEventRate
Definition: TGo4Sniffer.h:41
Bool_t HasAutoLoadMethod()