GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4AnalysisImp.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 TGO4ANALYSISIMP_H
15 #define TGO4ANALYSISIMP_H
16 
17 #include "TObject.h"
18 #include "TGo4CommandReceiver.h"
19 #include "TString.h"
20 
21 class TH1;
22 class TH2;
23 class TTree;
24 class TGraph;
25 class TF1;
26 class TCanvas;
27 class TFolder;
28 class TNamed;
29 class TMutex;
30 class TStopwatch;
31 class TFile;
32 
37 class TGo4AnalysisStatus;
39 class TGo4AnalysisStep;
40 class TGo4AnalysisClient;
42 class TGo4DynamicEntry;
43 class TGo4Condition;
44 class TGo4WinCond;
45 class TGo4PolyCond;
46 class TGo4ShapedCond;
47 class TGo4ListCond;
48 class TGo4RollingGraph;
49 class TGo4Parameter;
51 class TGo4Picture;
52 class TGo4Fitter;
53 class TGo4ObjectStatus;
57 class TGo4EventElement;
58 class TGo4EventStore;
59 class TGo4EventSource;
60 class TGo4EventProcessor;
61 class TGo4TreeStructure;
64 class TGo4Sniffer;
65 class TGo4Ratemeter;
66 
77 class TGo4Analysis : public TObject, public TGo4CommandReceiver {
78 
79  friend class TGo4AnalysisStep;
80  friend class TGo4AnalysisClient;
81  friend class TGo4ComGetCurrentEvent;
82  friend class TGo4ComGetNamesList;
83  friend class TGo4ComGetEnvelope;
84  friend class TGo4ComSetObject;
86  friend class TGo4HistogramServer;
87  friend class TGo4AnalysisWebStatus;
88  friend class TGo4Sniffer;
89 
90 public:
91 
93  static const Int_t fgiAUTOSAVECOUNTS;
94 
96  static const Int_t fgiDYNLISTINTERVAL;
97 
99  static const Int_t fgiMACROSTARTPOLL;
100 
102  static const char *fgcDEFAULTFILENAME;
103 
105  static const char *fgcDEFAULTSTATUSFILENAME;
106 
108  static const char *fgcDEFAULTFILESUF;
109 
111  static const char fgcPYPROMPT;
112 
114  static const char *fgcPYINIT;
115 
116  static TGo4Analysis *Instance();
117 
118  static Bool_t Exists();
119 
121  static Bool_t IsBatchMode();
122 
124  static Bool_t IsClientMode();
125 
127  static Bool_t IsServerMode();
128 
129  static void SetRunningMode(int mode);
130 
131  virtual ~TGo4Analysis();
132 
133  const char *GetName() const override { return fAnalysisName.Data(); }
134 
135  void SetAnalysisName(const char *name) { fAnalysisName = name; }
136 
140  Int_t MainCycle();
141 
144  Int_t PreLoop();
145 
148  Int_t PostLoop();
149 
154  Int_t Process();
155 
161  virtual Int_t UserEventFunc();
162 
165  virtual Int_t UserPreLoop();
166 
169  virtual Int_t UserPostLoop();
170 
177  Int_t RunImplicitLoop(Int_t times, Bool_t showrate = kFALSE,
178  Double_t process_event_interval = -1., Bool_t iswebserver = kFALSE);
179 
182  virtual void CloseAnalysis();
183 
187  virtual Bool_t InitEventClasses();
188 
191 
201  Bool_t AddDynamicHistogram(const char *name,
202  const char *histo,
203  const char *hevx, const char *hmemx,
204  const char *hevy = nullptr, const char *hmemy = nullptr,
205  const char *hevz = nullptr, const char *hmemz = nullptr,
206  const char *condition = nullptr,
207  const char *cevx = nullptr, const char *cmemx = nullptr,
208  const char *cevy = nullptr, const char *cmemy = nullptr);
209 
214  Bool_t AddDynamicEntry(TGo4DynamicEntry *entry);
215 
219  Bool_t RemoveDynamicEntry(const char *entryname, const char *listname = nullptr);
220 
227  Bool_t AddObject(TNamed *anything, const char *subfolder = nullptr, Bool_t replace = kTRUE);
228 
233  TNamed *GetObject(const char *name, const char *folder = nullptr);
234 
238  Bool_t RemoveObject(const char *name, Bool_t del = kTRUE);
239 
244  Bool_t DeleteObjects(const char *name);
245 
250  Bool_t ClearObjects(const char *name);
251 
259  Bool_t ProtectObjects(const char *name, const Option_t *flags);
260 
264  Bool_t ResetBackStores(Bool_t clearflag = kFALSE);
265 
272  TObject *NextMatchingObject(const char *expr = nullptr,
273  const char *folder = nullptr,
274  Bool_t reset = kFALSE);
275 
277  TGo4TreeStructure *CreateTreeStructure(const char *treename);
278 
281  Bool_t AddHistogram(TH1 *his, const char *subfolder = nullptr, Bool_t replace = kTRUE);
282 
288  Bool_t AddTree(TTree *tree, const char *subfolder = nullptr);
289 
294  Bool_t RemoveTree(TTree *tree, const char *stepname = nullptr);
295 
300  Bool_t AddTreeHistogram(const char *hisname, const char *treename, const char *varexp, const char *cutexp);
301 
303  TH1 *GetHistogram(const char *name);
304 
306  TTree *GetTree(const char *name);
307 
311  Bool_t RemoveHistogram(const char *name, Bool_t del = kTRUE);
312 
316  Bool_t AddAnalysisCondition(TGo4Condition *con, const char *subfolder = nullptr);
317 
322  Bool_t SetAnalysisCondition(const char *name, TGo4Condition *con, Bool_t counter = kTRUE);
323 
327  TGo4Condition *GetAnalysisCondition(const char *name, const char *cond_cl = nullptr);
328 
331  Bool_t RemoveAnalysisCondition(const char *name);
332 
336  Bool_t AddParameter(TGo4Parameter *par, const char *subfolder = nullptr);
337 
342  Bool_t SetParameter(const char *name, TGo4Parameter *par);
343 
348  Bool_t SetParameterStatus(const char *name, TGo4ParameterStatus *par);
349 
353  TGo4Parameter *GetParameter(const char *name, const char *parameter_class = nullptr);
354 
357  Bool_t RemoveParameter(const char *name);
358 
362  Bool_t AddPicture(TGo4Picture *pic, const char *subfolder = nullptr);
363 
368  Bool_t SetPicture(const char *name, TGo4Picture *pic);
369 
372  TGo4Picture *GetPicture(const char *name);
373 
376  Bool_t RemovePicture(const char *name);
377 
381  Bool_t AddCanvas(TCanvas *can, const char *subfolder = nullptr);
382 
385  TCanvas *GetCanvas(const char *name);
386 
389  Bool_t RemoveCanvas(const char *name);
390 
394 
398 
402  TGo4ObjectStatus *CreateObjectStatus(const char *name, const char *folder = nullptr);
403 
406 
408  TFolder *GetObjectFolder();
409 
411  void UpdateStatus(TGo4AnalysisStatus *state);
412 
421  void SetStatus(TGo4AnalysisStatus *state);
422 
425  Bool_t LoadStatus(const char *filename = nullptr);
426 
429  Bool_t LoadObjects(const char *filename = nullptr);
430 
432  Bool_t SaveStatus(const char *filename = nullptr);
433 
437  void SetStepChecking(Bool_t on = kTRUE);
438 
442  Bool_t SetFirstStep(const char *name);
443 
448  Bool_t SetLastStep(const char *name);
449 
460  Bool_t SetStepStorage(const char *name, Bool_t on);
461 
465  Bool_t NewStepStore(const char *name, TGo4EventStoreParameter *par);
466 
470  Bool_t NewStepSource(const char *name, TGo4EventSourceParameter *par);
471 
475  Bool_t NewStepProcessor(const char *name, TGo4EventProcessorParameter *par);
476 
478  void SetAutoSaveInterval(Int_t interval = 0) { fiAutoSaveInterval = interval; }
479 
481  void SetAutoSaveFile(const char *filename = nullptr,
482  Bool_t overwrite = kFALSE,
483  Int_t compression = 5);
484 
486  Bool_t IsAutoSaveFileName() const;
487 
489  Int_t LockAutoSave();
490 
492  Int_t UnLockAutoSave();
493 
495  void SetAutoSave(Bool_t on = kTRUE) { fbAutoSaveOn = on; }
496 
498  Bool_t IsAutoSaveOn() const { return fbAutoSaveOn; }
499 
501  void SetAutoSaveFileChange(Bool_t on = kTRUE) { fbAutoSaveFileChange = on; }
502 
505  Bool_t IsAutoSaveFileChange() const { return fbAutoSaveFileChange; }
506 
508  Bool_t IsInitDone() const { return fbInitIsDone; }
509 
514  Bool_t IsRunning() const;
515 
519  void SetRunning(Bool_t on = kTRUE);
520 
524  Int_t WaitForStart();
525 
527  Int_t IsErrorStopEnabled() const;
528 
530  void SetNewInputFile(Bool_t on = kTRUE) { fbNewInputFile = on; }
531 
533  Bool_t IsNewInputFile() const { return fbNewInputFile; }
534 
536  void SetInputFileName(const char *fname) { fxCurrentInputFileName = fname; }
537 
539  const char *GetInputFileName() const { return fxCurrentInputFileName.Data(); }
540 
542  const char *GetDefaultTestFileName() const { return fxDefaultTestFileName.Data(); }
543 
544  void SetDynListInterval(Int_t val);
545 
546  Int_t GetDynListInterval() const;
547 
551  TGo4EventElement *GetInputEvent(const char *stepname) const;
552 
557  TGo4EventElement *GetInputEvent(Int_t stepindex) const;
558 
563  TGo4EventElement *GetOutputEvent(const char *stepname) const;
564 
571  TGo4EventElement *GetOutputEvent(Int_t stepindex) const;
572 
577 
579  TGo4EventElement *GetEventStructure(const char *name) const;
580 
587  void Message(Int_t prio, const char *text, ...)
588  #if defined(__GNUC__) && !defined(__CINT__)
589  __attribute__((format(printf, 3, 4)))
590  #endif
591  ;
592 
595  void SendObjectToGUI(TObject *ob);
596 
599  void StartObjectServer(const char *basename, const char *passwd);
600 
602  void StopObjectServer();
603 
606  void SetAdministratorPassword(const char *passwd);
607 
610  void SetControllerPassword(const char *passwd);
611 
614  void SetObserverPassword(const char *passwd);
615 
617  void Print(Option_t *opt = "") const override;
618 
620  void PrintHistograms(const char *expression = nullptr);
621 
623  void PrintConditions(const char *expression = nullptr);
624 
626  void PrintParameters(const char *expression = nullptr);
627 
629  void PrintDynamicList();
630 
636  void ShowEvent(const char *stepname, Bool_t isoutput = kTRUE);
637 
642  Int_t StoreParameter(const char *name, TGo4Parameter *par);
643 
648  Int_t StoreCondition(const char *name, TGo4Condition *con);
649 
654  Int_t StoreFitter(const char *name, TGo4Fitter *fit);
655 
660  Int_t StoreFolder(const char *stepname, TFolder *folder);
661 
665  Int_t StoreFolder(const char *stepname, const char *foldername);
666 
669  void AutoSave();
670 
678  Bool_t AddAnalysisStep(TGo4AnalysisStep *next);
679 
682  TGo4AnalysisStep *GetAnalysisStep(const char *name);
683 
685  TGo4AnalysisStep *GetAnalysisStepNum(Int_t number);
686 
688  void DefineServerPasswords(const char *admin, const char *controller, const char *observer);
689 
691  void SetBatchLoopCount(Int_t cnt = -1) { fBatchLoopCount = cnt; }
692 
694  void SetMakeWithAutosave(Bool_t on = kTRUE) { fbMakeWithAutosave = on; }
695 
698  Bool_t IsObjMade() const { return fbObjMade; }
699 
712  TH1 *MakeTH1(char type, const char *fullname, const char *title,
713  Int_t nbinsx, Double_t xlow, Double_t xup,
714  const char *xtitle = nullptr, const char *ytitle = nullptr);
715 
729  TH2 *MakeTH2(char type, const char *fullname, const char *title,
730  Int_t nbinsx, Double_t xlow, Double_t xup,
731  Int_t nbinsy, Double_t ylow, Double_t yup,
732  const char *xtitle = nullptr, const char *ytitle = nullptr, const char *ztitle = nullptr);
733 
738  TGo4WinCond *MakeWinCond(const char *fullname,
739  Double_t xmin, Double_t xmax,
740  const char *HistoName = nullptr);
741 
747  TGo4WinCond *MakeWinCond(const char *fullname,
748  Double_t xmin, Double_t xmax,
749  Double_t ymin, Double_t ymax,
750  const char *HistoName = nullptr);
751 
761  TGo4PolyCond *MakePolyCond(const char *fullname,
762  Int_t npoints,
763  Double_t (*points) [2],
764  const char *HistoName = nullptr,
765  Bool_t shapedcond = kFALSE);
766 
774  TGo4ShapedCond *MakeEllipseCond(const char *fullname,
775  Int_t npoints,
776  Double_t cx, Double_t cy, Double_t a1, Double_t a2, Double_t theta = 0.,
777  const char *HistoName = nullptr);
778 
785  TGo4ShapedCond *MakeCircleCond(const char *fullname,
786  Int_t npoints, Double_t cx, Double_t cy, Double_t r,
787  const char *HistoName = nullptr);
788 
795  TGo4ShapedCond *MakeBoxCond(const char *fullname, Double_t cx, Double_t cy,
796  Double_t a1, Double_t a2, Double_t theta,
797  const char *HistoName = nullptr);
798 
809  TGo4ShapedCond *MakeFreeShapeCond(const char *fullname, Int_t npoints,
810  Double_t (*points)[2], const char *HistoName = nullptr);
811 
818  TGo4ListCond *MakeListCond(const char *fullname, const Int_t num,
819  const Int_t *values, const char *HistoName = nullptr);
820 
828  TGo4ListCond *MakeListCond(const char *fullname, const Int_t start,
829  const Int_t stop, const Int_t step = 1, const char *HistoName = nullptr);
830 
835  TGo4ListCond *MakeListCond(const char *fullname, const char *title,
836  const char *HistoName = nullptr);
837 
842  TGraph *MakeGraph(const char *fullname, const char *title, Int_t points = 0,
843  Double_t *xvalues = nullptr, Double_t *yvalues = nullptr);
844 
848  TGraph *MakeGraph(const char *fullname, const char *title, TF1 *function);
849 
854  TGo4RollingGraph *MakeRollingGraph(const char *fullname, const char *title, Int_t points = 0, Int_t average = 1);
855 
867  TGo4Parameter *MakeParameter(const char *fullname,
868  const char *classname,
869  const char *cmd = nullptr);
870 
872  void SetSortedOrder(Bool_t on = kTRUE);
873 
875  Bool_t IsSortedOrder() const;
876 
879  Long64_t ExecuteScript(const char *script_name);
880 
884  Long64_t ExecutePython(const char *script_name, Int_t *errcode = nullptr);
885 
890  Long64_t ExecuteLine(const char *command, Int_t *errcode = nullptr);
891 
893  void ProcessCrtlCSignal();
894 
896  void SetSniffer(TGo4AnalysisSniffer *sniff) { fSniffer = sniff; }
897 
900 
903 
905  void StopAnalysis();
906 
908  void StartAnalysis();
909 
911  void ProcessEvents();
912 
913 protected:
914 
917  Bool_t fbInitIsDone{kFALSE};
918 
921  Bool_t fbAutoSaveOn{kFALSE};
922 
924  TGo4Analysis(const char *name = nullptr);
925 
927  TGo4Analysis(int argc, char **argv);
928 
930  void Constructor();
931 
937  Int_t ProcessAnalysisSteps();
938 
939 private:
940 
943  Bool_t EvaluateFolderpath(const char *fullname, TString &object, TString &folder);
944 
951  TTree *CreateSingleEventTree(const char *name, Bool_t isoutput = kTRUE);
952 
955 
957  void UpdateNamesList();
958 
962 
966  void SetOutputEvent(TGo4EventElement *event);
967 
970  Bool_t AddEventStore(TGo4EventStore *store);
971 
973  Bool_t RemoveEventStore(TGo4EventStore *store);
974 
977  Bool_t AddEventSource(TGo4EventSource *source);
978 
980  Bool_t RemoveEventSource(TGo4EventSource *source);
981 
985 
988 
992 
995 
998 
1003  void SendMessageToGUI(Int_t level, Bool_t printout, const char *text);
1004 
1006  void OpenAutoSaveFile(bool for_writing = false);
1007 
1009  void CloseAutoSaveFile();
1010 
1013 
1015  Bool_t IsStopWorking() const { return fxDoWorkingFlag == flagStop; }
1016 
1017  /* for signal handler to shutdown analysis server, if existing*/
1018  void ShutdownServer();
1019 
1022 
1026  static Bool_t fbExists;
1027 
1030  static Int_t fiRunningMode;
1031 
1034 
1038 
1042 
1044  Int_t fiAutoSaveCount{0};
1045 
1047  TStopwatch *fxAutoSaveClock{nullptr};
1048 
1053 
1056 
1060  TMutex *fxAutoSaveMutex{nullptr};
1061 
1063  TFile *fxAutoFile{nullptr};
1064 
1066  TString fxAutoFileName;
1067 
1069  Bool_t fbAutoSaveOverwrite{kFALSE};
1070 
1073 
1076  Bool_t fbNewInputFile{kFALSE};
1077 
1080 
1083  Bool_t fbAutoSaveFileChange{kFALSE};
1084 
1088 
1092 
1095 
1098 
1100  TString fAnalysisName;
1101 
1104 
1107 
1110 
1113 
1115  Bool_t fbMakeWithAutosave{kFALSE};
1116 
1118  Bool_t fbObjMade{kFALSE};
1119 
1121  Bool_t fbPythonBound{kFALSE};
1122 
1124  Int_t fNumCtrlC{0};
1125 
1128 
1130  TGo4Ratemeter *fxRate{nullptr};
1131 
1134 
1136 };
1137 
1138 #endif
Bool_t AddTreeHistogram(const char *hisname, const char *treename, const char *varexp, const char *cutexp)
Bool_t IsAutoSaveOn() const
TGraph * MakeGraph(const char *fullname, const char *title, Int_t points=0, Double_t *xvalues=nullptr, Double_t *yvalues=nullptr)
TGo4PolyCond * MakePolyCond(const char *fullname, Int_t npoints, Double_t(*points) [2], const char *HistoName=nullptr, Bool_t shapedcond=kFALSE)
void SetRunning(Bool_t on=kTRUE)
Graphs that renew themselves iteratively to monitor a value.
static const Int_t fgiMACROSTARTPOLL
TGo4AnalysisSniffer * GetSniffer() const
void SetMakeWithAutosave(Bool_t on=kTRUE)
static Bool_t IsServerMode()
static const char * fgcPYINIT
void PrintConditions(const char *expression=nullptr)
void SetAutoSaveFileChange(Bool_t on=kTRUE)
const char * GetInputFileName() const
Bool_t NewStepProcessor(const char *name, TGo4EventProcessorParameter *par)
const char * GetName() const override
Bool_t SetStepStorage(const char *name, Bool_t on)
void Print(Option_t *opt="") const override
virtual Int_t UserPreLoop()
TGo4AnalysisClient * fxAnalysisSlave
Bool_t AddPicture(TGo4Picture *pic, const char *subfolder=nullptr)
void SetAnalysisName(const char *name)
Bool_t IsAutoSaveFileName() const
void SetOutputEvent(TGo4EventElement *event)
TGo4ShapedCond * MakeBoxCond(const char *fullname, Double_t cx, Double_t cy, Double_t a1, Double_t a2, Double_t theta, const char *HistoName=nullptr)
void DefineServerPasswords(const char *admin, const char *controller, const char *observer)
Bool_t RemoveParameter(const char *name)
void UpdateStatus(TGo4AnalysisStatus *state)
Long64_t ExecutePython(const char *script_name, Int_t *errcode=nullptr)
Bool_t SetParameter(const char *name, TGo4Parameter *par)
virtual void CloseAnalysis()
Int_t StoreFolder(const char *stepname, TFolder *folder)
TGo4TreeStructure * CreateTreeStructure(const char *treename)
void SetObserverPassword(const char *passwd)
Int_t StoreParameter(const char *name, TGo4Parameter *par)
TGo4AnalysisObjectNames * GetNamesList() const
TGo4InterruptHandler * fxInterruptHandler
TObject * NextMatchingObject(const char *expr=nullptr, const char *folder=nullptr, Bool_t reset=kFALSE)
void SetControllerPassword(const char *passwd)
void SetSortedOrder(Bool_t on=kTRUE)
TGo4AnalysisObjectManager * ObjectManager() const
Bool_t EvaluateFolderpath(const char *fullname, TString &object, TString &folder)
TString fServerCtrlPass
void SetAutoSaveFile(const char *filename=nullptr, Bool_t overwrite=kFALSE, Int_t compression=5)
static const char * fgcDEFAULTSTATUSFILENAME
Bool_t AddDynamicHistogram(const char *name, const char *histo, const char *hevx, const char *hmemx, const char *hevy=nullptr, const char *hmemy=nullptr, const char *hevz=nullptr, const char *hmemz=nullptr, const char *condition=nullptr, const char *cevx=nullptr, const char *cmemx=nullptr, const char *cevy=nullptr, const char *cmemy=nullptr)
Bool_t RemoveDynamicEntry(const char *entryname, const char *listname=nullptr)
void SendMessageToGUI(Int_t level, Bool_t printout, const char *text)
void SetStepChecking(Bool_t on=kTRUE)
static Bool_t IsClientMode()
TGo4AnalysisObjectNames * fxObjectNames
Int_t StoreFitter(const char *name, TGo4Fitter *fit)
void SetSniffer(TGo4AnalysisSniffer *sniff)
Bool_t RemoveEventSource(TGo4EventSource *source)
void ShowEvent(const char *stepname, Bool_t isoutput=kTRUE)
TString fServerAdminPass
TString fxDefaultTestFileName
Bool_t SetParameterStatus(const char *name, TGo4ParameterStatus *par)
TString fxConfigFilename
Bool_t RemoveAnalysisCondition(const char *name)
TGo4AnalysisObjectManager * fxObjectManager
virtual Int_t UserEventFunc()
Bool_t SetFirstStep(const char *name)
TH2 * MakeTH2(char type, const char *fullname, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, const char *xtitle=nullptr, const char *ytitle=nullptr, const char *ztitle=nullptr)
Int_t fiAutoSaveInterval
Int_t IsErrorStopEnabled() const
TGo4AnalysisClient * GetAnalysisClient() const
Bool_t IsInitDone() const
TGo4AnalysisStepManager * fxStepManager
TGo4Condition * GetAnalysisCondition(const char *name, const char *cond_cl=nullptr)
void SetDynListInterval(Int_t val)
TGo4ListCond * MakeListCond(const char *fullname, const Int_t num, const Int_t *values, const char *HistoName=nullptr)
TGo4AnalysisObjectNames * CreateNamesList()
TMutex * fxAutoSaveMutex
Bool_t RemoveTree(TTree *tree, const char *stepname=nullptr)
TTree * CreateSingleEventTree(const char *name, Bool_t isoutput=kTRUE)
Bool_t fbMakeWithAutosave
Bool_t RemoveEventStructure(TGo4EventElement *ev)
Bool_t IsAutoSaveFileChange() const
Bool_t AddTree(TTree *tree, const char *subfolder=nullptr)
TGo4AnalysisStep * GetAnalysisStep(const char *name)
void SetAdministratorPassword(const char *passwd)
static const char fgcPYPROMPT
void SetNewInputFile(Bool_t on=kTRUE)
void ProcessCrtlCSignal()
Bool_t SetAnalysisCondition(const char *name, TGo4Condition *con, Bool_t counter=kTRUE)
TString fxAutoFileName
Bool_t LoadObjects(const char *filename=nullptr)
Bool_t ResetBackStores(Bool_t clearflag=kFALSE)
void PrintHistograms(const char *expression=nullptr)
static const char * fgcDEFAULTFILENAME
Long64_t ExecuteScript(const char *script_name)
TGo4ObjectStatus * CreateObjectStatus(const char *name, const char *folder=nullptr)
static const char * fgcDEFAULTFILESUF
TH1 * GetHistogram(const char *name)
Int_t RunImplicitLoop(Int_t times, Bool_t showrate=kFALSE, Double_t process_event_interval=-1., Bool_t iswebserver=kFALSE)
Bool_t IsStopWorking() const
TCanvas * GetCanvas(const char *name)
TStopwatch * fxAutoSaveClock
void SetAutoSave(Bool_t on=kTRUE)
Bool_t RemoveEventStore(TGo4EventStore *store)
void SendObjectToGUI(TObject *ob)
Long64_t ExecuteLine(const char *command, Int_t *errcode=nullptr)
TString fServerObserverPass
Bool_t AddEventStructure(TGo4EventElement *ev)
void Message(Int_t prio, const char *text,...)
Bool_t AddEventSource(TGo4EventSource *source)
void OpenAutoSaveFile(bool for_writing=false)
TGo4Parameter * GetParameter(const char *name, const char *parameter_class=nullptr)
Int_t StoreCondition(const char *name, TGo4Condition *con)
Bool_t AddEventProcessor(TGo4EventProcessor *pro)
Bool_t AddAnalysisCondition(TGo4Condition *con, const char *subfolder=nullptr)
TTree * GetTree(const char *name)
Bool_t IsNewInputFile() const
static Bool_t IsBatchMode()
Bool_t DeleteObjects(const char *name)
static Bool_t fbExists
Bool_t RemoveCanvas(const char *name)
Bool_t RemoveEventProcessor(TGo4EventProcessor *pro)
TString fAnalysisName
TGo4Parameter * MakeParameter(const char *fullname, const char *classname, const char *cmd=nullptr)
virtual Int_t UserPostLoop()
void StartObjectServer(const char *basename, const char *passwd)
Bool_t ClearObjects(const char *name)
TGo4EventElement * GetInputEvent(const char *stepname) const
TGo4Picture * GetPicture(const char *name)
TGo4Ratemeter * fxRate
TGo4WinCond * MakeWinCond(const char *fullname, Double_t xmin, Double_t xmax, const char *HistoName=nullptr)
Bool_t AddHistogram(TH1 *his, const char *subfolder=nullptr, Bool_t replace=kTRUE)
Int_t fiAutoSaveCompression
void SetInputFileName(const char *fname)
static TGo4Analysis * fxInstance
Bool_t AddCanvas(TCanvas *can, const char *subfolder=nullptr)
virtual ~TGo4Analysis()
TGo4ShapedCond * MakeFreeShapeCond(const char *fullname, Int_t npoints, Double_t(*points)[2], const char *HistoName=nullptr)
TNamed * GetObject(const char *name, const char *folder=nullptr)
Bool_t AddObject(TNamed *anything, const char *subfolder=nullptr, Bool_t replace=kTRUE)
TGo4EventElement * GetOutputEvent() const
TGo4AnalysisSniffer * fSniffer
TGo4RollingGraph * MakeRollingGraph(const char *fullname, const char *title, Int_t points=0, Int_t average=1)
virtual Bool_t InitEventClasses()
TGo4ShapedCond * MakeCircleCond(const char *fullname, Int_t npoints, Double_t cx, Double_t cy, Double_t r, const char *HistoName=nullptr)
TH1 * MakeTH1(char type, const char *fullname, const char *title, Int_t nbinsx, Double_t xlow, Double_t xup, const char *xtitle=nullptr, const char *ytitle=nullptr)
Bool_t NewStepStore(const char *name, TGo4EventStoreParameter *par)
void SetAnalysisClient(TGo4AnalysisClient *cli)
static Int_t fiRunningMode
Bool_t RemoveObject(const char *name, Bool_t del=kTRUE)
const char * GetDefaultTestFileName() const
void PrintParameters(const char *expression=nullptr)
TGo4AnalysisStep * GetAnalysisStepNum(Int_t number)
Bool_t AddAnalysisStep(TGo4AnalysisStep *next)
Bool_t IsObjMade() const
Bool_t ProtectObjects(const char *name, const Option_t *flags)
Bool_t SetPicture(const char *name, TGo4Picture *pic)
Bool_t IsRunning() const
TGo4EventElement * GetEventStructure(const char *name) const
ClassDefOverride(TGo4Sniffer, 1)
Bool_t fbAutoSaveOverwrite
Bool_t AddParameter(TGo4Parameter *par, const char *subfolder=nullptr)
void SetBatchLoopCount(Int_t cnt=-1)
TString fxCurrentInputFileName
Bool_t AddDynamicEntry(TGo4DynamicEntry *entry)
Int_t GetDynListInterval() const
TGo4AnalysisStatus * CreateStatus()
Bool_t SaveStatus(const char *filename=nullptr)
static Bool_t Exists()
Bool_t RemoveHistogram(const char *name, Bool_t del=kTRUE)
Int_t ProcessAnalysisSteps()
enum TGo4Analysis::@0 fxDoWorkingFlag
Bool_t AddEventStore(TGo4EventStore *store)
Bool_t LoadStatus(const char *filename=nullptr)
static const Int_t fgiDYNLISTINTERVAL
static void SetRunningMode(int mode)
static TGo4Analysis * Instance()
TGo4ShapedCond * MakeEllipseCond(const char *fullname, Int_t npoints, Double_t cx, Double_t cy, Double_t a1, Double_t a2, Double_t theta=0., const char *HistoName=nullptr)
TGo4EventElement * fxSampleEvent
static const Int_t fgiAUTOSAVECOUNTS
Bool_t IsSortedOrder() const
TGo4AnalysisWebStatus * CreateWebStatus()
Bool_t NewStepSource(const char *name, TGo4EventSourceParameter *par)
Bool_t fbAutoSaveFileChange
TFolder * GetObjectFolder()
Bool_t RemovePicture(const char *name)
TGo4Analysis(const char *name=nullptr)
Bool_t SetLastStep(const char *name)
void SetAutoSaveInterval(Int_t interval=0)
void SetStatus(TGo4AnalysisStatus *state)